42 template < TESTNAME AttributeSelection,
bool isScalar >
62 template < TESTNAME AttributeSelection,
bool isScalar >
84 template < TESTNAME AttributeSelection,
bool isScalar >
91 template < TESTNAME AttributeSelection,
bool isScalar >
97 varIter.val()->addObservation(newObs->
rModality(varIter.key()),
106 template < TESTNAME AttributeSelection,
bool isScalar >
112 varIter.val()->addObservation(newObs->
modality(varIter.key()),
130 template < TESTNAME AttributeSelection,
bool isScalar >
138 varIter.val()->add(*(src.
testPolicy(varIter.key())));
150 template < TESTNAME AttributeSelection,
bool isScalar >
152 std::stringstream ss;
154 ss <<
"NbObservation : " << this->
nbObservation() << std::endl;
157 ss <<
"\t\tVariable : " << varIter.key()->name()
158 <<
" - Associated Test : " <<
__attrTable[varIter.key()]->toString()
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...
const DiscreteVariable * __value
So does this reference on the value observed.
Safe iterators for the Set classDevelopers may consider using Set<x>::iterator_safe instead of SetIte...
HashTable< ValueType, Idx > __valueCount
const HashTableConstIteratorSafe< ValueType, Idx > cendValues() const
Merges given NodeDatabase informations into current nDB.
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
NodeDatabase(const Set< const DiscreteVariable * > *, const DiscreteVariable *=nullptr)
Default constructor.
Base class for discrete random variable.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Representation of a setA Set is a structure that contains arbitrary elements.
const const_iterator_safe & cendSafe() const noexcept
The usual safe end iterator to parse the set.
std::string toString() const
double reward() const
Returns the modality assumed by the given variable in this observation.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void addObservation(const Observation *)
Nb observation taken into account by this instance.
INLINE Idx rModality(const DiscreteVariable *var) const
Returns the modality assumed by the given variable in this observation.
const_iterator_safe cbeginSafe() const
The usual safe begin iterator to parse the set.
const HashTableConstIteratorSafe< ValueType, Idx > cbeginValues() const
Iterators on value count to recopy correctly its content.
NodeDatabase< AttributeSelection, isScalar > & operator+=(const NodeDatabase< AttributeSelection, isScalar > &src)
Merges given NodeDatabase informations into current nDB.
INLINE Idx modality(const DiscreteVariable *var) const
Returns the modality assumed by the given variable in this observation.
INLINE Idx nbObservation() const
Nb observation taken into account by this instance.
~NodeDatabase()
Default destructor.
<agrum/FMDP/learning/datastructure/nodeDatabase.h>
HashTable< const DiscreteVariable *, TestPolicy< ValueType > *> __attrTable
Table giving for every variables its instantiation.