pub trait CardIdx<D: Dim>:
PartialEq
+ Sized
+ From<[usize; 0]> {
// Required methods
fn is_d0(&self) -> bool;
fn card<T>(self, vec: &impl NVecCore<D, T>) -> usize;
fn card_equality<T>(
a: &impl NVecCore<D, T>,
b: &impl NVecCore<D, T>,
) -> CardEquality<D>;
fn equality<T: PartialEq>(
a: &impl NVec<D, T>,
b: &impl NVec<D, T>,
) -> Equality<D>;
}
Expand description
Union of indices that can be used to query cardinality of any lower level dimension
of a vector with dimension D
.
Required Methods§
Sourcefn is_d0(&self) -> bool
fn is_d0(&self) -> bool
Returns whether or not the index is of dimension 0; i.e., has type [usize; 0]
.
Sourcefn card<T>(self, vec: &impl NVecCore<D, T>) -> usize
fn card<T>(self, vec: &impl NVecCore<D, T>) -> usize
Returns the cardinality of the given vec
at this index.
Sourcefn card_equality<T>(
a: &impl NVecCore<D, T>,
b: &impl NVecCore<D, T>,
) -> CardEquality<D>
fn card_equality<T>( a: &impl NVecCore<D, T>, b: &impl NVecCore<D, T>, ) -> CardEquality<D>
Returns the cardinality equality of the given vectors a
and b
at this index.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.