Struct espr::ir::PartialComplexEntity [−][src]
Expand description
Partial complex entity data type, e.g. $A \And B \And C$ in ISO document
Each component, e.g. $A$, will be represented by an index. $\And$ operation is implemented by std::ops::BitAnd trait. This satisfies following equations:
- $A \And A = A$
let a = PartialComplexEntity::new(&[1]);
assert_eq!(a.clone() & a.clone(), a);
- $A \And B = B \And A$
let a = PartialComplexEntity::new(&[1]);
let b = PartialComplexEntity::new(&[2]);
assert_eq!(a.clone() & b.clone(), b & a);
- $A \And (B \And C) = (A \And B) \And C = A \And B \And C$
let a = PartialComplexEntity::new(&[1]);
let b = PartialComplexEntity::new(&[3]);
let c = PartialComplexEntity::new(&[2]);
assert_eq!(
(a.clone() & b.clone()) & c.clone(),
a.clone() & (b.clone() & c.clone())
);
assert_eq!(a & b & c, PartialComplexEntity::new(&[1, 2, 3]));
Fields
indices: Vec<usize>
Sorted and non-duplicated indices
Implementations
Trait Implementations
type Output = Instantiables
type Output = Instantiables
The resulting type after applying the +
operator.
Performs the +
operation. Read more
type Output = Instantiables
type Output = Instantiables
The resulting type after applying the &
operator.
Performs the &
operation. Read more
type Output = Instantiables
type Output = Instantiables
The resulting type after applying the &
operator.
Performs the &
operation. Read more
type Output = Instantiables
type Output = Instantiables
The resulting type after applying the /
operator.
Performs the /
operation. Read more
Creates a value from an iterator. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for PartialComplexEntity
impl Send for PartialComplexEntity
impl Sync for PartialComplexEntity
impl Unpin for PartialComplexEntity
impl UnwindSafe for PartialComplexEntity
Blanket Implementations
Mutably borrows from an owned value. Read more