An example for the usage of the Matrix library.
#include <iostream>
#include <math.h>
#include <selforg/matrix.h>
using namespace matrix;
using namespace std;
double data[9] = {1., 0., 1., 0.1, 0.4, 0.5, -2., 0.1, 2.};
cout << m2.
val(0,0) << endl;
cout << m2.
val(2,1) << endl;
cout << m2;
Matrix m3 = m2 + m2 - m2 * m2;
cout << m3;
Matrix m4 = (m3^
T) * (m3^-1) * (m3.multMT());
Matrix m6 = m4 & (m3.column(0));
cout << m7;
return 0;
}