UmfPackLU< _MatrixType > Class Template Reference

A sparse LU factorization and solver based on UmfPack. More...

#include <UmfPackSupport.h>

Public Member Functions

void analyzePattern (const MatrixType &matrix)
 
void compute (const MatrixType &matrix)
 
void factorize (const MatrixType &matrix)
 
ComputationInfo info () const
 Reports whether previous computation was successful.
 
template<typename Rhs>
const internal::solve_retval< UmfPackLU, Rhs > solve (const MatrixBase< Rhs > &b) const
 

Detailed Description

template<typename _MatrixType>
class Eigen::UmfPackLU< _MatrixType >

A sparse LU factorization and solver based on UmfPack.

This class allows to solve for A.X = B sparse linear problems via a LU factorization using the UmfPack library. The sparse matrix A must be squared and full rank. The vectors or matrices X and B can be either dense or sparse.

\WARNING The input matrix A should be in a compressed and column-major form. Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix.

Template Parameters
_MatrixTypethe type of the sparse matrix A, it must be a SparseMatrix<>
See also
Solving linear problems

Member Function Documentation

◆ analyzePattern()

template<typename _MatrixType>
void analyzePattern ( const MatrixType & matrix)
inline
Returns
the solution x of $ A x = b $ using the current decomposition of A.
See also
compute() Performs a symbolic decomposition on the sparcity of matrix.

This function is particularly useful when solving for several problems having the same structure.

See also
factorize(), compute()

References Eigen::InvalidInput, and Eigen::Success.

Referenced by compute().

◆ compute()

template<typename _MatrixType>
void compute ( const MatrixType & matrix)
inline

Computes the sparse Cholesky decomposition of matrix Note that the matrix should be column-major, and in compressed format for best performance.

See also
SparseMatrix::makeCompressed().

References analyzePattern(), and factorize().

◆ factorize()

template<typename _MatrixType>
void factorize ( const MatrixType & matrix)
inline

Performs a numeric decomposition of matrix

The given matrix must has the same sparcity than the matrix on which the pattern anylysis has been performed.

See also
analyzePattern(), compute()

References Eigen::NumericalIssue, and Eigen::Success.

Referenced by compute().

◆ info()

template<typename _MatrixType>
ComputationInfo info ( ) const
inline

Reports whether previous computation was successful.

Returns
Success if computation was succesful, NumericalIssue if the matrix.appears to be negative.

◆ solve()

template<typename _MatrixType>
template<typename Rhs>
const internal::solve_retval< UmfPackLU, Rhs > solve ( const MatrixBase< Rhs > & b) const
inline
Returns
the solution x of $ A x = b $ using the current decomposition of A.
See also
compute()

The documentation for this class was generated from the following file: