extendr_api::wrapper::matrix

Trait Offset

Source
trait Offset<D> {
    // Required method
    fn offset(&self, idx: D) -> usize;
}

Required Methods§

Source

fn offset(&self, idx: D) -> usize

Get the offset into the array for a given index.

Implementors§

Source§

impl<T> Offset<[usize; 1]> for RArray<T, [usize; 1]>

Source§

impl<T> Offset<[usize; 2]> for RArray<T, [usize; 2]>

Source§

impl<T> Offset<[usize; 3]> for RArray<T, [usize; 3]>