[][src]Struct biodivine_lib_bdd::BddNode

pub(crate) struct BddNode {
    pub var: BddVariable,
    pub low_link: BddPointer,
    pub high_link: BddPointer,
}

(internal) Representation of individual vertices of the Bdd directed acyclic graph.

A BddNode can be a terminal, in which case it is either 0 or 1, or a decision node, in which case it contains a variable $v_i$ which it conditions upon and two pointers (low and high) to other nodes in the same Bdd:

graph LR
    id1($v_i$)
    id2($v_j$)
    id3($v_k$)
    id1 -->|low| id2
    id1 -->|high| id3

Internally, we represent terminal nodes using the same structure, giving them cyclic pointers. Instead of variable id, we use the number of variables in the original BddVariableSet. This is consistent with the fact that we first condition on smallest variable ids. It can be also used for consistency checks inside the library.

Fields

var: BddVariablelow_link: BddPointerhigh_link: BddPointer

Implementations

impl BddNode[src]

pub fn mk_zero(num_vars: u16) -> BddNode[src]

Make a new terminal zero node.

pub fn mk_one(num_vars: u16) -> BddNode[src]

Make a new terminal one node.

pub fn mk_node(
    var: BddVariable,
    low_link: BddPointer,
    high_link: BddPointer
) -> BddNode
[src]

Make a new general node.

Assumptions:

  • low and high are pointers in the same Bdd array.
  • Returned node will be added to the same Bdd where low and high are pointers.

Trait Implementations

impl Clone for BddNode[src]

impl Copy for BddNode[src]

impl Debug for BddNode[src]

impl Eq for BddNode[src]

impl Hash for BddNode[src]

impl PartialEq<BddNode> for BddNode[src]

impl StructuralEq for BddNode[src]

impl StructuralPartialEq for BddNode[src]

Auto Trait Implementations

impl RefUnwindSafe for BddNode

impl Send for BddNode

impl Sync for BddNode

impl Unpin for BddNode

impl UnwindSafe for BddNode

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.