Dakota  Version 6.20
Explore and Predict with Confidence
Public Types | Public Member Functions | Static Public Member Functions | List of all members
LinearSolverBase Class Reference

The LinearSolverBase class serves as an API for derived solvers. More...

Inheritance diagram for LinearSolverBase:
CholeskySolver LUSolver QRSolver SVDSolver

Public Types

enum  SOLVER_TYPE {
  CHOLESKY, EQ_CONS_LEAST_SQ_REGRESSION, LASSO_REGRESSION, LEAST_ANGLE_REGRESSION,
  LU, ORTHOG_MATCH_PURSUIT, QR_LEAST_SQ_REGRESSION, SVD_LEAST_SQ_REGRESSION
}
 How best to Doxygenate class enums? RWH.
 

Public Member Functions

 LinearSolverBase ()
 Constructor.
 
 ~LinearSolverBase ()
 Destructor.
 
virtual bool is_factorized () const
 Query to determine if the matrix of the solver has been factored.
 
virtual void factorize (const MatrixXd &A)
 Perform the matrix factorization for the linear solver matrix. More...
 
virtual void solve (const MatrixXd &A, const MatrixXd &b, MatrixXd &x)
 Find a solution to linear problem. More...
 
virtual void solve (const MatrixXd &b, MatrixXd &x)
 Find a solution to linear problem where the LHS is already factorized. More...
 

Static Public Member Functions

static SOLVER_TYPE solver_type (const std::string &solver_name)
 Convert solver name to enum type. More...
 

Detailed Description

The LinearSolverBase class serves as an API for derived solvers.

Member Function Documentation

◆ solver_type()

SOLVER_TYPE solver_type ( const std::string &  solver_name)
static

Convert solver name to enum type.

Parameters
[in]solver_nameLinearSolverBase name to map
Returns
Corresponding LinearSolverBase enum

References dakota::util::type_name_bimap.

Referenced by PolynomialRegression::build().

◆ factorize()

void factorize ( const MatrixXd A)
virtual

Perform the matrix factorization for the linear solver matrix.

Parameters
[in]AThe incoming matrix to factorize.

Reimplemented in CholeskySolver, QRSolver, SVDSolver, and LUSolver.

References dakota::silence_unused_args().

◆ solve() [1/2]

void solve ( const MatrixXd A,
const MatrixXd b,
MatrixXd x 
)
virtual

Find a solution to linear problem.

Parameters
[in]AThe linear system left-hand-side matrix.
[in]bThe linear system right-hand-side (multi-)vector.
[in]xThe linear system solution (multi-)vector.

Reimplemented in CholeskySolver, QRSolver, SVDSolver, and LUSolver.

References dakota::silence_unused_args().

◆ solve() [2/2]

void solve ( const MatrixXd b,
MatrixXd x 
)
virtual

Find a solution to linear problem where the LHS is already factorized.

Parameters
[in]bThe linear system right-hand-side (multi-)vector.
[in]xThe linear system solution (multi-)vector.

Reimplemented in CholeskySolver, QRSolver, SVDSolver, and LUSolver.

References dakota::silence_unused_args().


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