![]() |
aGrUM 2.3.2
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 gum::VariableSet *, const DiscreteVariable *=nullptr) | |
| Default constructor. | |
| ~NodeDatabase () | |
| Default destructor. | |
| void * | operator new (size_t s) |
| Allocators and Deallocators redefinition. | |
| void | operator delete (void *p) |
| Default constructor. | |
Variable Test Methods | |
| INLINE bool | isTestRelevant (const DiscreteVariable *var) const |
| Indicates wether or not, node has sufficient observation so that any statistic is relevant. | |
| 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). | |
Aggregation Methods | |
| NodeDatabase< AttributeSelection, isScalar > & | operator+= (const NodeDatabase< AttributeSelection, isScalar > &src) |
| Merges given NodeDatabase informations into current nDB. | |
| 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). | |
| const HashTableConstIteratorSafe< ValueType, Idx > | cbeginValues () const |
| Iterators on value count to recopy correctly its content. | |
| const HashTableConstIteratorSafe< ValueType, Idx > | cendValues () const |
| Merges given NodeDatabase informations into current nDB. | |
Private Types | |
| using | ValueType = typename ValueSelect< isScalar, double, Idx >::type |
| template<typename GUM_SCALAR> | |
| using | TestPolicy |
Private Member Functions | |
| Idx | _valueDomain_ (Int2Type< true >) const |
| Idx | _valueDomain_ (Int2Type< false >) const |
| std::string | toString () const |
Private Attributes | |
| HashTable< const DiscreteVariable *, TestPolicy< ValueType > * > | _attrTable_ |
| Table giving for every variables its instantiation. | |
| const DiscreteVariable * | _value_ |
| So does this reference on the value observed. | |
| Idx | _nbObservation_ |
| HashTable< ValueType, Idx > | _valueCount_ |
Observation handling methods | |
| void | addObservation (const Observation *) |
| Nb observation taken into account by this instance. | |
| INLINE Idx | nbObservation () const |
| Nb observation taken into account by this instance. | |
| void | _addObservation_ (const Observation *, Int2Type< true >) |
| Updates database with new observation. | |
| void | _addObservation_ (const Observation *, Int2Type< false >) |
| depending on if we're learning reward function or transition probability | |
<agrum/FMDP/learning/datastructure/nodeDatabase.h>
Definition at line 75 of file nodeDatabase.h.
|
private |
Definition at line 79 of file nodeDatabase.h.
|
private |
Definition at line 76 of file nodeDatabase.h.
| gum::NodeDatabase< AttributeSelection, isScalar >::NodeDatabase | ( | const gum::VariableSet * | attrSet, |
| const DiscreteVariable * | value = nullptr ) |
Default constructor.
Definition at line 64 of file nodeDatabase_tpl.h.
References NodeDatabase(), _attrTable_, _nbObservation_, _value_, gum::Set< Key >::cbeginSafe(), and gum::Set< Key >::cendSafe().
Referenced by NodeDatabase(), ~NodeDatabase(), operator delete(), and operator+=().
| gum::NodeDatabase< AttributeSelection, isScalar >::~NodeDatabase | ( | ) |
Default destructor.
Definition at line 81 of file nodeDatabase_tpl.h.
References NodeDatabase(), and _attrTable_.
|
private |
depending on if we're learning reward function or transition probability
Definition at line 117 of file nodeDatabase_tpl.h.
References _attrTable_, _value_, _valueCount_, and gum::Observation::modality().
|
private |
Updates database with new observation.
Calls either or
Definition at line 107 of file nodeDatabase_tpl.h.
References _attrTable_, _valueCount_, gum::Observation::reward(), and gum::Observation::rModality().
Referenced by addObservation().
|
inlineprivate |
|
inlineprivate |
Definition at line 210 of file nodeDatabase.h.
References _valueCount_.
Referenced by valueDomain().
| void gum::NodeDatabase< AttributeSelection, isScalar >::addObservation | ( | const Observation * | newObs | ) |
Nb observation taken into account by this instance.
Definition at line 101 of file nodeDatabase_tpl.h.
References _addObservation_(), and _nbObservation_.
Referenced by gum::IncrementalGraphLearner< AttributeSelection, false >::insertLeafNode_().
|
inline |
Iterators on value count to recopy correctly its content.
Definition at line 189 of file nodeDatabase.h.
References _valueCount_.
Referenced by operator+=().
|
inline |
Merges given NodeDatabase informations into current nDB.
Definition at line 193 of file nodeDatabase.h.
References _valueCount_.
Referenced by operator+=().
|
inline |
Definition at line 203 of file nodeDatabase.h.
References _valueCount_.
|
inline |
Indicates wether or not, node has sufficient observation so that any statistic is relevant.
Definition at line 147 of file nodeDatabase.h.
References _attrTable_.
|
inline |
Nb observation taken into account by this instance.
Definition at line 134 of file nodeDatabase.h.
References _nbObservation_.
Referenced by operator+=(), and toString().
|
inline |
Default constructor.
Definition at line 105 of file nodeDatabase.h.
References NodeDatabase(), gum::SmallObjectAllocator::deallocate(), and gum::SmallObjectAllocator::instance().
|
inline |
Allocators and Deallocators redefinition.
Definition at line 103 of file nodeDatabase.h.
References gum::SmallObjectAllocator::allocate(), and gum::SmallObjectAllocator::instance().
| NodeDatabase< AttributeSelection, isScalar > & gum::NodeDatabase< AttributeSelection, isScalar >::operator+= | ( | const NodeDatabase< AttributeSelection, isScalar > & | src | ) |
Merges given NodeDatabase informations into current nDB.
Definition at line 136 of file nodeDatabase_tpl.h.
References NodeDatabase(), _attrTable_, _nbObservation_, _valueCount_, cbeginValues(), cendValues(), nbObservation(), and testPolicy().
|
inline |
Returns the performance of given variables according to selection secondary criterion (to break ties).
Definition at line 161 of file nodeDatabase.h.
References _attrTable_.
|
inline |
Returns a reference to nDB test policy for given variable (so that test policy information can be merged too).
Definition at line 182 of file nodeDatabase.h.
References _attrTable_.
Referenced by operator+=().
|
inline |
Returns the performance of given variables according to selection criterion.
Definition at line 155 of file nodeDatabase.h.
References _attrTable_.
|
private |
Definition at line 151 of file nodeDatabase_tpl.h.
References _attrTable_, and nbObservation().
|
inline |
Definition at line 207 of file nodeDatabase.h.
References _valueDomain_().
|
private |
Table giving for every variables its instantiation.
Definition at line 218 of file nodeDatabase.h.
Referenced by NodeDatabase(), ~NodeDatabase(), _addObservation_(), _addObservation_(), isTestRelevant(), operator+=(), testOtherCriterion(), testPolicy(), testValue(), and toString().
|
private |
Definition at line 224 of file nodeDatabase.h.
Referenced by NodeDatabase(), addObservation(), nbObservation(), and operator+=().
|
private |
So does this reference on the value observed.
Definition at line 221 of file nodeDatabase.h.
Referenced by NodeDatabase(), _addObservation_(), and _valueDomain_().
|
private |
Definition at line 227 of file nodeDatabase.h.
Referenced by _addObservation_(), _addObservation_(), _valueDomain_(), cbeginValues(), cendValues(), effectif(), and operator+=().