50#ifndef GUM_NODE_DATABASE_H
51#define GUM_NODE_DATABASE_H
74 template < TESTNAME AttributeSelection,
bool isScalar >
78 template <
typename GUM_SCALAR >
105 void operator delete(
void* p) {
Headers of the Chi2TestPolicy.
Headers of the GTestPolicy.
<agrum/base/multidim/core/testPolicy/Chi2TestPolicy.h>
Base class for discrete random variable.
<agrum/base/multidim/core/testPolicies/GTestPolicy.h>
The class for generic Hash Tables.
<agrum/base/multidim/core/testPolicy/leastSquareTestPolicy.h>
<agrum/FMDP/learning/datastructure/nodeDatabase.h>
const TestPolicy< ValueType > * testPolicy(const DiscreteVariable *var) const
Returns a reference to nDB test policy for given variable (so that test policy information can be mer...
NodeDatabase(const gum::VariableSet *, const DiscreteVariable *=nullptr)
Default constructor.
~NodeDatabase()
Default destructor.
Idx _valueDomain_(Int2Type< false >) const
typename ValueSelect< isScalar, double, Idx >::type ValueType
INLINE Idx nbObservation() const
Nb observation taken into account by this instance.
const DiscreteVariable * _value_
So does this reference on the value observed.
INLINE double testValue(const DiscreteVariable *var) const
Returns the performance of given variables according to selection criterion.
Idx effectif(Idx moda) const
Idx _valueDomain_(Int2Type< true >) const
void _addObservation_(const Observation *, Int2Type< true >)
Updates database with new observation.
typename TestSelect< AttributeSelection, GTestPolicy< GUM_SCALAR >, Chi2TestPolicy< GUM_SCALAR >, LeastSquareTestPolicy< GUM_SCALAR > >::type TestPolicy
std::string toString() const
INLINE double testOtherCriterion(const DiscreteVariable *var) const
Returns the performance of given variables according to selection secondary criterion (to break ties)...
INLINE bool isTestRelevant(const DiscreteVariable *var) const
Indicates wether or not, node has sufficient observation so that any statistic is relevant.
const HashTableConstIteratorSafe< ValueType, Idx > cendValues() const
Merges given NodeDatabase informations into current nDB.
const HashTableConstIteratorSafe< ValueType, Idx > cbeginValues() const
Iterators on value count to recopy correctly its content.
HashTable< ValueType, Idx > _valueCount_
NodeDatabase< AttributeSelection, isScalar > & operator+=(const NodeDatabase< AttributeSelection, isScalar > &src)
Merges given NodeDatabase informations into current nDB.
HashTable< const DiscreteVariable *, TestPolicy< ValueType > * > _attrTable_
Table giving for every variables its instantiation.
void addObservation(const Observation *)
Nb observation taken into account by this instance.
static SmallObjectAllocator & instance()
void * allocate(const size_t &objectSize)
Allocates a block.
void deallocate(void *pDeallocatedObject, const size_t &objectSize)
Deallocates an object.
Size Idx
Type for indexes.
Headers of the LeastSquareTestPolicy.
gum is the global namespace for all aGrUM entities
Set< const DiscreteVariable * > VariableSet
Template implémentations of the NodeDatabase class.
Header file of gum::Sequence, a class for storing (ordered) sequences of objects.
Template trick for efficient development.