pub struct SparsityProfile {
pub rows: usize,
pub cols: usize,
pub nnz: usize,
pub density: f64,
pub is_diag_dominant: bool,
pub estimated_spectral_radius: f64,
pub estimated_condition: f64,
pub is_symmetric_structure: bool,
pub avg_nnz_per_row: f64,
pub max_nnz_per_row: usize,
}Expand description
Sparsity profile summarising the structural and numerical properties of a matrix that are relevant for algorithm selection.
Computed once by SolverOrchestrator::analyze_sparsity and reused
across multiple solves on the same matrix.
Fields§
§rows: usizeNumber of rows.
cols: usizeNumber of columns.
nnz: usizeTotal number of non-zero entries.
density: f64Fraction of non-zeros: nnz / (rows * cols).
is_diag_dominant: booltrue if |a_ii| > sum_{j != i} |a_ij| for every row.
estimated_spectral_radius: f64Estimated spectral radius of the Jacobi iteration matrix D^{-1}(L+U).
estimated_condition: f64Rough estimate of the 2-norm condition number.
is_symmetric_structure: booltrue if the matrix appears to be symmetric (checked on structure only).
avg_nnz_per_row: f64Average number of non-zeros per row.
max_nnz_per_row: usizeMaximum number of non-zeros in any single row.
Trait Implementations§
Source§impl Clone for SparsityProfile
impl Clone for SparsityProfile
Source§fn clone(&self) -> SparsityProfile
fn clone(&self) -> SparsityProfile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SparsityProfile
impl RefUnwindSafe for SparsityProfile
impl Send for SparsityProfile
impl Sync for SparsityProfile
impl Unpin for SparsityProfile
impl UnsafeUnpin for SparsityProfile
impl UnwindSafe for SparsityProfile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more