30 #ifndef GUM_MULTI_DIM_FUNCTION_GRAPH_INTERFACE_TEST_POLICY_H 31 #define GUM_MULTI_DIM_FUNCTION_GRAPH_INTERFACE_TEST_POLICY_H 34 #include <agrum/tools/core/smallobjectallocator/smallObjectAllocator.h> 36 #include <agrum/tools/graphs/parts/nodeGraphPart.h> 49 template <
typename GUM_SCALAR >
61 GUM_CONSTRUCTOR(ITestPolicy);
73 return SmallObjectAllocator::instance().allocate(s);
76 SmallObjectAllocator::instance().deallocate(p,
sizeof(ITestPolicy));
122 virtual double score()
const = 0;
142 nbObs__ += src.nbObservation();
157 std::stringstream ss;
158 ss <<
"\t\t\tNb Obs : " << nbObs__ << std::endl;
virtual double score() const =0
Returns the performance of current variable according to the test.
virtual void computeScore() const
Recomputes the statistic from the beginning.
virtual bool isTestRelevant() const =0
Returns true if enough observation were added so that the test can be relevant.
ITestPolicy()
Allocators and Deallocators redefinition.
INLINE void emplace(Args &&... args)
virtual void addObservation(Idx attr, GUM_SCALAR value)
Comptabilizes the new observation.
virtual double secondaryscore() const =0
Returns a second criterion to severe ties.
void * operator new(size_t s)
Allocators and Deallocators redefinition.
<agrum/tools/multidim/core/testPolicies/ITestPolicy.h>
virtual ~ITestPolicy()
Allocators and Deallocators redefinition.
std::string toString() const
void add(const ITestPolicy< GUM_SCALAR > &src)
void operator delete(void *p)
Allocators and Deallocators redefinition.
bool isModified__
Booleans indicating if we have to re eval test.
Idx nbObservation() const
Comptabilizes the new observation.