50#ifndef GUM_MULTI_DIM_FUNCTION_GRAPH_CHI2_TEST_POLICY_H
51#define GUM_MULTI_DIM_FUNCTION_GRAPH_CHI2_TEST_POLICY_H
71 template <
typename GUM_SCALAR >
88 void operator delete(
void* p) {
134 double score()
const;
148 std::stringstream ss;
149 ss << ITestPolicy< GUM_SCALAR >::toString() <<
"\t\t\tContingency Table : " << std::endl
151 <<
"\t\t\tGStat : " << this->
score() << std::endl
Template implementations for the Chi2TestPolicy class.
Headers of the ITestPolicy.
Headers of the ChiSquare class.
<agrum/base/multidim/core/testPolicy/Chi2TestPolicy.h>
virtual ~Chi2TestPolicy()
ContingencyTable< Idx, GUM_SCALAR > _conTab_
The contingency table used to keeps records of all observation.
void addObservation(Idx attr, GUM_SCALAR value)
Comptabilizes the new observation.
std::string toString() const
void add(const Chi2TestPolicy< GUM_SCALAR > &src)
virtual double secondaryscore() const
Returns a second criterion to severe ties.
void computeScore() const
Recomputes the statistic from the beginning.
bool isTestRelevant() const
Returns true if enough observation were made so that the test can be relevant.
const ContingencyTable< Idx, GUM_SCALAR > & ct() const
double score() const
Returns the performance of current variable according to the test.
Idx nbObservation() const
Comptabilizes the new observation.
ITestPolicy()
Allocators and Deallocators redefinition.
static SmallObjectAllocator & instance()
void * allocate(const size_t &objectSize)
Allocates a block.
void deallocate(void *pDeallocatedObject, const size_t &objectSize)
Deallocates an object.
Headers of the ContingencyTable class.
Size Idx
Type for indexes.
gum is the global namespace for all aGrUM entities