STK++ 0.9.13
tutoQrUpdate.cpp File Reference
#include <STKpp.h>
Include dependency graph for tutoQrUpdate.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 tutoQrUpdate.cpp.

5{
6 ArrayXX a(5,4), QR;
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 << "lapack QR decomposition:\n";
13 lapack::Qr lq(a); lq.run();
14 // remove column
15 lq.eraseCol(2);
16 stk_cout << "R matrix:\n";
17 stk_cout << lq.R();
18 QR = lq.Q() * lq.R();
19 stk_cout << "QR matrix:\n";
20 stk_cout << QR;
21 // insert constant column with value 1 in column 2
22 lq.insertCol(Const::Vector<Real>(5), 2);
23 stk_cout << "\nR matrix:\n";
24 stk_cout << lq.R();
25 QR = lq.Q() * lq.R();
26 stk_cout << "QR matrix:\n";
27 stk_cout << QR;
28 return 0;
29}
#define stk_cout
Standard stk output stream.
Define the constant point.
virtual bool run()
run the computations.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...

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