50#ifndef GUM_MULTI_DIM_FUNCTION_GRAPH_G_TEST_POLICY_H
51#define GUM_MULTI_DIM_FUNCTION_GRAPH_G_TEST_POLICY_H
73 template <
typename GUM_SCALAR >
101 void operator delete(
void* p) {
141 double score()
const;
177 std::stringstream ss;
178 ss << ITestPolicy< GUM_SCALAR >::toString() <<
"\t\t\tContingency Table : " << std::endl
180 <<
"\t\t\tGStat : " <<
_GStat_ << std::endl
Template implementations for the GTestPolicy class.
Headers of the ITestPolicy.
Headers of the ChiSquare class.
<agrum/base/multidim/core/testPolicies/GTestPolicy.h>
GTestPolicy()
Constructor.
virtual ~GTestPolicy()
Destructor.
const ContingencyTable< Idx, GUM_SCALAR > & ct() const
Returns contingency table (needed for the merging of GTestPolicy instances).
std::string toString() const
double secondaryscore() const
Returns a second criterion to severe ties.
void addObservation(Idx iattr, GUM_SCALAR ivalue)
Comptabilizes the new observation.
double score() const
Returns the performance of current variable according to the test.
void add(const GTestPolicy< GUM_SCALAR > &src)
Performs the merging of current GTestPolicy instance with given instance.
void computeScore() const
Computes the GStat of current variable according to the test.
ContingencyTable< Idx, GUM_SCALAR > _conTab_
The contingency table used to keeps records of all observation.
bool isTestRelevant() const
Returns true if enough observation were made so that the test can be relevant.
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