[][src]Struct zdd::factory::Factory

pub struct Factory<Label> where
    Label: Eq + Hash + Clone
{ /* fields omitted */ }

A ZDD factory.

Wraps a hash consing table. Functions count, offset, onset, change, union, inter, minus and subset are cached.

Methods

impl<'a, 'b, Label: Ord + Eq + Hash + Clone + 'a + 'b> Factory<Label> where
    Factory<Label>: FactoryUnOps<Label, Zdd<Label>> + FactoryUnOps<Label, &'a Zdd<Label>> + FactoryUnLblOps<Label, Zdd<Label>, Label> + FactoryUnLblOps<Label, &'a Zdd<Label>, Label> + FactoryUnLblOps<Label, Zdd<Label>, &'b Label> + FactoryUnLblOps<Label, &'a Zdd<Label>, &'b Label> + FactoryBinOps<Label, Zdd<Label>, Zdd<Label>> + FactoryBinOps<Label, &'a Zdd<Label>, Zdd<Label>> + FactoryBinOps<Label, Zdd<Label>, &'b Zdd<Label>> + FactoryBinOps<Label, &'a Zdd<Label>, &'b Zdd<Label>>, 
[src]

pub fn mk(capacity: usize) -> Self[src]

Creates a new factory.

One should never create more than one factory for a given element type.

pub fn zero(&self) -> Zdd<Label>[src]

The zero element, i.e. the empty set.

pub fn one(&self) -> Zdd<Label>[src]

The one element, i.e. the set containing only the empty combination.

pub fn add_one(&self, kid: &Zdd<Label>) -> Zdd<Label>[src]

Adds the empty combination to a ZDD if it's not already there.

pub fn rm_one(&self, zdd: &Zdd<Label>) -> Zdd<Label>[src]

Removes the empty combination from a ZDD if it's there.

pub fn lft(&self, zdd: &Zdd<Label>) -> Result<Zdd<Label>, bool>[src]

Returns the left subtree if the ZDD is a node, an error

  • of true if the ZDD is One (more precisely ZddTree::HasOne(Zero)) and
  • of false if it is Zero.

pub fn rgt(&self, zdd: &Zdd<Label>) -> Result<Zdd<Label>, bool>[src]

Returns the right subtree if the ZDD is a node, an error of true if the ZDD is One and false if it is Zero.

pub fn kids(&self, zdd: &Zdd<Label>) -> Result<(Zdd<Label>, Zdd<Label>), bool>[src]

Returns the subtrees if the ZDD is a node, an error of true if the ZDD is One and false if it is Zero.

pub fn of_btree_set(&self, set: &'b BTreeSet<Label>) -> Zdd<Label>[src]

Creates a ZDD containing the combination corresponding to a BTreeSet.

pub fn of_hashset(&self, set: &'b HashSet<Label>) -> Zdd<Label>[src]

Creates a ZDD containing the combination corresponding to a HashSet.

pub fn consign_len(&self) -> usize[src]

The size of the consign.

pub fn count_cache_len(&self) -> usize[src]

The size of the count cache.

pub fn offset_cache_len(&self) -> usize[src]

The size of the offset cache.

pub fn onset_cache_len(&self) -> usize[src]

The size of the onset cache.

pub fn change_cache_len(&self) -> usize[src]

The size of the change cache.

pub fn union_cache_len(&self) -> usize[src]

The size of the union cache.

pub fn inter_cache_len(&self) -> usize[src]

The size of the inter cache.

pub fn minus_cache_len(&self) -> usize[src]

The size of the minus cache.

pub fn subset_cache_len(&self) -> usize[src]

The size of the subset cache.

Trait Implementations

impl<'a, 'b, Label: Ord + Eq + Hash + Clone> FactoryBinOps<Label, &'a HConsed<ZddTree<Label>>, &'b HConsed<ZddTree<Label>>> for Factory<Label>[src]

impl<'a, Label: Ord + Eq + Hash + Clone> FactoryBinOps<Label, &'a HConsed<ZddTree<Label>>, HConsed<ZddTree<Label>>> for Factory<Label>[src]

impl<'a, Label: Ord + Eq + Hash + Clone> FactoryBinOps<Label, HConsed<ZddTree<Label>>, &'a HConsed<ZddTree<Label>>> for Factory<Label>[src]

impl<Label: Ord + Eq + Hash + Clone> FactoryBinOps<Label, HConsed<ZddTree<Label>>, HConsed<ZddTree<Label>>> for Factory<Label>[src]

impl<'a, 'b, Label: Ord + Eq + Hash + Clone> FactoryUnLblOps<Label, &'a HConsed<ZddTree<Label>>, &'b Label> for Factory<Label>[src]

impl<'a, Label: Ord + Eq + Hash + Clone> FactoryUnLblOps<Label, &'a HConsed<ZddTree<Label>>, Label> for Factory<Label>[src]

impl<'a, Label: Ord + Eq + Hash + Clone> FactoryUnLblOps<Label, HConsed<ZddTree<Label>>, &'a Label> for Factory<Label>[src]

impl<Label: Ord + Eq + Hash + Clone> FactoryUnLblOps<Label, HConsed<ZddTree<Label>>, Label> for Factory<Label>[src]

impl<'a, Label: Ord + Eq + Hash + Clone> FactoryUnOps<Label, &'a HConsed<ZddTree<Label>>> for Factory<Label>[src]

impl<Label: Ord + Eq + Hash + Clone> FactoryUnOps<Label, HConsed<ZddTree<Label>>> for Factory<Label>[src]

impl<Label: Eq + Hash + Clone> Sync for Factory<Label>[src]

impl<'a, 'b, Label: Ord + Eq + Hash + Clone> ZddMaker<Label, &'a HConsed<ZddTree<Label>>, &'b HConsed<ZddTree<Label>>> for Factory<Label>[src]

impl<'a, Label: Ord + Eq + Hash + Clone> ZddMaker<Label, &'a HConsed<ZddTree<Label>>, HConsed<ZddTree<Label>>> for Factory<Label>[src]

impl<'a, Label: Ord + Eq + Hash + Clone> ZddMaker<Label, HConsed<ZddTree<Label>>, &'a HConsed<ZddTree<Label>>> for Factory<Label>[src]

impl<Label: Ord + Eq + Hash + Clone> ZddMaker<Label, HConsed<ZddTree<Label>>, HConsed<ZddTree<Label>>> for Factory<Label>[src]

Auto Trait Implementations

impl<Label> RefUnwindSafe for Factory<Label> where
    Label: RefUnwindSafe

impl<Label> Send for Factory<Label> where
    Label: Send + Sync

impl<Label> Unpin for Factory<Label> where
    Label: Unpin

impl<Label> UnwindSafe for Factory<Label> where
    Label: RefUnwindSafe

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

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,