STK++ 0.9.13
|
The class ILeastSquare is an interface class for the methods solving the least-square problem. More...
#include <STK_ILeastSquare.h>
Public Member Functions | |
virtual | ~ILeastSquare () |
Destructor. | |
Integer const & | rank () const |
ArrayA const & | a () const |
ArrayB const & | b () const |
ArrayB const & | x () const |
virtual bool | run () |
Compute the Least-Square solution. | |
template<class VecWeights > | |
bool | run (VecWeights const &weights) |
Compute the weighted Least-Square solution. | |
template<class Weights > | |
bool | run (Weights const &weights) |
![]() | |
String const & | error () const |
get the last error message. | |
![]() | |
Derived & | asDerived () |
static cast : return a reference of this with a cast to the derived class. | |
Derived const & | asDerived () const |
static cast : return a const reference of this with a cast to the derived class. | |
Derived * | asPtrDerived () |
static cast : return a ptr on a Derived of this with a cast to the derived class. | |
Derived const * | asPtrDerived () const |
static cast : return a ptr on a constant Derived of this with a cast to the derived class. | |
Derived * | clone () const |
create a leaf using the copy constructor of the Derived class. | |
Derived * | clone (bool isRef) const |
create a leaf using the copy constructor of the Derived class and a flag determining if the clone is a reference or not. | |
Protected Types | |
typedef hidden::AlgebraTraits< Derived >::ArrayB | ArrayB |
typedef hidden::AlgebraTraits< Derived >::ArrayA | ArrayA |
Protected Member Functions | |
ILeastSquare (ArrayB const &b, ArrayA const &a, bool isBref=false, bool isAref=false) | |
Default constructor. | |
template<class OtherArrayB , class OtherArrayA > | |
ILeastSquare (ExprBase< OtherArrayB > const &b, ExprBase< OtherArrayA > const &a) | |
template constructor | |
![]() | |
IRunnerBase () | |
default constructor | |
IRunnerBase (IRunnerBase const &runner) | |
copy constructor | |
virtual | ~IRunnerBase () |
destructor | |
virtual void | update () |
update the runner. | |
![]() | |
IRecursiveTemplate () | |
constructor. | |
~IRecursiveTemplate () | |
destructor. | |
Protected Attributes | |
ArrayB | b_ |
Array or vector of the left hand side. | |
ArrayA | a_ |
Array of the right hand side. | |
ArrayB | x_ |
Array of the solution (a vector if b is a vector, a matrix otherwise) | |
Integer | rank_ |
rank of matrix A | |
![]() | |
String | msg_error_ |
String with the last error message. | |
bool | hasRun_ |
true if run has been used, false otherwise | |
The class ILeastSquare is an interface class for the methods solving the least-square problem.
The least-square problem can be solved using the Svd or the QR decomposition of A.
Definition at line 57 of file STK_ILeastSquare.h.
|
protected |
Definition at line 61 of file STK_ILeastSquare.h.
|
protected |
Definition at line 60 of file STK_ILeastSquare.h.
|
inlineprotected |
Default constructor.
b,a | the left hand side and the right hand side of the least square problem. |
isBref,isAref | are the left hand side and the right hand side references ? |
Definition at line 66 of file STK_ILeastSquare.h.
References STK::ILeastSquare< Derived >::a(), STK::ILeastSquare< Derived >::b(), STK::ILeastSquare< Derived >::ILeastSquare(), and STKRUNTIME_ERROR_NO_ARG.
Referenced by STK::ILeastSquare< Derived >::ILeastSquare(), and STK::ILeastSquare< Derived >::ILeastSquare().
|
inlineprotected |
template constructor
b,a | the left hand side and the right hand side of the least square problem. |
Definition at line 81 of file STK_ILeastSquare.h.
References STK::ILeastSquare< Derived >::a(), STK::ILeastSquare< Derived >::b(), STK::ILeastSquare< Derived >::ILeastSquare(), and STKRUNTIME_ERROR_NO_ARG.
|
inlinevirtual |
|
inline |
Definition at line 99 of file STK_ILeastSquare.h.
References STK::ILeastSquare< Derived >::a_.
Referenced by STK::ILeastSquare< Derived >::ILeastSquare(), and STK::ILeastSquare< Derived >::ILeastSquare().
|
inline |
Definition at line 101 of file STK_ILeastSquare.h.
References STK::ILeastSquare< Derived >::b_.
Referenced by STK::ILeastSquare< Derived >::ILeastSquare(), and STK::ILeastSquare< Derived >::ILeastSquare().
|
inline |
Definition at line 97 of file STK_ILeastSquare.h.
References STK::ILeastSquare< Derived >::rank_.
|
virtual |
Compute the Least-Square solution.
Delegate to Derived classes the concrete computation of the decomposition using runImpl
method.
true
if the computation succeed, false
otherwise Implements STK::IRunnerBase.
Definition at line 130 of file STK_ILeastSquare.h.
Referenced by main().
bool STK::ILeastSquare< Derived >::run | ( | VecWeights const & | weights | ) |
Compute the weighted Least-Square solution.
Delegate to Derived classes the concrete computation of the decomposition using runImpl
method.
true
if the computation succeed, false
otherwise bool STK::ILeastSquare< Derived >::run | ( | Weights const & | weights | ) |
Definition at line 139 of file STK_ILeastSquare.h.
|
inline |
Definition at line 103 of file STK_ILeastSquare.h.
References STK::ILeastSquare< Derived >::x_.
Referenced by main().
|
protected |
Array of the right hand side.
Definition at line 122 of file STK_ILeastSquare.h.
Referenced by STK::ILeastSquare< Derived >::a().
|
protected |
Array or vector of the left hand side.
Definition at line 120 of file STK_ILeastSquare.h.
Referenced by STK::ILeastSquare< Derived >::b().
|
protected |
rank of matrix A
Definition at line 126 of file STK_ILeastSquare.h.
Referenced by STK::ILeastSquare< Derived >::rank().
|
protected |
Array of the solution (a vector if b is a vector, a matrix otherwise)
Definition at line 124 of file STK_ILeastSquare.h.
Referenced by STK::ILeastSquare< Derived >::x().