[][src]Struct boolean_expression::CubeList

pub struct CubeList(_);

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

impl CubeList[src]

pub fn new() -> CubeList[src]

Construct a new, empty, cube list (equivalent to a constant false).

pub fn from_list(cubes: &[Cube]) -> CubeList[src]

Construct a cube list from a list of Cube structs.

pub fn cubes(&self) -> Iter<Cube>[src]

Return an iterator over all cubes.

pub fn merge(&self, other: &CubeList) -> CubeList[src]

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[src]

Trait Implementations

impl Clone for CubeList[src]

impl Debug for CubeList[src]

impl PartialEq<CubeList> for CubeList[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.