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