pub struct Pattern {
pub n_rows: usize,
pub col_ptr: Vec<usize>,
pub row_idx: Vec<u32>,
}Expand description
The structure of a compressed sparse column matrix without its values (invariant (P2)): what the orderings of Chapter 5.10 consume.
Fields§
§n_rows: usizeNumber of rows m.
col_ptr: Vec<usize>Column pointers, length n + 1.
row_idx: Vec<u32>Row indices, strictly increasing inside each column.
Implementations§
Source§impl Pattern
impl Pattern
Sourcepub fn from_raw_parts(
n_rows: usize,
col_ptr: Vec<usize>,
row_idx: Vec<u32>,
) -> Result<Self, SparseError>
pub fn from_raw_parts( n_rows: usize, col_ptr: Vec<usize>, row_idx: Vec<u32>, ) -> Result<Self, SparseError>
The pattern with the given arrays, validated ((P2)).
Sourcepub fn symmetric(&self) -> Result<Self, SparseError>
pub fn symmetric(&self) -> Result<Self, SparseError>
S + Sᵀ (Algorithm S); the diagonal entries of S are kept, none
is added. An error unless S is square.
Sourcepub fn ata(&self) -> Self
pub fn ata(&self) -> Self
The pattern of SᵀS (Algorithm G), diagonal included: an n × n
symmetric pattern.
Sourcepub fn cholesky_nnz(&self, perm: &Perm) -> Result<usize, SparseError>
pub fn cholesky_nnz(&self, perm: &Perm) -> Result<usize, SparseError>
nnz(L), diagonal included, of the Cholesky factor of
P (S + Sᵀ) Pᵀ for the permutation perm (Algorithm E): the fill
an ordering yields. An error unless S is square with perm of the
same order.
Sourcepub fn check_invariants(&self) -> Result<(), SparseError>
pub fn check_invariants(&self) -> Result<(), SparseError>
Checks invariant (P2).
Trait Implementations§
impl Eq for Pattern
impl StructuralPartialEq for Pattern
Auto Trait Implementations§
impl Forget for Pattern
impl Freeze for Pattern
impl RefUnwindSafe for Pattern
impl Send for Pattern
impl Sync for Pattern
impl Unpin for Pattern
impl UnsafeUnpin for Pattern
impl UnwindSafe for Pattern
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