Skip to main content

SparseAccess

Trait SparseAccess 

Source
pub trait SparseAccess<T>: Matrix<T> {
    // Required methods
    fn nnz(&self) -> usize;
    fn fetch_triplets(&self) -> Vec<(usize, usize, T)>;
}
Expand description

Access to a sparse matrix.

Required Methods§

Source

fn nnz(&self) -> usize

Number of non-zero elements in the matrix.

Source

fn fetch_triplets(&self) -> Vec<(usize, usize, T)>

Retrieve the triplets that identify the coefficients of the sparse matrix.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T, X> SparseAccess<T> for &X
where X: SparseAccess<T>,

Source§

fn nnz(&self) -> usize

Source§

fn fetch_triplets(&self) -> Vec<(usize, usize, T)>

Implementors§