Trait ndshape::Shape[][src]

pub trait Shape<T, const N: usize> {
    fn size(&self) -> T;
fn linearize(&self, p: [T; N]) -> T;
fn delinearize(&self, i: T) -> [T; N]; }
Expand description

The shape of an N-dimensional array.

Required methods

The number of elements in an array with this shape.

Translate an N-dimensional vector into a single number T that can be used for linear indexing.

The inverse of linearize.

Implementors