pub struct Subst<F, S = Vec<F>> { /* private fields */ }Expand description
Substitution mapping variables to replacement functions, created from slices of functions
S is the storage type, and can, e.g., be Vec<F> or &[F].
Implementations§
source§impl<F, S: AsRef<[F]>> Subst<F, S>
impl<F, S: AsRef<[F]>> Subst<F, S>
sourcepub fn new(vars: S, replacements: S) -> Self
pub fn new(vars: S, replacements: S) -> 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§
source§impl<'a, F, S: AsRef<[F]>> Substitution for &'a Subst<F, S>
impl<'a, F, S: AsRef<[F]>> Substitution for &'a Subst<F, S>
source§type Replacement = &'a F
type Replacement = &'a F
Replacement type
source§fn pairs(&self) -> impl ExactSizeIterator<Item = (Self::Var, Self::Replacement)>
fn pairs(&self) -> impl ExactSizeIterator<Item = (Self::Var, Self::Replacement)>
Iterate over pairs of variable and replacement
impl<F, S: Copy> Copy for Subst<F, S>
Auto Trait Implementations§
impl<F, S> Freeze for Subst<F, S>where
S: Freeze,
impl<F, S> RefUnwindSafe for Subst<F, S>where
S: RefUnwindSafe,
impl<F, S> Send for Subst<F, S>where
S: Send,
impl<F, S> Sync for Subst<F, S>where
S: Sync,
impl<F, S> Unpin for Subst<F, S>where
S: Unpin,
impl<F, S> UnwindSafe for Subst<F, S>where
S: 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)