pub trait SparseMatrix<'a>{
    type Value: 'a + ValueType;
    type Index: 'a + IndexType;
    type IterRow: Iterator<Item = (&'a Self::Index, &'a Self::Value)>;
    const UNSET: Self::Index = <Self::Index>::MAX;
Show 29 methods
    // Required methods
    fn iter_row(&'a self, row: usize) -> Self::IterRow;
    fn with_capacity(cap: usize) -> Self;
    fn n_rows(&self) -> usize;
    fn n_cols(&self) -> usize;
    fn n_non_zero_entries(&self) -> usize;
    fn get(&self, i: usize, j: usize) -> Self::Value;
    fn get_mut(&mut self, i: usize, j: usize) -> &mut Self::Value;
    fn scale(&mut self, rhs: Self::Value);
    // Provided methods
    fn iter(&'a self) -> Iter<'_, Self> ⓘ { ... }
    fn new() -> Self { ... }
    fn eye(dim: usize) -> Self { ... }
    fn empty(&self) -> bool { ... }
    fn add<S>(&'a mut self, rhs: &'a S)
       where S: SparseMatrix<'a, Value = Self::Value> { ... }
    fn sub<S>(&'a mut self, rhs: &'a S)
       where S: SparseMatrix<'a, Value = Self::Value> { ... }
    fn mvp<V>(&'a self, rhs: &V) -> V
       where V: Vector<'a, Value = Self::Value> { ... }
    fn inner_prod<V>(&'a self, lhs: &V, rhs: &V) -> Self::Value
       where V: Vector<'a, Value = Self::Value> { ... }
    fn transpose(&'a self) -> Self { ... }
    fn prod<M>(&'a self, rhs: &'a M) -> Result<Self, SparseMatError>
       where M: ColumnIter<'a, Index = Self::Index, Value = Self::Value> { ... }
    fn is_symmetric(&'a self) -> bool { ... }
    fn set(&mut self, i: usize, j: usize, val: Self::Value) { ... }
    fn add_to(&mut self, i: usize, j: usize, val: Self::Value) { ... }
    fn density(&self) -> f64 { ... }
    fn sparsity(&self) -> f64 { ... }
    fn is_sorted_row(&'a self, i: usize) -> bool { ... }
    fn is_sorted(&'a self) -> bool { ... }
    fn get_row(&'a self, i: usize) -> SparseVec<Self::Value, Self::Index> { ... }
    fn to_string_row(&'a self, i: usize) -> String { ... }
    fn to_string(&'a self) -> String { ... }
    fn to_pbm(&'a self, filename: String) { ... }
}Provided Associated Constants§
Required Associated Types§
type Value: 'a + ValueType
type Index: 'a + IndexType
type IterRow: Iterator<Item = (&'a Self::Index, &'a Self::Value)>
Required Methods§
fn iter_row(&'a self, row: usize) -> Self::IterRow
fn with_capacity(cap: usize) -> Self
fn n_rows(&self) -> usize
fn n_cols(&self) -> usize
fn n_non_zero_entries(&self) -> usize
fn get(&self, i: usize, j: usize) -> Self::Value
fn get_mut(&mut self, i: usize, j: usize) -> &mut Self::Value
fn scale(&mut self, rhs: Self::Value)
Provided Methods§
fn iter(&'a self) -> Iter<'_, Self> ⓘ
fn new() -> Self
fn eye(dim: usize) -> Self
fn empty(&self) -> bool
fn add<S>(&'a mut self, rhs: &'a S)where
    S: SparseMatrix<'a, Value = Self::Value>,
fn sub<S>(&'a mut self, rhs: &'a S)where
    S: SparseMatrix<'a, Value = Self::Value>,
fn mvp<V>(&'a self, rhs: &V) -> V
fn inner_prod<V>(&'a self, lhs: &V, rhs: &V) -> Self::Value
fn transpose(&'a self) -> Self
fn prod<M>(&'a self, rhs: &'a M) -> Result<Self, SparseMatError>
fn is_symmetric(&'a self) -> bool
fn set(&mut self, i: usize, j: usize, val: Self::Value)
fn add_to(&mut self, i: usize, j: usize, val: Self::Value)
fn density(&self) -> f64
fn sparsity(&self) -> f64
fn is_sorted_row(&'a self, i: usize) -> bool
fn is_sorted(&'a self) -> bool
fn get_row(&'a self, i: usize) -> SparseVec<Self::Value, Self::Index>
fn to_string_row(&'a self, i: usize) -> String
fn to_string(&'a self) -> String
fn to_pbm(&'a self, filename: String)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.