hugin_utils::LMS_Solver Class Reference

Solve a linear least squares problem. More...

#include <lu.h>

List of all members.

Public Member Functions

 LMS_Solver (unsigned nEq)
 Create a new LMS solver.
 ~LMS_Solver ()
template<class Iter>
void addRow (Iter Arow, double b)
 Add a single equation (row) to the solver.
template<class Vector>
bool solve (Vector &x)
 calculate LMS solution, returns false if no solution could be found

Protected Attributes

unsigned m_nEq
double * m_AtA


Detailed Description

Solve a linear least squares problem.

Definition at line 88 of file lu.h.


Constructor & Destructor Documentation

hugin_utils::LMS_Solver::LMS_Solver ( unsigned  nEq  )  [inline]

Create a new LMS solver.

A*x = b, solve for x using the pseudoinverse and LU decomposition: A'A x = A' b.

Definition at line 95 of file lu.h.

References m_AtA, and m_nEq.

hugin_utils::LMS_Solver::~LMS_Solver (  )  [inline]

Definition at line 102 of file lu.h.

References m_AtA.


Member Function Documentation

template<class Iter>
void hugin_utils::LMS_Solver::addRow ( Iter  Arow,
double  b 
) [inline]

Add a single equation (row) to the solver.

Definition at line 109 of file lu.h.

References m_AtA, and m_nEq.

Referenced by vigra_ext::VigQuotientEstimator::leastSquaresEstimate().

template<class Vector>
bool hugin_utils::LMS_Solver::solve ( Vector &  x  )  [inline]

calculate LMS solution, returns false if no solution could be found

Definition at line 124 of file lu.h.

References m_AtA, m_nEq, and math_lu_solve().

Referenced by vigra_ext::VigQuotientEstimator::leastSquaresEstimate().


Member Data Documentation

double* hugin_utils::LMS_Solver::m_AtA [protected]

Definition at line 139 of file lu.h.

Referenced by addRow(), LMS_Solver(), solve(), and ~LMS_Solver().

unsigned hugin_utils::LMS_Solver::m_nEq [protected]

Definition at line 136 of file lu.h.

Referenced by addRow(), LMS_Solver(), and solve().


The documentation for this class was generated from the following file:
Generated on 5 Dec 2014 for Hugintrunk by  doxygen 1.4.7