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 >
66 GUM_DESTRUCTOR(ITestPolicy);
73 void*
operator new(size_t s) {
return SmallObjectAllocator::instance().allocate(s); }
75 SmallObjectAllocator::instance().deallocate(p,
sizeof(ITestPolicy));
121 virtual double score()
const = 0;
141 _nbObs_ += src.nbObservation();
156 std::stringstream ss;
157 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
bool _isModified_
Booleans indicating if we have to re eval test.
void add(const ITestPolicy< GUM_SCALAR > &src)
void operator delete(void *p)
Allocators and Deallocators redefinition.
Idx nbObservation() const
Comptabilizes the new observation.