Trait GridTrait

Source
pub trait GridTrait<T>:
    Clone
    + Debug
    + Send
    + Sync
where T: Copy,
{ // Required methods fn get_borders(&self) -> &Array1<T>; fn idx(&self, x: T) -> CellIndex; // Provided methods fn cell_count(&self) -> usize { ... } fn get_start(&self) -> T { ... } fn get_end(&self) -> T { ... } }
Expand description

Grid trait for dm or dt axis

Required Methods§

Source

fn get_borders(&self) -> &Array1<T>

Cell borders coordinates, cell_count() + 1 length Array1

Source

fn idx(&self, x: T) -> CellIndex

Get index of the cell containing given value

Note that cells include their left borders but doesn’t include right borders

Provided Methods§

Source

fn cell_count(&self) -> usize

Number of cells

Source

fn get_start(&self) -> T

Coordinate of the left border of the leftmost cell

Source

fn get_end(&self) -> T

Coordinate of the right border of the rightmost cell

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> GridTrait<T> for Grid<T>
where T: Float,

Source§

impl<T> GridTrait<T> for ArrayGrid<T>
where T: Float,

Source§

impl<T> GridTrait<T> for LgGrid<T>
where T: Float,

Source§

impl<T> GridTrait<T> for LinearGrid<T>
where T: Float,