pub struct SPMatrix {
pub row: usize,
pub col: usize,
pub nnz: usize,
pub col_ptr: Vec<usize>,
pub row_ics: Vec<usize>,
pub data: Vec<f64>,
}
Fields
row: usize
col: usize
nnz: usize
col_ptr: Vec<usize>
row_ics: Vec<usize>
data: Vec<f64>
Implementations
sourceimpl SPMatrix
impl SPMatrix
pub fn new(row: usize, col: usize, nnz: usize) -> Self
pub fn from_dense(m: &Matrix) -> Self
pub fn to_dense(&self) -> Matrix
pub fn col_ptr(&self) -> &Vec<usize>
pub fn row_ics(&self) -> &Vec<usize>
pub fn data(&self) -> &Vec<f64>
pub fn transpose(&self) -> Self
pub fn t(&self) -> Self
Trait Implementations
sourceimpl LinearAlgebra for SPMatrix
impl LinearAlgebra for SPMatrix
Linear algebra for sparse matrix
Caution : In every ops in this trait, there is converting process to dense matrix
fn back_subs(&self, _b: &Vec<f64>) -> Vec<f64>
fn forward_subs(&self, _b: &Vec<f64>) -> Vec<f64>
fn lu(&self) -> PQLU
fn waz(&self, _d_form: Form) -> Option<WAZD>
fn qr(&self) -> QR
fn det(&self) -> f64
fn block(&self) -> (Matrix, Matrix, Matrix, Matrix)
fn inv(&self) -> Matrix
fn pseudo_inv(&self) -> Matrix
fn rref(&self) -> Matrix
fn solve(&self, _b: &Vec<f64>, _sk: SolveKind) -> Vec<f64>
fn solve_mat(&self, _m: &Matrix, _sk: SolveKind) -> Matrix
fn svd(&self) -> SVD
fn cholesky(&self, uplo: UPLO) -> Matrix
fn is_symmetric(&self) -> bool
sourceimpl<'a, 'b> Mul<&'b Vec<f64, Global>> for &'a SPMatrix
impl<'a, 'b> Mul<&'b Vec<f64, Global>> for &'a SPMatrix
Reference version of matrix multiplication with vector
Auto Trait Implementations
impl RefUnwindSafe for SPMatrix
impl Send for SPMatrix
impl Sync for SPMatrix
impl Unpin for SPMatrix
impl UnwindSafe for SPMatrix
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more