Struct nalgebra_sparse::factorization::CscCholesky [−][src]
A sparse Cholesky factorization A = L L^T
of a CscMatrix
.
The factor L
is a sparse, lower-triangular matrix. See the article on Wikipedia for
more information.
The implementation is a port of the CsCholesky
implementation in nalgebra
. It is similar
to Tim Davis’ CSparse
. The current implementation performs no fill-in reduction, and can
therefore be expected to produce much too dense Cholesky factors for many matrices.
It is therefore not currently recommended to use this implementation for serious projects.
Implementations
impl<T: RealField> CscCholesky<T>
[src]
pub fn factor_numerical(
symbolic: CscSymbolicCholesky,
values: &[T]
) -> Result<Self, CholeskyError>
[src]
symbolic: CscSymbolicCholesky,
values: &[T]
) -> Result<Self, CholeskyError>
Computes the numerical Cholesky factorization associated with the given symbolic factorization and the provided values.
The values correspond to the non-zero values of the CSC matrix for which the symbolic factorization was computed.
Errors
Returns an error if the numerical factorization fails. This can occur if the matrix is not symmetric positive definite.
Panics
Panics if the number of values differ from the number of non-zeros of the sparsity pattern of the matrix that was symbolically factored.
pub fn factor(matrix: &CscMatrix<T>) -> Result<Self, CholeskyError>
[src]
Computes the Cholesky factorization of the provided matrix.
The matrix must be symmetric positive definite. Symmetry is not checked, and it is up to the user to enforce this property.
Errors
Returns an error if the numerical factorization fails. This can occur if the matrix is not symmetric positive definite.
Panics
Panics if the matrix is not square.
pub fn refactor(&mut self, values: &[T]) -> Result<(), CholeskyError>
[src]
Re-computes the factorization for a new set of non-zero values.
This is useful when the values of a matrix changes, but the sparsity pattern remains constant.
Errors
Returns an error if the numerical factorization fails. This can occur if the matrix is not symmetric positive definite.
Panics
Panics if the number of values does not match the number of non-zeros in the sparsity pattern.
pub fn l(&self) -> &CscMatrix<T>
[src]
Returns a reference to the Cholesky factor L
.
pub fn take_l(self) -> CscMatrix<T>
[src]
Returns the Cholesky factor L
.
pub fn solve<'a>(&'a self, b: impl Into<DMatrixSlice<'a, T>>) -> DMatrix<T>
[src]
pub fn solve_mut<'a>(&'a self, b: impl Into<DMatrixSliceMut<'a, T>>)
[src]
Solves the system AX = B
, where X
and B
are dense matrices.
The result is stored in-place in b
.
Panics
Panics if b
is not square.
Trait Implementations
impl<T: Clone> Clone for CscCholesky<T>
[src]
fn clone(&self) -> CscCholesky<T>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Debug> Debug for CscCholesky<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for CscCholesky<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for CscCholesky<T> where
T: Send,
T: Send,
impl<T> Sync for CscCholesky<T> where
T: Sync,
T: Sync,
impl<T> Unpin for CscCholesky<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for CscCholesky<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,