pub struct CubeList(/* private fields */);Expand description
A CubeList is a sum (OR’d list) of cubes. It represents a Boolean
expression in sum-of-products form, by construction.
The CubeList abstraction supports only indexed anonymous variables
(variable 0, 1, …), and does not (yet) have a wrapper supporting an
arbitrary terminal type T. This may be implemented in the future.
The CubeList abstraction is used internally to convert from a BDD
to a quasi-minimized Boolean expression.
Implementations§
Source§impl CubeList
impl CubeList
Sourcepub fn from_list(cubes: &[Cube]) -> CubeList
pub fn from_list(cubes: &[Cube]) -> CubeList
Construct a cube list from a list of Cube structs.
Sourcepub fn merge(&self, other: &CubeList) -> CubeList
pub fn merge(&self, other: &CubeList) -> CubeList
Merge this cube list with another, canceling or merging cubes where possible. The resulting cube list is not guaranteed to be minimal (that is the set-cover problem, which is NP-Complete), but is reduced somewhat by a very simple reduction/merging algorithm.
pub fn with_var(&self, idx: usize, val: CubeVar) -> CubeList
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CubeList
impl RefUnwindSafe for CubeList
impl Send for CubeList
impl Sync for CubeList
impl Unpin for CubeList
impl UnwindSafe for CubeList
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more