Matrix

Trait Matrix 

Source
pub trait Matrix<'a, T, I>
where Self: Tensor<T, I, MatrixAddress<I>, 2>, T: 'static, I: Coordinate,
{ // Required methods fn row_count(&self) -> I; fn column_count(&self) -> I; fn iter(&'a self) -> MatrixValueIterator<'a, T, I> ; fn addresses(&self) -> MatrixForwardIterator<I> ; fn indexed_iter(&'a self) -> MatrixForwardIndexedIterator<'a, T, I> ; fn row(&'a self, row_num: I) -> Option<Row<'a, T, I>>; fn column(&'a self, col_num: I) -> Option<Column<'a, T, I>>; fn rows(&'a self) -> MatrixRowsIterator<'a, T, I> ; fn columns(&'a self) -> MatrixColumnsIterator<'a, T, I> ; }
Expand description

Matrix is a rectangular store of type T, providing a variety of useful iterator patterns.

Required Methods§

Source

fn row_count(&self) -> I

row_count returns the number of horizontal rows stored in the Matrix.

Source

fn column_count(&self) -> I

column_count returns the number of vertical columns stored in the Matrix.

Source

fn iter(&'a self) -> MatrixValueIterator<'a, T, I>

iter iterates over the values in a matrix in row-major order.

Source

fn addresses(&self) -> MatrixForwardIterator<I>

addresses iterates over the addresses in a Matrix in row-major order.

Source

fn indexed_iter(&'a self) -> MatrixForwardIndexedIterator<'a, T, I>

indexed_iter returns addresses and their cell’s contents as an iterator.

Source

fn row(&'a self, row_num: I) -> Option<Row<'a, T, I>>

row retrieves a row by index. None is returned for out of bounds row numbers.

Source

fn column(&'a self, col_num: I) -> Option<Column<'a, T, I>>

column retrieves a column by index. None is returned for out of bounds column numbers.

Source

fn rows(&'a self) -> MatrixRowsIterator<'a, T, I>

rows returns an iterator over the rows of the matrix.

Source

fn columns(&'a self) -> MatrixColumnsIterator<'a, T, I>

columns returns an iterator over the columns of the matrix.

Implementors§

Source§

impl<'a, T, I> Matrix<'a, T, I> for DenseMatrix<T, I>
where T: 'static + 'a, I: Coordinate,