Skip to documentation
SLOP

tiny.pluck.bdd.Bdd

Reference 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.

No direct callersNo direct callsbddBdd
Static calls · unresolved targets: unknown · external targets: unknown.

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});            }        }    }};
Called byCallsNo direct callersbdd.BddisFalsebdd.BddisTruebdd.Bddformat
Static calls · unresolved targets: 1 · external targets: 1.
Called byCallsNo direct callsbdd.BddCopyisConstbdd.BddisConst
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callsbdd.Bddformatbdd.BddCopyisFalsebdd.WeightedSamplersamplebdd.BddisFalse
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callsbdd.Bddformatbdd.BddCopyisTruebdd.WeightedSamplersamplebdd.BddisTrue
Static calls · unresolved targets: 0 · external targets: 0.

Also reachable as

weight_dd.Bdd.

Audit

Definitions11
Public names22
Members2
Version26.7.0
Revisiondaab053ee433