Trait Array

Source
pub trait Array<T: Debug + Display + Copy + Sized, S>: Debug {
    // Required methods
    fn get(&self, pos: S) -> &T;
    fn shape(&self) -> S;
    fn is_empty(&self) -> bool;
    fn iterator<'b>(&'b self, axis: u8) -> Box<dyn Iterator<Item = &'b T> + 'b>;
}
Expand description

Abstract methods for Array

Required Methods§

Source

fn get(&self, pos: S) -> &T

retrieve a reference to a value at position

Source

fn shape(&self) -> S

return shape of the array

Source

fn is_empty(&self) -> bool

return true if array is empty

Source

fn iterator<'b>(&'b self, axis: u8) -> Box<dyn Iterator<Item = &'b T> + 'b>

iterate over array’s values

Implementations on Foreign Types§

Source§

impl<T: Debug + Display + Copy + Sized> Array<T, usize> for &[T]

Source§

fn get(&self, i: usize) -> &T

Source§

fn shape(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

fn iterator<'b>(&'b self, axis: u8) -> Box<dyn Iterator<Item = &'b T> + 'b>

Source§

impl<T: Debug + Display + Copy + Sized> Array<T, usize> for Vec<T>

Source§

fn get(&self, i: usize) -> &T

Source§

fn shape(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

fn iterator<'b>(&'b self, axis: u8) -> Box<dyn Iterator<Item = &'b T> + 'b>

Implementors§

Source§

impl<T: Debug + Display + Copy + Sized> Array<T, (usize, usize)> for DenseMatrix<T>

Source§

impl<T: Debug + Display + Copy + Sized> Array<T, (usize, usize)> for DenseMatrixMutView<'_, T>

Source§

impl<T: Debug + Display + Copy + Sized> Array<T, (usize, usize)> for DenseMatrixView<'_, T>

Source§

impl<T: Debug + Display + Copy + Sized> Array<T, usize> for DenseMatrixView<'_, T>

Source§

impl<T: Debug + Display + Copy + Sized> Array<T, usize> for VecMutView<'_, T>

Source§

impl<T: Debug + Display + Copy + Sized> Array<T, usize> for VecView<'_, T>