pub struct SparsePattern {
pub entries: Vec<(usize, usize)>,
pub nrows: usize,
pub n_cols: usize,
pub row_indices: Vec<Vec<usize>>,
pub col_indices: Vec<Vec<usize>>,
}Expand description
Represents a sparsity pattern
Fields§
§entries: Vec<(usize, usize)>Non-zero entries as (row, col) pairs
nrows: usizeNumber of rows
n_cols: usizeNumber of columns
row_indices: Vec<Vec<usize>>Row-wise non-zero indices
col_indices: Vec<Vec<usize>>Column-wise non-zero indices
Implementations§
Source§impl SparsePattern
impl SparsePattern
Sourcepub fn is_sparse(&self, threshold: f64) -> bool
pub fn is_sparse(&self, threshold: f64) -> bool
Check if pattern is sparse enough to benefit from sparse methods
Sourcepub fn compute_coloring(&self) -> ColGrouping
pub fn compute_coloring(&self) -> ColGrouping
Compute coloring for efficient Jacobian computation
Trait Implementations§
Source§impl Clone for SparsePattern
impl Clone for SparsePattern
Source§fn clone(&self) -> SparsePattern
fn clone(&self) -> SparsePattern
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 SparsePattern
impl RefUnwindSafe for SparsePattern
impl Send for SparsePattern
impl Sync for SparsePattern
impl Unpin for SparsePattern
impl UnwindSafe for SparsePattern
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more