Debian Codegraph @

src/ITGSend/newran/test_out.h

raw symbols SCIP
1 /// \ingroup newran
2 ///@{
3
4 /// \file test_out.h
5 /// Statistical tests - header file.
6
7
8
9 #ifndef TEST_OUT
10 #define TEST_OUT
11
12 #ifdef use_namespace
13 using namespace RBD_STRING;
14 using namespace RBD_COMMON;
15 namespace NEWRAN {
16 #endif
17
18
19
20 class BaseTest
21 {
22 public:
23 double SigProb; // significance probability
24 protected:
25 const String LongName; // name of test
26 double Statistic; // the test statistic
27 void WrapUp(double sig_prob); // print out test reuslts
28 public:
29 BaseTest(const String& ln, double stat)
30 : LongName(ln), Statistic(stat) {}
31 virtual void DoTest() = 0; // do the test
32 static const char* Header;
33 virtual ~BaseTest() {}
34 };
35
36
37 // normal one-sided test
38
39 class NormalTestUpper : public BaseTest
40 {
41 double Mean, Var;
42 public:
43 NormalTestUpper(const String& ln, double stat, double mean, double var)
44 : BaseTest(ln, stat), Mean(mean), Var(var) {}
45 void DoTest(); // do the test
46 };
47
48 // normal two sided test
49
50 class NormalTestTwoSided : public BaseTest
51 {
52 double Mean, Var;
53 public:
54 NormalTestTwoSided(const String& ln, double stat, double mean, double var)
55 : BaseTest(ln, stat), Mean(mean), Var(var) {}
56 void DoTest(); // do the test
57 };
58
59 // chi-squared one sided test - upper tail
60
61 class ChiSquaredTestUpper : public BaseTest
62 {
63 int DF;
64 public:
65 ChiSquaredTestUpper(const String& ln, double stat, int df)
66 : BaseTest(ln, stat), DF(df) {}
67 void DoTest(); // do the test
68 };
69
70 // chi-squared one sided test - lower tail
71
72 class ChiSquaredTestLower : public BaseTest
73 {
74 int DF;
75 public:
76 ChiSquaredTestLower(const String& ln, double stat, int df)
77 : BaseTest(ln, stat), DF(df) {}
78 void DoTest(); // do the test
79 };
80
81 // chi-squared two sided test
82
83 class ChiSquaredTestTwoSided : public BaseTest
84 {
85 int DF;
86 public:
87 ChiSquaredTestTwoSided(const String& ln, double stat, int df)
88 : BaseTest(ln, stat), DF(df) {}
89 void DoTest(); // do the test
90 };
91
92 // quasi-uniform one sided test
93
94 class QuasiUniformLower : public BaseTest
95 {
96 public:
97 QuasiUniformLower(const String& ln, double stat)
98 : BaseTest(ln, stat) {}
99 void DoTest(); // do the test
100 };
101
102 // uniform one sided test
103
104 class UniformLower : public BaseTest
105 {
106 public:
107 UniformLower(const String& ln, double stat)
108 : BaseTest(ln, stat) {}
109 void DoTest(); // do the test
110 };
111
112 // Kolmogorov-Smirnov one sided test
113
114 class KS_Upper : public BaseTest
115 {
116 public:
117 KS_Upper(const String& ln, double stat)
118 : BaseTest(ln, stat) {}
119 void DoTest(); // do the test
120 };
121
122 #ifdef use_namespace
123 }
124 #endif
125
126
127 #endif
128
129
130
131 // body file: test_out.cpp
132
133 ///@}
134
135