Struct boolean_expression::Cube [−][src]
pub struct Cube(_);
A Cube
is one (multidimensional) cube in the variable space: i.e., a
particular set of variable assignments, where each variable is assigned
either true, false, or "don't care".
Methods
impl Cube
[src]
impl Cube
pub fn true_cube(vars: usize) -> Cube
[src]
pub fn true_cube(vars: usize) -> Cube
Construct an always-true cube (all variables are DontCare
) for vars
variables.
pub fn vars(&self) -> Iter<CubeVar>
[src]
pub fn vars(&self) -> Iter<CubeVar>
Return an iterator over variable assignments.
pub fn merge_with(&self, other: &Cube) -> CubeMergeResult
[src]
pub fn merge_with(&self, other: &Cube) -> CubeMergeResult
Attempt to merge this cube with another, which may cancel one or the
other (if completely covered), expand one or the other (if possible, to
increase the number of DontCare
s and thus simplify the final
expression), or merge the two into a single cube, or do nothing.
pub fn with_var(&self, idx: usize, val: CubeVar) -> Cube
[src]
pub fn with_var(&self, idx: usize, val: CubeVar) -> Cube
Return a new cube equal to this cube, but with the particular variable
Trait Implementations
impl Clone for Cube
[src]
impl Clone for Cube
fn clone(&self) -> Cube
[src]
fn clone(&self) -> Cube
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Cube
[src]
impl Debug for Cube
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Cube
[src]
impl PartialEq for Cube
fn eq(&self, other: &Self) -> bool
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Eq for Cube
[src]
impl Eq for Cube
impl PartialOrd for Cube
[src]
impl PartialOrd for Cube
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Cube
[src]
impl Ord for Cube
fn cmp(&self, other: &Self) -> Ordering
[src]
fn cmp(&self, other: &Self) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more