64 template < TESTNAME AttributeSelection,
bool isScalar >
81 template < TESTNAME AttributeSelection,
bool isScalar >
101 template < TESTNAME AttributeSelection,
bool isScalar >
107 template < TESTNAME AttributeSelection,
bool isScalar >
111 varIter.val()->addObservation(newObs->
rModality(varIter.key()), newObs->
reward());
117 template < TESTNAME AttributeSelection,
bool isScalar >
135 template < TESTNAME AttributeSelection,
bool isScalar >
142 varIter.val()->add(*(src.
testPolicy(varIter.key())));
151 template < TESTNAME AttributeSelection,
bool isScalar >
153 std::string ss = std::format(
"NbObservation : {}\n", this->
nbObservation());
155 ss += std::format(
"\t\tVariable : {} - Associated Test : {}\n",
156 varIter.key()->name(),
165 template < TESTNAME AttributeSelection,
bool isScalar >
170 template < TESTNAME AttributeSelection,
bool isScalar >
179 template < TESTNAME AttributeSelection,
bool isScalar >
188 template < TESTNAME AttributeSelection,
bool isScalar >
194 template < TESTNAME AttributeSelection,
bool isScalar >
200 template < TESTNAME AttributeSelection,
bool isScalar >
210 template < TESTNAME AttributeSelection,
bool isScalar >
216 template < TESTNAME AttributeSelection,
bool isScalar >
222 template < TESTNAME AttributeSelection,
bool isScalar >
228 template < TESTNAME AttributeSelection,
bool isScalar >
233 template < TESTNAME AttributeSelection,
bool isScalar >
238 template < TESTNAME AttributeSelection,
bool isScalar >
243 template < TESTNAME AttributeSelection,
bool isScalar >
Base class for discrete random variable.
Safe Const Iterators for hashtables.
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.
INLINE bool isTestRelevant(const DiscreteVariable *var) const
Indicates wether or not, node has sufficient observation so that any statistic is relevant.
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.
Idx effectif(Idx moda) const
Idx _valueDomain_(Int2Type< true >) const
typename TestSelect< AttributeSelection, GTestPolicy< GUM_ELEMENT >, Chi2TestPolicy< GUM_ELEMENT >, LeastSquareTestPolicy< GUM_ELEMENT > >::type TestPolicy
const HashTableConstIteratorSafe< ValueType, Idx > cendValues() const
Merges given NodeDatabase informations into current nDB.
void _addObservation_(const Observation *, Int2Type< true >)
std::string toString() const
HashTable< ValueType, Idx > _valueCount_
INLINE double testValue(const DiscreteVariable *var) const
Returns the performance of given variables according to selection criterion.
INLINE double testOtherCriterion(const DiscreteVariable *var) const
Returns the performance of given variables according to selection secondary criterion (to break ties)...
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.
const HashTableConstIteratorSafe< ValueType, Idx > cbeginValues() const
Iterators on value count to recopy correctly its content.
void addObservation(const Observation *)
Nb observation taken into account by this instance.
Idx modality(const DiscreteVariable *var) const
Returns the modality assumed by the given variable in this observation.
double reward() const
Returns the modality assumed by the given variable in this observation.
Idx rModality(const DiscreteVariable *var) const
Returns the modality assumed by the given variable in this observation.
Safe iterators for the Set class.
static const const_iterator_safe & cendSafe() noexcept
The usual safe end iterator to parse the set.
const_iterator_safe cbeginSafe() const
The usual safe begin iterator to parse the set.
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.
gum is the global namespace for all aGrUM entities
Set< const DiscreteVariable * > VariableSet
Headers of the NodeDatabase class.