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