STK++ 0.9.13
tutoQr.cpp File Reference
#include <STKpp.h>
Include dependency graph for tutoQr.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 4 of file tutoQr.cpp.

5{
6 Array2D<Real> a(5,4);
7 a << 0, 1, 2, 3,
8 2, 3, 4, 5,
9 2, 1, 6, 7,
10 0, 3,-1, 2,
11 3,-1, 1, 1;
12 stk_cout << _T("STK++ QR decomposition:\n");
13 stk_cout << _T("-----------------------\n");
14 Qr q(a); q.run();
15 stk_cout << _T("R matrix:\n");
16 stk_cout << q.R();
17 ArrayXX QR = q.R();
19 stk_cout << _T("QR matrix:\n");
20 stk_cout << QR;
21 stk_cout << _T("\nlapack QR decomposition:\n");
22 stk_cout << _T("--------------------------\n");
23 lapack::Qr lq(a); lq.run();
24 stk_cout << _T("R matrix:\n");
25 stk_cout << lq.R();
26 QR = lq.R();
28 stk_cout << _T("QR matrix:\n");
29 stk_cout << QR;
30 return 0;
31}
#define stk_cout
Standard stk output stream.
#define _T(x)
Let x unmodified.
virtual bool run()
run the computations.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
The class Qr perform the QR decomposition of an ArrayXX.
Definition STK_Qr.h:98
void applyLeftHouseholderArray(ArrayBase< Lhs > const &M, ArrayBase< Rhs > const &H)
left multiplication by a Householder array.

References _T, STK::applyLeftHouseholderArray(), STK::IQr< Derived >::Q(), STK::IQr< Derived >::R(), STK::IQr< Derived >::run(), and stk_cout.