36#ifndef STK_LAPACK_QR_H
37#define STK_LAPACK_QR_H
101 template<
class Derived>
110 inline virtual Qr*
clone()
const {
return new Qr(*
this);}
133 int lWork =-1,
m = a.sizeRows(), n= a.sizeCols();
171 int begin =
Q_.beginRows();
172 int end = std::min(
Q_.endRows(),
Q_.endCols());
180 a.
shift(begin, begin);
183 for (
int i=
Q_.beginRows();
i<
Q_.endRows(); ++
i)
185 int jmax = std::min(
i,
Q_.endCols());
187 for (
int j=
i;
j<
Q_.endCols(); ++
j) {
R_(
i,
j) = a(
i,
j);}
In this file, we define the final class Array2D.
In this file we implement the final class CArrayVector.
In this file we implement the final class CArray.
In this file we define the Interface class IQr (QR decomposition).
#define STKERROR_NO_ARG(Where, Error)
#define STKERROR_1ARG(Where, Arg, Error)
In this file we define and implement utilities classes and methods for the interface with lapack.
hidden::Traits< Array2D< Real > >::Col Col
hidden::Traits< Array2D< Real > >::Row Row
Derived & resize(Range const &I, Range const &J)
resize the array.
Derived & shift(int beginRows, int beginCols)
shift the Array.
Type *const & p_data() const
The class IQr is an interface class for the method computing the QR Decomposition of a ArrayXX.
IQr & operator=(IQr const &decomp)
Operator = : overwrite the this with decomp.
ArrayUpperTriangularXX R_
R Array of th QR decomposition.
Array Q_
Q Array of the QR decomposition.
String msg_error_
String with the last error message.
String const & error() const
get the last error message.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
The class Qr perform the QR decomposition of an ArrayXX.
virtual Qr * clone() const
clone pattern
Qr(ArrayBase< Derived > const &data)
Constructor.
Qr(ArrayXX const &data, bool ref=false)
Default constructor.
Qr(Qr const &decomp)
Copy constructor.
bool computeQr(CArrayXX &a, CVectorX &tau)
private method for computing the Qr decomposition using a CArrayXX array
virtual ~Qr()
virtual destructor
bool runImpl()
Run qr decomposition Launch geqrf LAPACK routine to perform the qr decomposition.
Qr & operator=(Qr const &decomp)
Operator = : overwrite the Qr with decomp.
int geqrf(int m, int n, Real *a, int lda, Real *tau, Real *work, int lWork)
wrapper of the LAPACK DGEQRF routine: computes the Qr decomposition of a matrix.
double Real
STK fundamental type of Real values.
The namespace STK is the main domain space of the Statistical ToolKit project.
traits class for the algebra methods.