libgenua
Basic Geometry, Numerical Algorithms and Interfaces
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Groups Pages
Public Member Functions | Private Attributes | List of all members
PreconditionedLsqr< Scalar > Class Template Reference

Detailed Description

template<typename Scalar>
class PreconditionedLsqr< Scalar >

Interface for optionally preconditioned LSQR.

This class adapts the LsqrSolver template for use as a linear solver that mostly complies with the common interface of AbstractLinearSolverTpl. On construction, a right-side preconditioner M can be pased which should bring the condition number of A*M^-1 closer to 1.

See Also
RpcOperator

#include <lsqr.h>

Inheritance diagram for PreconditionedLsqr< Scalar >:
[legend]
Collaboration diagram for PreconditionedLsqr< Scalar >:
[legend]

Public Member Functions

 PreconditionedLsqr ()
 create solver without preconditioner
 
 PreconditionedLsqr (PreconPtr preconditioner)
 create solver without preconditioner
 
bool factor (const CsrMatrix< Scalar, 1 > *pa)
 full factorization (minimum interface)
 
bool refactor (const CsrMatrix< Scalar, 1 > *pa)
 numerical factorization only (if supported)
 
virtual bool solve (const DMatrix< Scalar > &, DMatrix< Scalar > &)
 solve with multiple rhs
 
virtual bool solve (const DVector< Scalar > &b, DVector< Scalar > &x)
 solve single RHS (by default implemented in terms of the above)
 
- Public Member Functions inherited from AbstractLinearSolverTpl< Scalar >
 AbstractLinearSolverTpl ()
 default construction for undefined matrix type
 
 AbstractLinearSolverTpl (uint typeflag)
 construction for defined matrix type
 
virtual ~AbstractLinearSolverTpl ()
 virtual destructor
 
uint matrixType () const
 the matrix type for which this solver has been instantiated
 
const std::string & name () const
 solver name (libary/implementation)
 
virtual void configure (const ConfigParser &)
 load configuration settings
 
void transposed (bool flag)
 request to solve the transposed problem (not always supported)
 
virtual bool solve (const CsrMatrix< Scalar, 1 > *pa, const DMatrix< Scalar > &b, DMatrix< Scalar > &x)
 single-shot solve (may be more efficient for some solvers)
 
virtual bool solve (const CsrMatrix< Scalar, 1 > *pa, const DVector< Scalar > &b, DVector< Scalar > &x)
 single-shot solve (may be more efficient for some solvers)
 
virtual bool resolve (const CsrMatrix< Scalar, 1 > *pa, const DMatrix< Scalar > &b, DMatrix< Scalar > &x)
 solution with new values in A, but the same non-zero pattern
 
virtual bool resolve (const CsrMatrix< Scalar, 1 > *pa, const DVector< Scalar > &b, DVector< Scalar > &x)
 solution with new values in A, but the same non-zero pattern
 
size_t factorizations () const
 number of (re-) factorizations
 
size_t solves () const
 number of (re-) factorizations
 
virtual float factorTime () const
 access timing data (if supported by implementation)
 
virtual float solveTime () const
 access timing data (if supported by implementation)
 
virtual float maxMemory () const
 memory, in Megabyte, as reported by solver (if possible)
 
virtual void release ()
 release internal storage
 
virtual double condest ()
 return estimated condition number after factorization (if supported)
 
void verbose (bool flag)
 enable diagnostid printing
 

Private Attributes

CsrMatrix< Scalar > * m_pa
 matrix to solve with
 
LsqrSolver< Scalar > m_lsqr
 instance of solver
 
PreconPtr m_rpc
 optional right preconditioner
 

Additional Inherited Members

- Static Public Member Functions inherited from AbstractLinearSolverTpl< Scalar >
static SolverPtr create (uint)
 Create a new instance of any solver which is supported by the library. More...
 
- Protected Member Functions inherited from AbstractLinearSolverTpl< Scalar >
bool isSymmetric ()
 matrix property tests
 
bool isReal ()
 matrix property tests
 
bool isComplex ()
 matrix property tests
 
- Protected Attributes inherited from AbstractLinearSolverTpl< Scalar >
uint m_mtxflags
 matrix type flag
 
std::string m_implName
 implementation/solver/library name for logging
 
float m_factorTime
 timing data; only useful if child classes set these values
 
size_t m_factorCount
 call statistics; only useful if child classes set these values
 
bool m_solveTransposed
 whether to solve the transposed problem A^T x = b
 
int m_verbose
 print diagnostic info?
 

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