Public Types | Public Member Functions | Protected Types | Protected Attributes
SparseLU< _MatrixType, Backend > Class Template Reference

LU decomposition of a sparse matrix and associated features. More...

#include <SparseLU.h>

List of all members.

Public Types

typedef _MatrixType MatrixType

Public Member Functions

void compute (const _MatrixType &matrix)
int flags () const
int orderingMethod () const
RealScalar precision () const
void setFlags (int f)
void setOrderingMethod (int m)
void setPrecision (RealScalar v)
template<typename BDerived , typename XDerived >
bool solve (const MatrixBase< BDerived > &b, MatrixBase< XDerived > *x, const int transposed=SvNoTrans) const
template<typename BDerived , typename XDerived >
bool solve (const MatrixBase< BDerived > &b, MatrixBase< XDerived > *x) const
 SparseLU (int flags=0)
 SparseLU (const _MatrixType &matrix, int flags=0)
bool succeeded (void) const

Protected Types

enum  { MatrixLUIsDirty = 0x10000 }
typedef SparseMatrix< ScalarLUMatrixType
typedef NumTraits< typename
_MatrixType::Scalar >::Real 
RealScalar
typedef _MatrixType::Scalar Scalar

Protected Attributes

int m_flags
RealScalar m_precision
int m_status
bool m_succeeded

Detailed Description

template<typename _MatrixType, typename Backend = DefaultBackend>
class SparseLU< _MatrixType, Backend >

LU decomposition of a sparse matrix and associated features.

Parameters:
_MatrixTypethe type of the matrix of which we are computing the LU factorization
See also:
class FullPivLU, class SparseLLT

Definition at line 45 of file SparseLU.h.


Member Typedef Documentation

template<typename _MatrixType, typename Backend = DefaultBackend>
typedef SparseMatrix<Scalar> SparseLU< _MatrixType, Backend >::LUMatrixType [protected]

Definition at line 50 of file SparseLU.h.

template<typename _MatrixType, typename Backend = DefaultBackend>
typedef _MatrixType SparseLU< _MatrixType, Backend >::MatrixType

Reimplemented in SparseLU< _MatrixType, UmfPack >.

Definition at line 57 of file SparseLU.h.

template<typename _MatrixType, typename Backend = DefaultBackend>
typedef NumTraits<typename _MatrixType::Scalar>::Real SparseLU< _MatrixType, Backend >::RealScalar [protected]

Reimplemented in SparseLU< MatrixType, SuperLU >, and SparseLU< _MatrixType, UmfPack >.

Definition at line 49 of file SparseLU.h.

template<typename _MatrixType, typename Backend = DefaultBackend>
typedef _MatrixType::Scalar SparseLU< _MatrixType, Backend >::Scalar [protected]

Reimplemented in SparseLU< MatrixType, SuperLU >, and SparseLU< _MatrixType, UmfPack >.

Definition at line 48 of file SparseLU.h.


Member Enumeration Documentation

template<typename _MatrixType, typename Backend = DefaultBackend>
anonymous enum [protected]
Enumerator:
MatrixLUIsDirty 

Definition at line 52 of file SparseLU.h.


Constructor & Destructor Documentation

template<typename _MatrixType, typename Backend = DefaultBackend>
SparseLU< _MatrixType, Backend >::SparseLU ( int  flags = 0) [inline]

Creates a dummy LU factorization object with flags flags.

Reimplemented in SparseLU< MatrixType, SuperLU >, and SparseLU< _MatrixType, UmfPack >.

Definition at line 60 of file SparseLU.h.

template<typename _MatrixType, typename Backend = DefaultBackend>
SparseLU< _MatrixType, Backend >::SparseLU ( const _MatrixType &  matrix,
int  flags = 0 
) [inline]

Creates a LU object and compute the respective factorization of matrix using flags flags.

Reimplemented in SparseLU< MatrixType, SuperLU >, and SparseLU< _MatrixType, UmfPack >.

Definition at line 68 of file SparseLU.h.


Member Function Documentation

template<typename MatrixType>
void SparseLU< MatrixType >::compute ( const MatrixType matrix)

Computes/re-computes the LU factorization

