ConstrainedLS Class Reference

#include <ConstrainedLS.H>

List of all members.

Public Types

enum  Bound { LOWER_BOUND, UPPER_BOUND, UNCONSTRAINED }
enum  LSResult {
  SUCCESS, INCONSISTENT_BOUNDS, UNDERDETERMINED, SINGULAR,
  UNCONVERGED
}

Public Member Functions

 ConstrainedLS ()
LSResult solveBoundConstrained (Vector< Real > &a_x, Real **a_A, const Vector< Real > &a_rhs, const Vector< Real > &a_lowerBound, const Vector< Real > &a_upperBound)
LSResult solveUnconstrained (Vector< Real > &a_x, Real **a_A, const Vector< Real > &a_rhs)
bool boundsConsistent (const Vector< Real > &a_lowBound, const Vector< Real > &a_hiBound) const
Vector< BoundgetConstraints () const
int numberActiveConstraints () const
Real getResidual () const
LSResult qrSolution (Real **a_A, Vector< Real > &a_x, Vector< Real > &a_b, Real &resq)

Protected Attributes

Vector< Boundm_boundState
int m_nbound

Private Member Functions

void allocArray (const int &rows, const int &cols, Real **&A)
void freeArray (const int &rows, const int &cols, Real **&A)

Private Attributes

Real m_residual


Member Enumeration Documentation

Enumerator:
LOWER_BOUND 
UPPER_BOUND 
UNCONSTRAINED 

Enumerator:
SUCCESS 
INCONSISTENT_BOUNDS 
UNDERDETERMINED 
SINGULAR 
UNCONVERGED 


Constructor & Destructor Documentation

ConstrainedLS::ConstrainedLS (  ) 


Member Function Documentation

LSResult ConstrainedLS::solveBoundConstrained ( Vector< Real > &  a_x,
Real **  a_A,
const Vector< Real > &  a_rhs,
const Vector< Real > &  a_lowerBound,
const Vector< Real > &  a_upperBound 
)

Solve the bound-constrained least squares Uses the Lawson-Hanson active set method as given by P.B. Stark and R.L. Parker, Bounded-Variable Least-Squares: An Algorithm and Applications, Computational Statistics, 10:129-141, 1995. Uses solveUnconstrained for sub-problems

Referenced by LSProblem< dim >::invertNormalEq().

LSResult ConstrainedLS::solveUnconstrained ( Vector< Real > &  a_x,
Real **  a_A,
const Vector< Real > &  a_rhs 
)

Solve the unconstrained least squares problem

bool ConstrainedLS::boundsConsistent ( const Vector< Real > &  a_lowBound,
const Vector< Real > &  a_hiBound 
) const

Vector<Bound> ConstrainedLS::getConstraints (  )  const

Get a vector of Bound indicating constraint activity.

int ConstrainedLS::numberActiveConstraints (  )  const

Query the number of active constraints. Bails if a LS problem has not been solved yet

Referenced by LSProblem< dim >::invertNormalEq().

Real ConstrainedLS::getResidual (  )  const

Get the LS residual Bails if a LS problem has not been solved yet

LSResult ConstrainedLS::qrSolution ( Real **  a_A,
Vector< Real > &  a_x,
Vector< Real > &  a_b,
Real resq 
)

Solve the least squares problem. Uses successive Householder rotations

void ConstrainedLS::allocArray ( const int &  rows,
const int &  cols,
Real **&  A 
) [private]

void ConstrainedLS::freeArray ( const int &  rows,
const int &  cols,
Real **&  A 
) [private]


Member Data Documentation

int ConstrainedLS::m_nbound [protected]


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

Generated on Thu Sep 21 03:27:01 2017 for Chombo + EB + MF by  doxygen 1.5.5