27 #ifndef GUM_MULTI_DIM_FUNCTION_GRAPH_G_TEST_POLICY_H 28 #define GUM_MULTI_DIM_FUNCTION_GRAPH_G_TEST_POLICY_H 49 template <
typename GUM_SCALAR >
72 void*
operator new(
size_t s) {
76 void operator delete(
void* p) {
117 double score()
const;
154 std::stringstream ss;
155 ss << ITestPolicy< GUM_SCALAR >::toString()
156 <<
"\t\t\tContingency Table : " << std::endl
158 <<
"\t\t\tGStat : " <<
__GStat << std::endl
void computeScore() const
Computes the GStat of current variable according to the test.
virtual ~GTestPolicy()
Destructor.
Template implementations for the GTestPolicy class.
void addObservation(Idx iattr, GUM_SCALAR ivalue)
Comptabilizes the new observation.
const ContingencyTable< Idx, GUM_SCALAR > & ct() const
Returns contingency table (needed for the merging of GTestPolicy instances)
std::string toString() const
Headers of the ITestPolicy.
gum is the global namespace for all aGrUM entities
Headers of the ChiSquare class.
std::string toString() const
ContingencyTable< Idx, GUM_SCALAR > __conTab
The contingency table used to keeps records of all observation.
<agrum/multidim/core/testPolicies/ITestPolicy.h>
Headers of the ContingencyTable class.
double secondaryscore() const
Returns a second criterion to severe ties.
<agrum/multidim/core/testPolicies/GTestPolicy.h>
void deallocate(void *pDeallocatedObject, const size_t &objectSize)
Deallocates an object.
double score() const
Returns the performance of current variable according to the test.
bool isTestRelevant() const
Returns true if enough observation were made so that the test can be relevant.
void add(const GTestPolicy< GUM_SCALAR > &src)
Performs the merging of current GTestPolicy instance with given instance.
GTestPolicy()
Constructor.
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()