50#ifndef GUM_MULTI_DIM_FUNCTION_GRAPH_LEAST_SQUARE_TEST_POLICY_H
51#define GUM_MULTI_DIM_FUNCTION_GRAPH_LEAST_SQUARE_TEST_POLICY_H
72 template <
typename GUM_SCALAR >
92 void operator delete(
void* p) {
Headers of the ITestPolicy.
Idx nbObservation() const
Comptabilizes the new observation.
ITestPolicy()
Allocators and Deallocators redefinition.
<agrum/base/multidim/core/testPolicy/leastSquareTestPolicy.h>
void add(const LeastSquareTestPolicy< GUM_SCALAR > &src)
Performs the merging of current LeastSquareTestPolicy instance with given instance.
virtual ~LeastSquareTestPolicy()
Destructor.
double _score_
Keeping computed score.
HashTable< Idx, Idx > _nbObsTable_
Nb Observation for each modality assumed by variable.
HashTable< Idx, double > _sumAttrTable_
Sum for each modality assumed by variable.
const HashTable< Idx, Idx > & nbObsTable() const
Returns nbobs per modality table (needed for the merging).
HashTable< Idx, LinkedList< double > * > _obsTable_
Not sure if needed.
bool isTestRelevant() const
Returns true if enough observation were made so that the test can be relevant.
void addObservation(Idx attr, GUM_SCALAR value)
Comptabilizes the new observation.
const HashTable< Idx, double > & sumAttrTable() const
Returns sum per modality table (needed for the merging).
void computeScore()
Returns the performance of current variable according to the test.
double sumValue() const
Returns global sum (needed for the merging).
const HashTable< Idx, LinkedList< double > * > & obsTable() const
Returns global sum (needed for the merging).
double secondaryscore() const
Returns a second criterion to severe ties.
LeastSquareTestPolicy()
Constructor.
double score()
Returns the performance of current variable according to the test.
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.
Template implementations for the LeastSquareTestPolicy class.
Headers of the Link and LinkedList classes.
gum is the global namespace for all aGrUM entities