Struct espr::ir::PartialComplexEntity
source · [−]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
sourceimpl Add<Instantiables> for PartialComplexEntity
impl Add<Instantiables> for PartialComplexEntity
type Output = Instantiables
type Output = Instantiables
The resulting type after applying the +
operator.
sourcefn add(self, rhs: Instantiables) -> Instantiables
fn add(self, rhs: Instantiables) -> Instantiables
Performs the +
operation. Read more
sourceimpl Add<PartialComplexEntity> for Instantiables
impl Add<PartialComplexEntity> for Instantiables
type Output = Instantiables
type Output = Instantiables
The resulting type after applying the +
operator.
sourcefn add(self, rhs: PartialComplexEntity) -> Self
fn add(self, rhs: PartialComplexEntity) -> Self
Performs the +
operation. Read more
sourceimpl BitAnd<Instantiables> for PartialComplexEntity
impl BitAnd<Instantiables> for PartialComplexEntity
type Output = Instantiables
type Output = Instantiables
The resulting type after applying the &
operator.
sourcefn bitand(self, rhs: Instantiables) -> Instantiables
fn bitand(self, rhs: Instantiables) -> Instantiables
Performs the &
operation. Read more
sourceimpl BitAnd<PartialComplexEntity> for PartialComplexEntity
impl BitAnd<PartialComplexEntity> for PartialComplexEntity
type Output = PartialComplexEntity
type Output = PartialComplexEntity
The resulting type after applying the &
operator.
sourceimpl BitAnd<PartialComplexEntity> for Instantiables
impl BitAnd<PartialComplexEntity> for Instantiables
type Output = Instantiables
type Output = Instantiables
The resulting type after applying the &
operator.
sourcefn bitand(self, q: PartialComplexEntity) -> Instantiables
fn bitand(self, q: PartialComplexEntity) -> Instantiables
Performs the &
operation. Read more
sourceimpl Clone for PartialComplexEntity
impl Clone for PartialComplexEntity
sourcefn clone(&self) -> PartialComplexEntity
fn clone(&self) -> PartialComplexEntity
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PartialComplexEntity
impl Debug for PartialComplexEntity
sourceimpl Div<PartialComplexEntity> for Instantiables
impl Div<PartialComplexEntity> for Instantiables
type Output = Instantiables
type Output = Instantiables
The resulting type after applying the /
operator.
sourcefn div(self, rhs: PartialComplexEntity) -> Instantiables
fn div(self, rhs: PartialComplexEntity) -> Instantiables
Performs the /
operation. Read more
sourceimpl<'a> FromIterator<&'a PartialComplexEntity> for Instantiables
impl<'a> FromIterator<&'a PartialComplexEntity> for Instantiables
sourcefn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = &'a PartialComplexEntity>,
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = &'a PartialComplexEntity>,
Creates a value from an iterator. Read more
sourceimpl Ord for PartialComplexEntity
impl Ord for PartialComplexEntity
sourceimpl PartialEq<PartialComplexEntity> for PartialComplexEntity
impl PartialEq<PartialComplexEntity> for PartialComplexEntity
sourcefn eq(&self, other: &PartialComplexEntity) -> bool
fn eq(&self, other: &PartialComplexEntity) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &PartialComplexEntity) -> bool
fn ne(&self, other: &PartialComplexEntity) -> bool
This method tests for !=
.
sourceimpl PartialOrd<PartialComplexEntity> for PartialComplexEntity
impl PartialOrd<PartialComplexEntity> for PartialComplexEntity
sourcefn partial_cmp(&self, rhs: &Self) -> Option<Ordering>
fn partial_cmp(&self, rhs: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
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
sourceimpl Sub<PartialComplexEntity> for Instantiables
impl Sub<PartialComplexEntity> for Instantiables
type Output = Instantiables
type Output = Instantiables
The resulting type after applying the -
operator.
sourcefn sub(self, q: PartialComplexEntity) -> Self
fn sub(self, q: PartialComplexEntity) -> Self
Performs the -
operation. Read more
impl Eq for PartialComplexEntity
impl StructuralEq for PartialComplexEntity
impl StructuralPartialEq for PartialComplexEntity
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more