Computes / recomputes the LU decomposition of matrix a using the default algorithm.

Reimplemented in SparseLU< MatrixType, SuperLU >, and SparseLU< _MatrixType, UmfPack >.

Definition at line 142 of file SparseLU.h.

template<typename _MatrixType, typename Backend = DefaultBackend>
int SparseLU< _MatrixType, Backend >::flags ( ) const [inline]
Returns:
the current flags

Definition at line 102 of file SparseLU.h.

template<typename _MatrixType, typename Backend = DefaultBackend>
int SparseLU< _MatrixType, Backend >::orderingMethod ( ) const [inline]

Definition at line 110 of file SparseLU.h.

template<typename _MatrixType, typename Backend = DefaultBackend>
RealScalar SparseLU< _MatrixType, Backend >::precision ( ) const [inline]
Returns:
the current precision.
See also:
setPrecision()

Definition at line 90 of file SparseLU.h.

template<typename _MatrixType, typename Backend = DefaultBackend>
void SparseLU< _MatrixType, Backend >::setFlags ( int  f) [inline]

Sets the flags. Possible values are:

  • CompleteFactorization
  • IncompleteFactorization
  • MemoryEfficient
  • one of the ordering methods
  • etc...
See also:
flags()

Definition at line 100 of file SparseLU.h.

template<typename _MatrixType, typename Backend = DefaultBackend>
void SparseLU< _MatrixType, Backend >::setOrderingMethod ( int  m) [inline]

Definition at line 104 of file SparseLU.h.

template<typename _MatrixType, typename Backend = DefaultBackend>
void SparseLU< _MatrixType, Backend >::setPrecision ( RealScalar  v) [inline]

Sets the relative threshold value used to prune zero coefficients during the decomposition.

Setting a value greater than zero speeds up computation, and yields to an imcomplete factorization with fewer non zero coefficients. Such approximate factors are especially useful to initialize an iterative solver.

Note that the exact meaning of this parameter might depends on the actual backend. Moreover, not all backends support this feature.

See also:
precision()

Definition at line 85 of file SparseLU.h.

template<typename _MatrixType , typename Backend >
template<typename BDerived , typename XDerived >
bool SparseLU< _MatrixType, Backend >::solve ( const MatrixBase< BDerived > &  b,
MatrixBase< XDerived > *  x,
const int  transposed = SvNoTrans 
) const
Returns:
the lower triangular matrix L
the upper triangular matrix U

Computes *x = U^-1 L^-1 b

If transpose is set to SvTranspose or SvAdjoint, the solution of the transposed/adjoint system is computed instead.

Not all backends implement the solution of the transposed or adjoint system.

Reimplemented in SparseLU< MatrixType, SuperLU >.

Definition at line 157 of file SparseLU.h.

template<typename _MatrixType, typename Backend = DefaultBackend>
template<typename BDerived , typename XDerived >
bool SparseLU< _MatrixType, Backend >::solve ( const MatrixBase< BDerived > &  b,
MatrixBase< XDerived > *  x 
) const

Definition at line 326 of file UmfPackSupport.h.

template<typename _MatrixType, typename Backend = DefaultBackend>
bool SparseLU< _MatrixType, Backend >::succeeded ( void  ) const [inline]
Returns:
true if the factorization succeeded

Definition at line 129 of file SparseLU.h.


Member Data Documentation

template<typename _MatrixType, typename Backend = DefaultBackend>
int SparseLU< _MatrixType, Backend >::m_flags [protected]

Definition at line 133 of file SparseLU.h.

template<typename _MatrixType, typename Backend = DefaultBackend>
RealScalar SparseLU< _MatrixType, Backend >::m_precision [protected]

Definition at line 132 of file SparseLU.h.

template<typename _MatrixType, typename Backend = DefaultBackend>
int SparseLU< _MatrixType, Backend >::m_status [mutable, protected]

Definition at line 134 of file SparseLU.h.

template<typename _MatrixType, typename Backend = DefaultBackend>
bool SparseLU< _MatrixType, Backend >::m_succeeded [protected]

Definition at line 135 of file SparseLU.h.


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


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:34:25