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

5{
7 a << 0, 1, 2, 3,
8 2, 3, 4, 5,
9 2, 1, 6, 7,
10 0, 3,-1, 2;
11 stk_cout << "Inverse general matrix:\n";
12 stk_cout << "-----------------------\n";
13 stk_cout << a*invert(a);
14 stk_cout << "\nInverse upper-symmetric matrix:\n";
15 stk_cout << "-------------------------------\n";
16 stk_cout << a.upperSymmetrize();
17 stk_cout << a.upperSymmetrize()*invert(a.upperSymmetrize());
18 stk_cout << "\nInverse lower-symmetric matrix:\n";
19 stk_cout << "-------------------------------\n";
20 stk_cout << a.lowerSymmetrize();
21 stk_cout << a.lowerSymmetrize()*invert(a.lowerSymmetrize());
22 return 0;
23}
#define stk_cout
Standard stk output stream.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
hidden::AlgebraTraits< InvertMatrix< Matrix, hidden::Traits< Matrix >::sizeRows_ > >::Result invert(Matrix const &mat)
Utility function allowing to compute the inverse of a matrix.

References STK::invert(), STK::ArrayBase< Derived >::lowerSymmetrize(), stk_cout, and STK::ArrayBase< Derived >::upperSymmetrize().