![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
<agrum/FMDP/learning/datastructure/nodeDatabase.h> More...
#include <nodeDatabase.h>
Public Member Functions | |
Idx | effectif (Idx moda) const |
Idx | valueDomain () const |
Constructor & destructor. | |
NodeDatabase (const Set< const DiscreteVariable * > *, const DiscreteVariable *=nullptr) | |
Default constructor. More... | |
~NodeDatabase () | |
Default destructor. More... | |
void * | operator new (size_t s) |
Allocators and Deallocators redefinition. More... | |
void | operator delete (void *p) |
Default constructor. More... | |
Variable Test Methods | |
INLINE bool | isTestRelevant (const DiscreteVariable *var) const |
Indicates wether or not, node has sufficient observation so that any statistic is relevant. More... | |
INLINE double | testValue (const DiscreteVariable *var) const |
Returns the performance of given variables according to selection criterion. More... | |
INLINE double | testOtherCriterion (const DiscreteVariable *var) const |
Returns the performance of given variables according to selection secondary criterion (to break ties) More... | |
Aggregation Methods | |
NodeDatabase< AttributeSelection, isScalar > & | operator+= (const NodeDatabase< AttributeSelection, isScalar > &src) |
Merges given NodeDatabase informations into current nDB. More... | |
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 merged too) More... | |
const HashTableConstIteratorSafe< ValueType, Idx > | cbeginValues () const |
Iterators on value count to recopy correctly its content. More... | |
const HashTableConstIteratorSafe< ValueType, Idx > | cendValues () const |
Merges given NodeDatabase informations into current nDB. More... | |
Observation handling methods | |
void | addObservation (const Observation *) |
Nb observation taken into account by this instance. More... | |
INLINE Idx | nbObservation () const |
Nb observation taken into account by this instance. More... | |
void | _addObservation_ (const Observation *, Int2Type< true >) |
Updates database with new observation. More... | |
void | _addObservation_ (const Observation *, Int2Type< false >) |
depending on if we're learning reward function or transition probability More... | |
<agrum/FMDP/learning/datastructure/nodeDatabase.h>
Definition at line 57 of file nodeDatabase.h.
|
private |
Definition at line 64 of file nodeDatabase.h.
|
private |
Definition at line 58 of file nodeDatabase.h.
gum::NodeDatabase< AttributeSelection, isScalar >::NodeDatabase | ( | const Set< const DiscreteVariable * > * | attrSet, |
const DiscreteVariable * | value = nullptr |
||
) |
Default constructor.
Definition at line 42 of file nodeDatabase_tpl.h.
gum::NodeDatabase< AttributeSelection, isScalar >::~NodeDatabase | ( | ) |
Default destructor.
Definition at line 61 of file nodeDatabase_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
private |
Updates database with new observation.
Calls either or
Definition at line 88 of file nodeDatabase_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
private |
depending on if we're learning reward function or transition probability
Definition at line 100 of file nodeDatabase_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inlineprivate |
Definition at line 190 of file nodeDatabase.h.
|
inlineprivate |
Definition at line 191 of file nodeDatabase.h.
void gum::NodeDatabase< AttributeSelection, isScalar >::addObservation | ( | const Observation * | newObs | ) |
Nb observation taken into account by this instance.
Definition at line 82 of file nodeDatabase_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inline |
Iterators on value count to recopy correctly its content.
Definition at line 170 of file nodeDatabase.h.
|
inline |
Merges given NodeDatabase informations into current nDB.
Definition at line 173 of file nodeDatabase.h.
|
inline |
Definition at line 183 of file nodeDatabase.h.
|
inline |
Indicates wether or not, node has sufficient observation so that any statistic is relevant.
Definition at line 128 of file nodeDatabase.h.
References gum::NodeDatabase< AttributeSelection, isScalar >::operator+=().
|
inline |
Nb observation taken into account by this instance.
Definition at line 115 of file nodeDatabase.h.
References gum::NodeDatabase< AttributeSelection, isScalar >::operator+=().
|
inline |
Default constructor.
Definition at line 86 of file nodeDatabase.h.
|
inline |
Allocators and Deallocators redefinition.
Definition at line 85 of file nodeDatabase.h.
NodeDatabase< AttributeSelection, isScalar > & gum::NodeDatabase< AttributeSelection, isScalar >::operator+= | ( | const NodeDatabase< AttributeSelection, isScalar > & | src | ) |
Merges given NodeDatabase informations into current nDB.
Definition at line 122 of file nodeDatabase_tpl.h.
References gum::Set< Key, Alloc >::emplace().
Referenced by gum::NodeDatabase< AttributeSelection, isScalar >::isTestRelevant(), gum::NodeDatabase< AttributeSelection, isScalar >::nbObservation(), gum::NodeDatabase< AttributeSelection, isScalar >::testOtherCriterion(), and gum::NodeDatabase< AttributeSelection, isScalar >::testValue().
|
inline |
Returns the performance of given variables according to selection secondary criterion (to break ties)
Definition at line 142 of file nodeDatabase.h.
References gum::NodeDatabase< AttributeSelection, isScalar >::operator+=().
|
inline |
Returns a reference to nDB test policy for given variable (so that test policy information can be merged too)
Definition at line 163 of file nodeDatabase.h.
|
inline |
Returns the performance of given variables according to selection criterion.
Definition at line 136 of file nodeDatabase.h.
References gum::NodeDatabase< AttributeSelection, isScalar >::operator+=().
|
private |
Definition at line 140 of file nodeDatabase_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inline |
Definition at line 187 of file nodeDatabase.h.
|
private |
Table giving for every variables its instantiation.
Definition at line 197 of file nodeDatabase.h.
|
private |
Definition at line 203 of file nodeDatabase.h.
|
private |
So does this reference on the value observed.
Definition at line 200 of file nodeDatabase.h.
|
private |
Definition at line 206 of file nodeDatabase.h.