6 #include "../Text/TextTools.h" 22 double part = (r[1] - r[0]) / n;
23 for (
unsigned int i = 0; i < n; ++i)
25 out.push_back(r[0] + (part * i));
51 double m1 = mean<double, double>(x1);
52 double m2 = mean<double, double>(x2);
53 double v1 = var<double, double>(x1);
54 double v2 = var<double, double>(x2);
55 cout <<
"Mean x1 = " << m1 <<
"\tVar x1 = " << v1 << endl;
56 cout <<
"Mean x2 = " << m2 <<
"\tVar x2 = " << v2 << endl;
57 cov<double, double>(x1, x2);
58 cor<double, double>(x1, x2);
59 cos<double, double>(x1, x2);
60 shannon<double, double>(x1);
61 return m1 == -0.2 && m2 == 0.04 && v1 == 6.565 && v2 == 27.603;