pub struct Layout {
pub tys: Vec<Ty>,
pub bits: Vec<Vec<BddVariable>>,
}Expand description
Where each random variable’s bits live in the BDD.
Fields§
§tys: Vec<Ty>Declared type of each variable, indexed by VarId.
bits: Vec<Vec<BddVariable>>bits[v][i] is the BDD variable for bit i (LSB = 0) of variable v.
Implementations§
Source§impl Layout
impl Layout
Sourcepub fn interleaved(tys: &[Ty]) -> Result<Layout, BddBuildError>
pub fn interleaved(tys: &[Ty]) -> Result<Layout, BddBuildError>
Interleaved layout (module docs) for variables of the given types.
Sourcepub fn encode(&self, values: &[BigUint]) -> BddValuation
pub fn encode(&self, values: &[BigUint]) -> BddValuation
The BDD valuation that encodes values (one per variable).
§Panics
If values does not have one entry per declared variable.
Sourcepub fn decode(&self, val: &BddValuation) -> Vec<BigUint>
pub fn decode(&self, val: &BddValuation) -> Vec<BigUint>
The variable values a BDD valuation encodes.
Trait Implementations§
impl Eq for Layout
impl StructuralPartialEq for Layout
Auto Trait Implementations§
impl Freeze for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnsafeUnpin for Layout
impl UnwindSafe for Layout
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.