pub struct ZddManager { /* private fields */ }Expand description
Zero-suppressed Binary Decision Diagram (ZDD) manager. ZDDs use a different reduction rule optimized for sparse sets:
- Eliminate node if high == 0 (instead of low == high for BDDs)
ZDDs are particularly efficient for representing:
- Sparse sets and families of sets
- Combinatorial structures
- Paths in graphs
Implementations§
Source§impl ZddManager
impl ZddManager
Sourcepub fn singleton(&mut self, var: VarId) -> NodeId
pub fn singleton(&mut self, var: VarId) -> NodeId
Creates a ZDD for a singleton set containing just one variable.
Sourcepub fn union(&mut self, left: NodeId, right: NodeId) -> NodeId
pub fn union(&mut self, left: NodeId, right: NodeId) -> NodeId
Computes the union of two ZDD sets.
Sourcepub fn intersection(&mut self, left: NodeId, right: NodeId) -> NodeId
pub fn intersection(&mut self, left: NodeId, right: NodeId) -> NodeId
Computes the intersection of two ZDD sets.
Sourcepub fn difference(&mut self, left: NodeId, right: NodeId) -> NodeId
pub fn difference(&mut self, left: NodeId, right: NodeId) -> NodeId
Computes the set difference: left \ right
Sourcepub fn count(&self, node: NodeId) -> u64
pub fn count(&self, node: NodeId) -> u64
Returns the number of sets in the family represented by this ZDD.
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Returns the number of nodes in the manager.
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clears the operation cache.
Trait Implementations§
Source§impl Clone for ZddManager
impl Clone for ZddManager
Source§fn clone(&self) -> ZddManager
fn clone(&self) -> ZddManager
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ZddManager
impl Debug for ZddManager
Source§impl Default for ZddManager
impl Default for ZddManager
Auto Trait Implementations§
impl Freeze for ZddManager
impl RefUnwindSafe for ZddManager
impl Send for ZddManager
impl Sync for ZddManager
impl Unpin for ZddManager
impl UnsafeUnpin for ZddManager
impl UnwindSafe for ZddManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more