13 #define SAMPLES_NUMBER 10000
15 int main(
int argc,
char** argv){
18 cout <<
"EigenValues: " << ecov.
eval[0] <<
" "<< ecov.
eval[1] <<
" " << ecov.
eval[2] << endl;
20 cout <<
"EigenVectors:" <<endl;
21 cout<< ecov.
evec[0][0] <<
" "<< ecov.
evec[0][1] <<
" " << ecov.
evec[0][2] << endl;
22 cout<< ecov.
evec[1][0] <<
" "<< ecov.
evec[1][1] <<
" " << ecov.
evec[1][2] << endl;
23 cout<< ecov.
evec[2][0] <<
" "<< ecov.
evec[2][1] <<
" " << ecov.
evec[2][2] << endl;
26 cout <<
"*************** Rotated ***************" << endl;
27 cout <<
"EigenValues: " << rcov.
eval[0] <<
" "<< rcov.
eval[1] <<
" " << rcov.
eval[2] << endl;
29 cout <<
"EigenVectors:" <<endl;
30 cout<< rcov.
evec[0][0] <<
" "<< rcov.
evec[0][1] <<
" " << rcov.
evec[0][2] << endl;
31 cout<< rcov.
evec[1][0] <<
" "<< rcov.
evec[1][1] <<
" " << rcov.
evec[1][2] << endl;
32 cout<< rcov.
evec[2][0] <<
" "<< rcov.
evec[2][1] <<
" " << rcov.
evec[2][2] << endl;
34 cout <<
"sampling:" << endl;
35 ofstream fs(
"stat_test.dat");
36 std::vector<OrientedPoint> points;
40 fs << op.
x <<
" " << op.
y <<
" " << op.
theta << endl;
43 std::vector<OrientedPoint>::iterator b = points.begin();
44 std::vector<OrientedPoint>::iterator e = points.end();
48 cout <<
"*************** Estimated with Templates ***************" << endl;
49 cout <<
"EigenValues: " << ecov.
eval[0] <<
" "<< ecov.
eval[1] <<
" " << ecov.
eval[2] << endl;
50 cout <<
"EigenVectors:" <<endl;
51 cout<< ecov.
evec[0][0] <<
" "<< ecov.
evec[0][1] <<
" " << ecov.
evec[0][2] << endl;
52 cout<< ecov.
evec[1][0] <<
" "<< ecov.
evec[1][1] <<
" " << ecov.
evec[1][2] << endl;
53 cout<< ecov.
evec[2][0] <<
" "<< ecov.
evec[2][1] <<
" " << ecov.
evec[2][2] << endl;
56 cout <<
"*************** Estimated without Templates ***************" << endl;
57 cout <<
"EigenValues: " << ecov.
eval[0] <<
" "<< ecov.
eval[1] <<
" " << ecov.
eval[2] << endl;
58 cout <<
"EigenVectors:" <<endl;
59 cout<< ecov.
evec[0][0] <<
" "<< ecov.
evec[0][1] <<
" " << ecov.
evec[0][2] << endl;
60 cout<< ecov.
evec[1][0] <<
" "<< ecov.
evec[1][1] <<
" " << ecov.
evec[1][2] << endl;
61 cout<< ecov.
evec[2][0] <<
" "<< ecov.
evec[2][1] <<
" " << ecov.
evec[2][2] << endl;