Struct sprs_suitesparse_ldl::LdlNumeric
source · [−]pub struct LdlNumeric { /* private fields */ }
Expand description
Structure holding the numeric ldlt decomposition computed by suitesparse’s ldl
Implementations
sourceimpl LdlNumeric
impl LdlNumeric
sourcepub fn new<N, I>(mat: CsMatViewI<'_, N, I>) -> Result<Self, LinalgError> where
N: Clone + Into<f64>,
I: SpIndex,
pub fn new<N, I>(mat: CsMatViewI<'_, N, I>) -> Result<Self, LinalgError> where
N: Clone + Into<f64>,
I: SpIndex,
sourcepub fn new_perm<N, I>(
mat: CsMatViewI<'_, N, I>,
perm: PermOwnedI<I>,
check_perm: PermutationCheck
) -> Result<Self, LinalgError> where
N: Clone + Into<f64>,
I: SpIndex,
pub fn new_perm<N, I>(
mat: CsMatViewI<'_, N, I>,
perm: PermOwnedI<I>,
check_perm: PermutationCheck
) -> Result<Self, LinalgError> where
N: Clone + Into<f64>,
I: SpIndex,
Compute the numeric decomposition L D L^T = P^T A P where P is a permutation matrix.
Using a good permutation matrix can reduce the non-zero count in L, thus making the decomposition and the solves faster.
Panics
- if mat is not symmetric
sourcepub fn update<N, I>(
&mut self,
mat: CsMatViewI<'_, N, I>
) -> Result<(), LinalgError> where
N: Clone + Into<f64>,
I: SpIndex,
pub fn update<N, I>(
&mut self,
mat: CsMatViewI<'_, N, I>
) -> Result<(), LinalgError> where
N: Clone + Into<f64>,
I: SpIndex,
Factor a new matrix, assuming it shares the same nonzero pattern as the matrix this factorization was built from.
Panics
If the matrix is not symmetric.
sourcepub fn solve<'a, N, V>(&self, rhs: &V) -> Vec<N> where
N: 'a + Copy + Num + Into<f64> + From<f64>,
V: Deref<Target = [N]>,
pub fn solve<'a, N, V>(&self, rhs: &V) -> Vec<N> where
N: 'a + Copy + Num + Into<f64> + From<f64>,
V: Deref<Target = [N]>,
Solve the system A x = rhs
sourcepub fn problem_size(&self) -> usize
pub fn problem_size(&self) -> usize
The size of the linear system associated with this decomposition
Trait Implementations
sourceimpl Clone for LdlNumeric
impl Clone for LdlNumeric
sourcefn clone(&self) -> LdlNumeric
fn clone(&self) -> LdlNumeric
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for LdlNumeric
impl Send for LdlNumeric
impl Sync for LdlNumeric
impl Unpin for LdlNumeric
impl UnwindSafe for LdlNumeric
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.