pub struct BDDManager {
pub unique_table: HashMap<BDDNode, usize>,
pub nodes: Vec<BDDNode>,
pub apply_cache: HashMap<(u8, usize, usize), usize>,
}Expand description
A BDD manager: maintains a unique table and an apply cache.
Fields§
§unique_table: HashMap<BDDNode, usize>Unique table: node → id.
nodes: Vec<BDDNode>All allocated nodes (in order).
apply_cache: HashMap<(u8, usize, usize), usize>Apply cache: (op, id1, id2) → id.
Implementations§
Source§impl BDDManager
impl BDDManager
Sourcepub fn false_node(&self) -> usize
pub fn false_node(&self) -> usize
Return the id of the constant-false BDD.
Sourcepub fn bdd_and(&mut self, a: usize, b: usize) -> usize
pub fn bdd_and(&mut self, a: usize, b: usize) -> usize
Compute the conjunction of two BDD nodes.
Sourcepub fn bdd_or(&mut self, a: usize, b: usize) -> usize
pub fn bdd_or(&mut self, a: usize, b: usize) -> usize
Compute the disjunction of two BDD nodes.
Sourcepub fn bdd_quantify_exists(&mut self, a: usize, var: usize) -> usize
pub fn bdd_quantify_exists(&mut self, a: usize, var: usize) -> usize
Existentially quantify variable var out of BDD a.
Trait Implementations§
Source§impl Clone for BDDManager
impl Clone for BDDManager
Source§fn clone(&self) -> BDDManager
fn clone(&self) -> BDDManager
Returns a duplicate of the value. Read more
1.0.0 · 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 BDDManager
impl Debug for BDDManager
Auto Trait Implementations§
impl Freeze for BDDManager
impl RefUnwindSafe for BDDManager
impl Send for BDDManager
impl Sync for BDDManager
impl Unpin for BDDManager
impl UnsafeUnpin for BDDManager
impl UnwindSafe for BDDManager
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