pub struct Subst<F, VS = Vec<VarNo>, RS = Vec<F>> { /* private fields */ }Expand description
Substitution mapping variables to replacement functions, created from slices of functions
VS and RS are the storage types, and can, e.g., be Vecs or slices.
Implementations§
Source§impl<F, VS: AsRef<[VarNo]>, RS: AsRef<[F]>> Subst<F, VS, RS>
impl<F, VS: AsRef<[VarNo]>, RS: AsRef<[F]>> Subst<F, VS, RS>
Sourcepub fn new(vars: VS, replacements: RS) -> Self
pub fn new(vars: VS, replacements: RS) -> Self
Create a new substitution to replace the i-th variable of vars by the
i-th function in replacement
All variables of vars should be distinct. Furthermore, variables must
be handles for the respective decision diagram levels, e.g., the
respective Boolean function for B(C)DDs, and a singleton set for ZBDDs.
Panics if vars and replacements have different length
Trait Implementations§
impl<F, VS: Copy, RS: Copy> Copy for Subst<F, VS, RS>
Source§impl<'a, F, VS: AsRef<[VarNo]>, RS: AsRef<[F]>> Substitution for &'a Subst<F, VS, RS>
impl<'a, F, VS: AsRef<[VarNo]>, RS: AsRef<[F]>> Substitution for &'a Subst<F, VS, RS>
Source§type Replacement = &'a F
type Replacement = &'a F
Replacement type
Source§fn pairs(&self) -> impl ExactSizeIterator<Item = (VarNo, Self::Replacement)>
fn pairs(&self) -> impl ExactSizeIterator<Item = (VarNo, Self::Replacement)>
Iterate over pairs of variable and replacement
Auto Trait Implementations§
impl<F, VS, RS> Freeze for Subst<F, VS, RS>
impl<F, VS, RS> RefUnwindSafe for Subst<F, VS, RS>where
VS: RefUnwindSafe,
RS: RefUnwindSafe,
impl<F, VS, RS> Send for Subst<F, VS, RS>
impl<F, VS, RS> Sync for Subst<F, VS, RS>
impl<F, VS, RS> Unpin for Subst<F, VS, RS>
impl<F, VS, RS> UnsafeUnpin for Subst<F, VS, RS>where
VS: UnsafeUnpin,
RS: UnsafeUnpin,
impl<F, VS, RS> UnwindSafe for Subst<F, VS, RS>where
VS: UnwindSafe,
RS: UnwindSafe,
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