Struct scirust::matrix::view::MatrixView
[−]
[src]
pub struct MatrixView<'a, T: 'a + MagmaBase> { // some fields omitted }
Defines a view on a matrix.
A view on a matrix is a subset of chosen rows and columns.
Methods
impl<'a, T: MagmaBase> MatrixView<'a, T>
Static functions for creating a view
fn new(m: &Matrix<T>, start_row: usize, start_col: usize, num_rows: usize, num_cols: usize) -> MatrixView<T>
impl<'a, T: MagmaBase> MatrixView<'a, T>
Basic methods for a view
fn start_row(&self) -> usize
Returns the start row
fn start_col(&self) -> usize
Returns the start column
fn matrix(&self) -> &'a Matrix<T>
Returns the underlying matrix reference
impl<'a, T: FieldPartial> MatrixView<'a, T>
Basic methods for a view of a matrix of numbers
fn copy_from(&mut self, rhs: &MatrixView<T>)
Copies data from other view
fn copy_scaled_from(&mut self, rhs: &MatrixView<T>, scale: T)
Copies data from other view with scale factor
impl<'a, T: MagmaBase> MatrixView<'a, T>
Functions to construct new views out of a view and other conversions
impl<'a, T: CommutativeMonoidAddPartial + PartialOrd> MatrixView<'a, T>
fn min_scalar(&self) -> (T, usize, usize)
fn max_scalar(&self) -> (T, usize, usize)
fn min_scalar_value(&self) -> T
Returns the minimum scalar value
fn max_scalar_value(&self) -> T
Returns the maximum scalar value
Trait Implementations
impl<'a, T: MagmaBase> Strided for MatrixView<'a, T>
Strided buffer
impl<'a, T: MagmaBase> MatrixBuffer<T> for MatrixView<'a, T>
Implement Buffer API for matrix view
fn as_ptr(&self) -> *const T
fn as_mut_ptr(&mut self) -> *mut T
fn cell_to_offset(&self, r: usize, c: usize) -> isize
fn start_offset(&self) -> isize
impl<'a, T: MagmaBase> Shape<T> for MatrixView<'a, T>
Implementation of common matrix methods
fn num_rows(&self) -> usize
fn num_cols(&self) -> usize
fn size(&self) -> (usize, usize)
fn num_cells(&self) -> usize
unsafe fn get_unchecked(&self, r: usize, c: usize) -> T
fn set(&mut self, r: usize, c: usize, value: T)
fn is_row(&self) -> bool
fn is_col(&self) -> bool
fn is_scalar(&self) -> bool
fn is_vector(&self) -> bool
fn is_empty(&self) -> bool
fn is_square(&self) -> bool
fn get(&self, r: usize, c: usize) -> Option<T>
fn index_to_cell(&self, index: usize) -> (usize, usize)
fn cell_to_index(&self, r: usize, c: usize) -> usize
fn smaller_dim(&self) -> usize
fn larger_dim(&self) -> usize
impl<'a, T: FieldPartial> NumberMatrix<T> for MatrixView<'a, T>
Implementation of methods related to matrices of numbers
fn is_identity(&self) -> bool
fn is_diagonal(&self) -> bool
fn is_lt(&self) -> bool
fn is_ut(&self) -> bool
fn is_symmetric(&self) -> bool
fn trace(&self) -> T
fn is_triangular(&self) -> bool
impl<'a, T: FieldPartial> StridedNumberMatrix<T> for MatrixView<'a, T>
impl<'a, T: FieldPartial + Float> StridedFloatMatrix<T> for MatrixView<'a, T>
impl<'a, T: MagmaBase> Introspection for MatrixView<'a, T>
Introspection support
fn is_matrix_view_type(&self) -> bool
fn is_standard_matrix_type(&self) -> bool
fn is_triangular_matrix_type(&self) -> bool
impl<'a, 'b, 'c, 'd, T: CommutativeMonoidAddPartial> Add<&'b MatrixView<'d, T>> for &'a MatrixView<'c, T>
View + View = Matrix addition
type Output = Matrix<T>
fn add(self, rhs: &'b MatrixView<T>) -> Matrix<T>
impl<'a, T: MagmaBase> Debug for MatrixView<'a, T>
impl<'a, T: MagmaBase> Display for MatrixView<'a, T>
impl<'a, T: MagmaBase> Conversion<T> for MatrixView<'a, T>
Implements matrix conversion API
fn to_std_vec(&self) -> Vec<T>
fn to_scalar(&self) -> T
impl<'a, T: CommutativeMonoidAddPartial + Signed + PartialOrd> MinMaxAbs<T> for MatrixView<'a, T>
Implementation of min-max with absolute values API for matrix view
fn min_abs_scalar(&self) -> (T, usize, usize)
fn max_abs_scalar(&self) -> (T, usize, usize)
impl<'a, T: MagmaBase + Num> ERO<T> for MatrixView<'a, T>
Implementation of Elementary row operations.
fn ero_scale_add(&mut self, i: usize, j: isize, scale: T) -> &mut MatrixView<'a, T>
fn ero_switch(&mut self, i: usize, j: usize) -> &mut Self
fn ero_scale(&mut self, r: usize, scale: T) -> &mut Self
fn ero_scale_slice(&mut self, r: usize, scale: T, start: usize, end: usize) -> &mut Self
impl<'a, T: MagmaBase + Num> ECO<T> for MatrixView<'a, T>
Implementation of Elementary column operations.
fn eco_scale_add(&mut self, i: usize, j: isize, scale: T) -> &mut MatrixView<'a, T>
fn eco_switch(&mut self, i: usize, j: usize) -> &mut Self
fn eco_scale(&mut self, c: usize, scale: T) -> &mut Self
fn eco_scale_slice(&mut self, c: usize, scale: T, start: usize, end: usize) -> &mut Self
impl<'a, T: CommutativeMonoidAddPartial> Extraction<T> for MatrixView<'a, T>
Implement extraction API for matrix view