Struct nalgebra_sparse::factorization::CscCholesky[][src]

pub struct CscCholesky<T> { /* fields omitted */ }

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]

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]

Solves the system A X = B, where X and B are dense matrices.

Panics

Panics if B is not square.

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]

impl<T: Debug> Debug for CscCholesky<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for CscCholesky<T> where
    T: RefUnwindSafe

impl<T> Send for CscCholesky<T> where
    T: Send

impl<T> Sync for CscCholesky<T> where
    T: Sync

impl<T> Unpin for CscCholesky<T> where
    T: Unpin

impl<T> UnwindSafe for CscCholesky<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,