tiny.pluck.bdd.Bdd
Defined in bdd.
API (12)
Actions
Public operations.
Values and defaults
Public values and defaults.
Fields and members
Public fields and members.
Source
Source: lib/pluck/src/bdd.zig:31
zig
pub const Bdd = packed struct { index: u31, complement: bool, pub const TRUE = Bdd{ .index = 0, .complement = false }; pub const FALSE = Bdd{ .index = 0, .complement = true }; pub fn fromRaw(raw: u32) Bdd { return @bitCast(raw); } pub fn toRaw(self: Bdd) u32 { return @bitCast(self); } pub fn neg(self: Bdd) Bdd { return Bdd{ .index = self.index, .complement = !self.complement, }; } pub fn isTrue(self: Bdd) bool { return self.index == 0 and !self.complement; } pub fn isFalse(self: Bdd) bool { return self.index == 0 and self.complement; } pub fn isConst(self: Bdd) bool { return self.index == 0; } pub fn toReg(self: Bdd) Bdd { return Bdd{ .index = self.index, .complement = false }; } pub fn format( self: Bdd, comptime fmt: []const u8, options: std.fmt.Options, writer: anytype, ) !void { _ = fmt; _ = options; if (self.isTrue()) { try writer.writeAll("T"); } else if (self.isFalse()) { try writer.writeAll("F"); } else { if (self.complement) { try writer.print("!{d}", .{self.index}); } else { try writer.print("{d}", .{self.index}); } } }};Also reachable as
Audit
| Definitions | 11 |
|---|---|
| Public names | 22 |
| Members | 2 |
| Version | 26.7.0 |
| Revision | daab053ee433 |