Dim

Trait Dim 

Source
pub trait Dim {
    type Shape;

    // Required methods
    fn rank(&self) -> usize;
    fn size(&self) -> usize;
}
Expand description

the Dim trait is used to define a type that can be used as a raw dimension. This trait is primarily used to provide abstracted, generic interpretations of the dimensions of the ndarray crate to ensure long-term compatibility.

Required Associated Types§

Required Methods§

Source

fn rank(&self) -> usize

returns the rank of the dimension; the rank essentially speaks to the total number of axes defined by the dimension.

Source

fn size(&self) -> usize

returns the total number of elements considered by the dimension

Implementors§

Source§

impl<D> Dim for D
where D: Dimension,