pub enum DecompositionType {
None,
Independent,
Identity,
Negation,
And,
Or,
Le,
Lt,
Xor,
}Expand description
Basic boolean function families to describe decompositions
Variants§
None
No valid decomposition with this variable
Independent
The function is independent of this variable
Identity
The function returns this variable
Negation
The function returns the negation of this variable
And
Decomposition possible as And
Or
Decomposition possible as Or
Le
Decomposition possible as Less-Or-Equal (equivalent to Nand for a top decomposition)
Lt
Decomposition possible as Less-Than (equivalent to Nor for a top decomposition)
Xor
Decomposition possible as Xor
Implementations§
Source§impl DecompositionType
impl DecompositionType
Sourcepub fn is_trivial(&self) -> bool
pub fn is_trivial(&self) -> bool
Returns whether the decomposition is trivial (independent, x or !x)
Sourcepub fn is_and_type(&self) -> bool
pub fn is_and_type(&self) -> bool
Returns whether the decomposition is based on an and gate or similar
Sourcepub fn is_xor_type(&self) -> bool
pub fn is_xor_type(&self) -> bool
Returns whether the decomposition is based on a xor gate
Sourcepub fn is_simple_gate(&self) -> bool
pub fn is_simple_gate(&self) -> bool
Returns whether the decomposition is based on any 2-input gate
Trait Implementations§
Source§impl Debug for DecompositionType
impl Debug for DecompositionType
Source§impl Hash for DecompositionType
impl Hash for DecompositionType
Source§impl PartialEq for DecompositionType
impl PartialEq for DecompositionType
impl Eq for DecompositionType
impl StructuralPartialEq for DecompositionType
Auto Trait Implementations§
impl Freeze for DecompositionType
impl RefUnwindSafe for DecompositionType
impl Send for DecompositionType
impl Sync for DecompositionType
impl Unpin for DecompositionType
impl UnwindSafe for DecompositionType
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> 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