Trait rds::array::NDSliceable [] [src]

pub trait NDSliceable<'a, T: 'a> {
    fn slice(&'a self, idx: &[usize]) -> NDSlice<'a, T>;
}

A trait for N-dimensional data which can be sliced into a immutable sub slice.

Required Methods

Take a slice of length < N representing the sub slice index and return immutable borrow of the sub slice as an NDSlice. Because the storage is in row-major order and the slice need to be contiguous in the underlying storage array it means, for example, only the rows of a matrix can be borrowed.

Implementors