Trait rustlearn::array::traits::IndexableMatrix[][src]

pub trait IndexableMatrix {
    fn rows(&self) -> usize;
fn cols(&self) -> usize;
unsafe fn get_unchecked(&self, row: usize, column: usize) -> f32;
unsafe fn get_unchecked_mut(
        &mut self,
        row: usize,
        column: usize
    ) -> &mut f32; fn get(&self, row: usize, column: usize) -> f32 { ... }
fn get_mut(&mut self, row: usize, column: usize) -> &mut f32 { ... }
fn set(&mut self, row: usize, column: usize, value: f32) { ... }
unsafe fn set_unchecked(&mut self, row: usize, column: usize, value: f32) { ... } }

Trait representing a shaped matrix whose entries can be accessed at will using their row and column position.

Required Methods

Return the number of rows of the matrix.

Return the number of columns of the matrix.

Get the value of the entry at (row, column) without bounds checking.

Get a mutable reference to the value of the entry at (row, column) without bounds checking.

Provided Methods

Get the value of the entry at (row, column).

Panics

Will panic if the element accessed is out of bounds.

Get a mutable reference to value of the entry at (row, column).

Panics

Will panic if the element accessed is out of bounds.

Set the value of the entry at (row, column) to value.

Panics

Will panic if the element accessed is out of bounds.

Set the value of the entry at (row, column) to value without bounds checking.

Implementors