Trait rds_tensors::tindex::TIndex [] [src]

pub trait TIndex {
    fn inc_ro(&mut self, shape: &[usize]);
fn dec_ro(&mut self, shape: &[usize]);
fn inc_co(&mut self, shape: &[usize]);
fn dec_co(&mut self, shape: &[usize]);
fn is_zero(&mut self) -> bool;
fn to_pos(&self, shape: &[usize], strides: &[usize]) -> usize; }

A trait which adds indexing functions to simplify index manipulation.

Required Methods

Increment an index in the row-major order.

Decrement an index in the row-major order.

Increment an index in the column-major order.

Decrement an index in the column-major order.

Return true if the index is zero for all dimensions.

Compute the resulting position in a linear storage array.

Implementations on Foreign Types

impl TIndex for [usize]
[src]

[src]

[src]

[src]

[src]

[src]

[src]

Implementors