-
Notifications
You must be signed in to change notification settings - Fork 0
/
Chi2IndepTest.H
31 lines (29 loc) · 904 Bytes
/
Chi2IndepTest.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/***********************************************************************
Chi2IndepTest.H
BOOM : Bioinformatics Object Oriented Modules
Copyright (C)2012 William H. Majoros (martiandna@gmail.com).
This is OPEN SOURCE SOFTWARE governed by the Gnu General Public
License (GPL) version 3, as described at www.opensource.org.
***********************************************************************/
#ifndef INCL_BOOM_Chi2IndepTest_H
#define INCL_BOOM_Chi2IndepTest_H
using namespace std;
#include "Array2D.H"
#include "Chi2Table.H"
namespace BOOM {
class Chi2IndepTest
{
public:
Chi2IndepTest(BOOM::Array2D<int> &contingencyTable,
BOOM::Chi2Table &);
bool areIndependent();
double getChiSquared();
double getP();
inline bool areDependent() {return !areIndependent();}
private:
double P, chiSquared;
bool independent;
void runTest(BOOM::Array2D<int> &,BOOM::Chi2Table &);
};
}
#endif