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§
source§impl 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§
source§impl 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
source§impl<'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