36#ifndef STK_ILEASTSQUARE_H
37#define STK_ILEASTSQUARE_H
56template<
class Derived>
69 if (
b.beginRows() !=
b.beginCols())
71 if (
a.beginRows() !=
a.beginCols())
73 if (
a.beginRows() !=
b.beginRows())
80 template<
class OtherArrayB,
class OtherArrayA>
84 if (
b.beginRows() !=
b.beginCols())
86 if (
a.beginRows() !=
a.beginCols())
88 if (
a.beginRows() !=
b.beginRows())
115 template<
class VecWeights>
129template<
class Derived>
132 if (a_.empty()||b_.empty()) {
return true;}
134 return(this->asDerived().runImpl());
137template<
class Derived>
138template<
class Weights>
141 if (a_.empty()||b_.empty()) {
return true;}
143 return(this->asDerived().runImpl(
weights));
In this file we define and implement utilies class and method for the Algebra project.
#define STKRUNTIME_ERROR_NO_ARG(Where, Error)
This file include all the other header files of the project Sdk.
The class ILeastSquare is an interface class for the methods solving the least-square problem.
ArrayB b_
Array or vector of the left hand side.
Integer rank_
rank of matrix A
bool run(VecWeights const &weights)
Compute the weighted Least-Square solution.
ILeastSquare(ExprBase< OtherArrayB > const &b, ExprBase< OtherArrayA > const &a)
template constructor
hidden::AlgebraTraits< Derived >::ArrayB ArrayB
ArrayA a_
Array of the right hand side.
ArrayB x_
Array of the solution (a vector if b is a vector, a matrix otherwise)
hidden::AlgebraTraits< Derived >::ArrayA ArrayA
virtual ~ILeastSquare()
Destructor.
Integer const & rank() const
virtual bool run()
Compute the Least-Square solution.
ILeastSquare(ArrayB const &b, ArrayA const &a, bool isBref=false, bool isAref=false)
Default constructor.
Interface base class for all classes implementing the curious recursive template paradigm.
Abstract base class for all classes having a.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
The namespace STK is the main domain space of the Statistical ToolKit project.
traits class for the algebra methods.