![]() |
aGrUM 3.1.1
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_ELEMENT> | |
| 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 65 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(), operator new(), and operator+=().
| gum::NodeDatabase< AttributeSelection, isScalar >::~NodeDatabase | ( | ) |
Default destructor.
Definition at line 82 of file nodeDatabase_tpl.h.
References NodeDatabase(), and _attrTable_.
|
private |
depending on if we're learning reward function or transition probability
Definition at line 118 of file nodeDatabase_tpl.h.
References _attrTable_, _value_, and gum::Observation::modality().
|
private |
Updates database with new observation.
Calls either or
Definition at line 108 of file nodeDatabase_tpl.h.
References _attrTable_, _valueCount_, gum::Observation::reward(), and gum::Observation::rModality().
|
private |
Definition at line 244 of file nodeDatabase_tpl.h.
References _value_.
|
private |
Definition at line 239 of file nodeDatabase_tpl.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 102 of file nodeDatabase_tpl.h.
| auto gum::NodeDatabase< AttributeSelection, isScalar >::cbeginValues | ( | ) | const |
Iterators on value count to recopy correctly its content.
Definition at line 217 of file nodeDatabase_tpl.h.
References _valueCount_.
Referenced by operator+=().
| auto gum::NodeDatabase< AttributeSelection, isScalar >::cendValues | ( | ) | const |
Merges given NodeDatabase informations into current nDB.
Definition at line 223 of file nodeDatabase_tpl.h.
References _valueCount_.
Referenced by operator+=().
| Idx gum::NodeDatabase< AttributeSelection, isScalar >::effectif | ( | Idx | moda | ) | const |
Definition at line 229 of file nodeDatabase_tpl.h.
References _valueCount_.
| bool gum::NodeDatabase< AttributeSelection, isScalar >::isTestRelevant | ( | const DiscreteVariable * | var | ) | const |
Indicates wether or not, node has sufficient observation so that any statistic is relevant.
Definition at line 189 of file nodeDatabase_tpl.h.
| Idx gum::NodeDatabase< AttributeSelection, isScalar >::nbObservation | ( | ) | const |
Nb observation taken into account by this instance.
Definition at line 180 of file nodeDatabase_tpl.h.
Referenced by operator+=(), and toString().
| void gum::NodeDatabase< AttributeSelection, isScalar >::operator delete | ( | void * | p | ) |
Default constructor.
Definition at line 171 of file nodeDatabase_tpl.h.
References NodeDatabase(), gum::SmallObjectAllocator::deallocate(), and gum::SmallObjectAllocator::instance().
| void * gum::NodeDatabase< AttributeSelection, isScalar >::operator new | ( | size_t | s | ) |
Allocators and Deallocators redefinition.
Definition at line 166 of file nodeDatabase_tpl.h.
References NodeDatabase(), 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 137 of file nodeDatabase_tpl.h.
References NodeDatabase(), _attrTable_, _nbObservation_, cbeginValues(), cendValues(), nbObservation(), and testPolicy().
| double gum::NodeDatabase< AttributeSelection, isScalar >::testOtherCriterion | ( | const DiscreteVariable * | var | ) | const |
Returns the performance of given variables according to selection secondary criterion (to break ties).
Definition at line 201 of file nodeDatabase_tpl.h.
References _attrTable_.
| auto gum::NodeDatabase< AttributeSelection, isScalar >::testPolicy | ( | const DiscreteVariable * | var | ) | const |
Returns a reference to nDB test policy for given variable (so that test policy information can be merged too).
Definition at line 211 of file nodeDatabase_tpl.h.
References _attrTable_.
Referenced by operator+=().
| double gum::NodeDatabase< AttributeSelection, isScalar >::testValue | ( | const DiscreteVariable * | var | ) | const |
Returns the performance of given variables according to selection criterion.
Definition at line 196 of file nodeDatabase_tpl.h.
|
private |
Definition at line 152 of file nodeDatabase_tpl.h.
References _attrTable_, and nbObservation().
| Idx gum::NodeDatabase< AttributeSelection, isScalar >::valueDomain | ( | ) | const |
Definition at line 234 of file nodeDatabase_tpl.h.
References _valueDomain_().
|
private |
Table giving for every variables its instantiation.
Definition at line 204 of file nodeDatabase.h.
Referenced by NodeDatabase(), ~NodeDatabase(), _addObservation_(), _addObservation_(), operator+=(), testOtherCriterion(), testPolicy(), and toString().
|
private |
Definition at line 210 of file nodeDatabase.h.
Referenced by NodeDatabase(), and operator+=().
|
private |
So does this reference on the value observed.
Definition at line 207 of file nodeDatabase.h.
Referenced by NodeDatabase(), _addObservation_(), and _valueDomain_().
|
private |
Definition at line 213 of file nodeDatabase.h.
Referenced by _addObservation_(), _valueDomain_(), cbeginValues(), cendValues(), and effectif().