pub trait ColumnSource<T: Real> {
// Required methods
fn m(&self) -> usize;
fn for_each_entry<F: FnMut(u32, T)>(&self, k: usize, f: F);
fn nnz_hint(&self) -> usize;
fn validate(&self) -> Result<(), SparseError>;
}Expand description
Where the factorization reads the columns of B from (the contract’s
ColumnSource). Static dispatch only: crate::LuFactor::factorize is
generic in the source, and ColumnSource::for_each_entry takes a
generic visitor.
Required Methods§
Sourcefn for_each_entry<F: FnMut(u32, T)>(&self, k: usize, f: F)
fn for_each_entry<F: FnMut(u32, T)>(&self, k: usize, f: F)
Calls f(i, b_ik) for every stored entry of column k, rows
increasing for structural columns.
Sourcefn validate(&self) -> Result<(), SparseError>
fn validate(&self) -> Result<(), SparseError>
Checks that the source describes a square m × m matrix whose
references are in range (invariant (B1)).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<T: Real> ColumnSource<T> for (&[ColumnRef], &CscMatrix<T>)
The simplex basis: the heading cols over [A | ±I].
impl<T: Real> ColumnSource<T> for (&[ColumnRef], &CscMatrix<T>)
The simplex basis: the heading cols over [A | ±I].
Implementors§
impl<T: Real> ColumnSource<T> for CscMatrix<T>
An explicit square matrix B.