#include #include #include #include "stat.h" using namespace std; using namespace GMapping; // struct Covariance3{ // double xx, yy, tt, xy, xt, yt; // }; #define SAMPLES_NUMBER 10000 int main(int argc, char** argv){ Covariance3 cov={1.,0.01,0.01,0,0,0}; EigenCovariance3 ecov(cov); cout << "EigenValues: " << ecov.eval[0] << " "<< ecov.eval[1] << " " << ecov.eval[2] << endl; cout << "EigenVectors:" < points; for (unsigned int i=0; i::iterator b = points.begin(); std::vector::iterator e = points.end(); Gaussian3 gaussian=computeGaussianFromSamples(b, e); cov=gaussian.cov; ecov=gaussian.covariance; cout << "*************** Estimated with Templates ***************" << endl; cout << "EigenValues: " << ecov.eval[0] << " "<< ecov.eval[1] << " " << ecov.eval[2] << endl; cout << "EigenVectors:" <