In C++ using Eigen library writing the following example:
#include <iostream>
#include <eigen3/Eigen/Core>
using namespace Eigen;
using namespace std;
int main()
{
Matrix3f mat;
Matrix3f m[11];
cout << mat << endl;
cout << "\n" << m[11] << endl;
}
The first cout
outputs:
-37392.8 4.57244e-41 -37378.8
4.57244e-41 -37206.4 4.57244e-41
-37223.2 4.57244e-41 8.40779e-45
The second one outputs:
0 -2.51418e-31 0
2.96401e+17 -1.10025e+33 2.9625e+17
3.06324e-41 0 3.06324e-41
What does [ ]
operator do?
How mat[value]
is different from mat
?
Another question :p why Eigen generates extremely large or small numbers, are they random?
P.S: on the second output, the zeros are always zeroes but the other numbers are changing