Trait parry2d_f64::utils::Array2

source ·
pub trait Array2 {
    type Item;

    // Required methods
    fn nrows(&self) -> usize;
    fn ncols(&self) -> usize;
    fn get(&self, i: usize, j: usize) -> Self::Item;
    fn set(&mut self, i: usize, j: usize, val: Self::Item);
}
Expand description

Abstraction over a 2D array.

Required Associated Types§

source

type Item

The type of heights.

Required Methods§

source

fn nrows(&self) -> usize

The number of rows of the heights grid.

source

fn ncols(&self) -> usize

The number of columns of the heights grid.

source

fn get(&self, i: usize, j: usize) -> Self::Item

Gets the height on the (i, j)-th cell of the height grid.

source

fn set(&mut self, i: usize, j: usize, val: Self::Item)

Sets the height on the (i, j)-th cell of the height grid.

Implementations on Foreign Types§

source§

impl<T: Scalar> Array2 for DMatrix<T>

§

type Item = T

source§

fn nrows(&self) -> usize

source§

fn ncols(&self) -> usize

source§

fn get(&self, i: usize, j: usize) -> Self::Item

source§

fn set(&mut self, i: usize, j: usize, val: Self::Item)

Implementors§