[−][src]Struct zdd::factory::Factory
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]
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>>,
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 isOne
(more preciselyZddTree::HasOne(Zero)
) and - of
false
if it isZero
.
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]
fn union(&self, lhs: &'a Zdd<Label>, rhs: &'b Zdd<Label>) -> Zdd<Label>
[src]
fn inter(&self, lhs: &'a Zdd<Label>, rhs: &'b Zdd<Label>) -> Zdd<Label>
[src]
fn minus(&self, lhs: &'a Zdd<Label>, rhs: &'b Zdd<Label>) -> Zdd<Label>
[src]
fn subset(&self, lhs: &'a Zdd<Label>, rhs: &'b Zdd<Label>) -> bool
[src]
impl<'a, Label: Ord + Eq + Hash + Clone> FactoryBinOps<Label, &'a HConsed<ZddTree<Label>>, HConsed<ZddTree<Label>>> for Factory<Label>
[src]
fn union(&self, lhs: &'a Zdd<Label>, rhs: Zdd<Label>) -> Zdd<Label>
[src]
fn inter(&self, lhs: &'a Zdd<Label>, rhs: Zdd<Label>) -> Zdd<Label>
[src]
fn minus(&self, lhs: &'a Zdd<Label>, rhs: Zdd<Label>) -> Zdd<Label>
[src]
fn subset(&self, lhs: &'a Zdd<Label>, rhs: Zdd<Label>) -> bool
[src]
impl<'a, Label: Ord + Eq + Hash + Clone> FactoryBinOps<Label, HConsed<ZddTree<Label>>, &'a HConsed<ZddTree<Label>>> for Factory<Label>
[src]
fn union(&self, lhs: Zdd<Label>, rhs: &'a Zdd<Label>) -> Zdd<Label>
[src]
fn inter(&self, lhs: Zdd<Label>, rhs: &'a Zdd<Label>) -> Zdd<Label>
[src]
fn minus(&self, lhs: Zdd<Label>, rhs: &'a Zdd<Label>) -> Zdd<Label>
[src]
fn subset(&self, lhs: Zdd<Label>, rhs: &'a Zdd<Label>) -> bool
[src]
impl<Label: Ord + Eq + Hash + Clone> FactoryBinOps<Label, HConsed<ZddTree<Label>>, HConsed<ZddTree<Label>>> for Factory<Label>
[src]
fn union(&self, lhs: Zdd<Label>, rhs: Zdd<Label>) -> Zdd<Label>
[src]
fn inter(&self, lhs: Zdd<Label>, rhs: Zdd<Label>) -> Zdd<Label>
[src]
fn minus(&self, lhs: Zdd<Label>, rhs: Zdd<Label>) -> Zdd<Label>
[src]
fn subset(&self, lhs: Zdd<Label>, rhs: Zdd<Label>) -> bool
[src]
impl<'a, 'b, Label: Ord + Eq + Hash + Clone> FactoryUnLblOps<Label, &'a HConsed<ZddTree<Label>>, &'b Label> for Factory<Label>
[src]
fn offset(&self, zdd: &'a Zdd<Label>, lbl: &'b Label) -> Zdd<Label>
[src]
fn onset(&self, zdd: &'a Zdd<Label>, lbl: &'b Label) -> Zdd<Label>
[src]
fn change(&self, zdd: &'a Zdd<Label>, lbl: &'b Label) -> Zdd<Label>
[src]
impl<'a, Label: Ord + Eq + Hash + Clone> FactoryUnLblOps<Label, &'a HConsed<ZddTree<Label>>, Label> for Factory<Label>
[src]
fn offset(&self, zdd: &'a Zdd<Label>, lbl: Label) -> Zdd<Label>
[src]
fn onset(&self, zdd: &'a Zdd<Label>, lbl: Label) -> Zdd<Label>
[src]
fn change(&self, zdd: &'a Zdd<Label>, lbl: Label) -> Zdd<Label>
[src]
impl<'a, Label: Ord + Eq + Hash + Clone> FactoryUnLblOps<Label, HConsed<ZddTree<Label>>, &'a Label> for Factory<Label>
[src]
fn offset(&self, zdd: Zdd<Label>, lbl: &'a Label) -> Zdd<Label>
[src]
fn onset(&self, zdd: Zdd<Label>, lbl: &'a Label) -> Zdd<Label>
[src]
fn change(&self, zdd: Zdd<Label>, lbl: &'a Label) -> Zdd<Label>
[src]
impl<Label: Ord + Eq + Hash + Clone> FactoryUnLblOps<Label, HConsed<ZddTree<Label>>, Label> for Factory<Label>
[src]
fn offset(&self, zdd: Zdd<Label>, lbl: Label) -> Zdd<Label>
[src]
fn onset(&self, zdd: Zdd<Label>, lbl: Label) -> Zdd<Label>
[src]
fn change(&self, zdd: Zdd<Label>, lbl: Label) -> Zdd<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,
Label: RefUnwindSafe,
impl<Label> Send for Factory<Label> where
Label: Send + Sync,
Label: Send + Sync,
impl<Label> Unpin for Factory<Label> where
Label: Unpin,
Label: Unpin,
impl<Label> UnwindSafe for Factory<Label> where
Label: RefUnwindSafe,
Label: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,