Trait scirust::matrix::extract::traits::Extraction
[−]
[src]
pub trait Extraction<T: CommutativeMonoidAddPartial>: Shape<T> { fn row(&self, r: isize) -> Matrix<T>; fn col(&self, c: isize) -> Matrix<T>; fn sub_matrix(&self, start_row: isize, start_col: isize, num_rows: usize, num_cols: usize) -> Matrix<T>; fn ut_matrix(&self) -> Matrix<T>; fn lt_matrix(&self) -> Matrix<T>; }
Matrix extraction API
Required Methods
fn row(&self, r: isize) -> Matrix<T>
Returns the r'th row vector
fn col(&self, c: isize) -> Matrix<T>
Returns the c'th column vector
fn sub_matrix(&self, start_row: isize, start_col: isize, num_rows: usize, num_cols: usize) -> Matrix<T>
Extract a submatrix from the matrix rows can easily repeat if the number of requested rows is higher than actual rows cols can easily repeat if the number of requested cols is higher than actual cols
fn ut_matrix(&self) -> Matrix<T>
Returns the upper triangular part of the matrix
fn lt_matrix(&self) -> Matrix<T>
Returns the lower triangular part of the matrix
Implementors
impl<T: CommutativeMonoidAddPartial> Extraction<T> for TriangularMatrix<T>
impl<T: CommutativeMonoidAddPartial> Extraction<T> for Matrix<T>
impl<'a, T: CommutativeMonoidAddPartial> Extraction<T> for MatrixView<'a, T>