# Struct boolean_expression::CubeList
[−]
[src]

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.

## Methods

`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]

`fn clone(&self) -> CubeList`

[src]

Returns a copy of the value. Read more

`fn clone_from(&mut self, source: &Self)`

1.0.0[src]

Performs copy-assignment from `source`

. Read more

`impl Debug for CubeList`

[src]

`fn fmt(&self, __arg_0: &mut Formatter) -> Result`

[src]

Formats the value using the given formatter. Read more