Go to the documentation of this file.
46 #define TUA(EXP,GOT,METHOD) testFramework.changeSourceMethod(METHOD); testFramework.assert_equals<int>(EXP,GOT,__LINE__)
47 #define TUAE(EXP,GOT,EPS,METHOD) testFramework.changeSourceMethod(METHOD); testFramework.assert_equals(T(EXP),GOT,__LINE__,"",EPS)
52 std::string typeName = gnsstk::typeString<T>();
53 T precision = 10*std::numeric_limits<T>::epsilon();
54 gnsstk::TestUtil testFramework(
"Stats<"+typeName+
">",
"--", __FILE__, __LINE__ );
63 TUA(5, tso.
N(),
"Add()");
69 TUAE(sqrt(2.5), tso.
StdDevX(), precision,
"StdDevX()");
75 TUAE(sqrt(2.5), tso.
StdDevY(), precision,
"StdDevY()");
77 TUAE(0.1, tso.
Slope(), precision,
"Slope()");
79 TUAE(0.574456264653802865989, tso.
SigmaSlope(), precision,
"SigmaSlope()");
80 TUAE(1.81659021245849499920, tso.
SigmaYX(), precision,
"SigmaYX()");
90 ec += statsTest<float>();
91 ec += statsTest<double>();
92 ec += statsTest<long double>();
94 cout <<
"Total Failures for " << __FILE__ <<
": " << ec << endl;
void Add(const T &x, const T &y)
T Slope(void) const
return slope of best-fit line Y=slope*X + intercept
T StdDevY(void) const
return computed Y standard deviation
T Intercept(void) const
return intercept of best-fit line Y=slope*X + intercept
T MinimumX(void) const
return minimum X value
T SigmaYX(void) const
return conditional uncertainty = uncertainty y given x
#define TUA(EXP, GOT, METHOD)
T AverageY(void) const
return computed Y average
T MaximumX(void) const
return maximum X value
T MaximumY(void) const
return maximum Y value
T SigmaSlope(void) const
return uncertainty in slope
T AverageX(void) const
return computed X average
T VarianceX(void) const
return computed X variance
T Correlation(void) const
return correlation
#define TUAE(EXP, GOT, EPS, METHOD)
T StdDevX(void) const
return computed X standard deviation
T VarianceY(void) const
return computed Y variance
T MinimumY(void) const
return minimum Y value
unsigned int N(void) const
gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:41