pub trait MatrixSparsity<M: Matrix>: Sized + Clone {
// Required methods
fn nrows(&self) -> IndexType;
fn ncols(&self) -> IndexType;
fn is_sparse() -> bool;
fn try_from_indices(
nrows: IndexType,
ncols: IndexType,
indices: Vec<(IndexType, IndexType)>,
) -> Result<Self, LaError>;
fn indices(&self) -> Vec<(IndexType, IndexType)>;
fn union(self, other: M::SparsityRef<'_>) -> Result<M::Sparsity, LaError>;
fn new_diagonal(n: IndexType) -> Self;
fn as_ref(&self) -> M::SparsityRef<'_>;
fn get_index(
&self,
indices: &[(IndexType, IndexType)],
ctx: <M::V as VectorCommon>::C,
) -> <M::V as Vector>::Index;
}Required Methods§
fn nrows(&self) -> IndexType
fn ncols(&self) -> IndexType
fn is_sparse() -> bool
fn try_from_indices( nrows: IndexType, ncols: IndexType, indices: Vec<(IndexType, IndexType)>, ) -> Result<Self, LaError>
fn indices(&self) -> Vec<(IndexType, IndexType)>
fn union(self, other: M::SparsityRef<'_>) -> Result<M::Sparsity, LaError>
fn new_diagonal(n: IndexType) -> Self
fn as_ref(&self) -> M::SparsityRef<'_>
fn get_index( &self, indices: &[(IndexType, IndexType)], ctx: <M::V as VectorCommon>::C, ) -> <M::V as Vector>::Index
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".