![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
#include <agrum/FMDP/learning/observation.h>
Public Member Functions | |
| std::string | toString () const |
Constructor & destructor. | |
| Observation () | |
| Default constructor. | |
| ~Observation () | |
| Default destructor. | |
| void * | operator new (size_t s) |
| Allocators and Deallocators redefinition. | |
| void | operator delete (void *p) |
| Default constructor. | |
Observation Handlers | |
| INLINE Idx | modality (const DiscreteVariable *var) const |
| Returns the modality assumed by the given variable in this observation. | |
| INLINE Idx | rModality (const DiscreteVariable *var) const |
| Returns the modality assumed by the given variable in this observation. | |
| INLINE void | setModality (const DiscreteVariable *var, Idx modality) |
| Sets the modality assumed by the given variable in this observation. | |
| INLINE void | setRModality (const DiscreteVariable *var, Idx modality) |
| 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. | |
| void | setReward (double reward) |
| Returns the modality assumed by the given variable in this observation. | |
Iterators on Variables | |
| HashTableConstIteratorSafe< const DiscreteVariable *, Idx > | cbeginVariablesSafe () const |
| Returns an const safe iterator on the beginning of the list of variables in this observation. | |
| HashTableConstIteratorSafe< const DiscreteVariable *, Idx > | cendVariablesSafe () const |
| Returns an const safe iterator on the end of the list of variables in this observation. | |
Private Attributes | |
| HashTable< const DiscreteVariable *, Idx > | _varInst_ |
| Table giving for every variables its instantiation. | |
| HashTable< const DiscreteVariable *, Idx > | _rInst_ |
| double | _reward_ |
| The reward associated to this transition. | |
Definition at line 73 of file observation.h.
|
inline |
Default constructor.
Definition at line 83 of file observation.h.
References Observation().
Referenced by Observation(), ~Observation(), and operator delete().
|
inline |
Default destructor.
Definition at line 91 of file observation.h.
References Observation().
|
inline |
Returns an const safe iterator on the beginning of the list of variables in this observation.
Definition at line 162 of file observation.h.
References _varInst_.
|
inline |
Returns an const safe iterator on the end of the list of variables in this observation.
Definition at line 170 of file observation.h.
References _varInst_.
|
inline |
Returns the modality assumed by the given variable in this observation.
| NotFound | if variable is not in this observation |
Definition at line 119 of file observation.h.
References _varInst_.
Referenced by gum::NodeDatabase< AttributeSelection, isScalar >::_addObservation_(), gum::IncrementalGraphLearner< AttributeSelection, isScalar >::_assumeValue_(), gum::IncrementalGraphLearner< AttributeSelection, isScalar >::_branchObs_(), setModality(), and setRModality().
|
inline |
Default constructor.
Definition at line 101 of file observation.h.
References Observation(), gum::SmallObjectAllocator::deallocate(), and gum::SmallObjectAllocator::instance().
|
inline |
Allocators and Deallocators redefinition.
Definition at line 99 of file observation.h.
References gum::SmallObjectAllocator::allocate(), and gum::SmallObjectAllocator::instance().
|
inline |
Returns the modality assumed by the given variable in this observation.
| NotFound | if variable is not in this observation |
Definition at line 142 of file observation.h.
References _reward_.
Referenced by gum::NodeDatabase< AttributeSelection, isScalar >::_addObservation_(), gum::IncrementalGraphLearner< AttributeSelection, isScalar >::_assumeValue_(), gum::FMDPLearner< VariableAttributeSelection, RewardAttributeSelection, LearnerSelection >::addObservation(), and setReward().
|
inline |
Returns the modality assumed by the given variable in this observation.
| NotFound | if variable is not in this observation |
Definition at line 121 of file observation.h.
References _rInst_.
Referenced by gum::NodeDatabase< AttributeSelection, isScalar >::_addObservation_(), and gum::IncrementalGraphLearner< AttributeSelection, isScalar >::_branchObs_().
|
inline |
Sets the modality assumed by the given variable in this observation.
| DuplicateElement | if a value has already be assigned to this variable |
Definition at line 131 of file observation.h.
References _varInst_, and modality().
Referenced by gum::SDYNA::feedback().
|
inline |
Returns the modality assumed by the given variable in this observation.
| NotFound | if variable is not in this observation |
Definition at line 147 of file observation.h.
References _reward_, and reward().
Referenced by gum::SDYNA::feedback().
|
inline |
Returns the modality assumed by the given variable in this observation.
| NotFound | if variable is not in this observation |
Definition at line 135 of file observation.h.
References _rInst_, and modality().
Referenced by gum::SDYNA::feedback().
| std::string gum::Observation::toString | ( | ) | const |
Definition at line 46 of file observation.cpp.
|
private |
The reward associated to this transition.
Definition at line 182 of file observation.h.
Referenced by reward(), and setReward().
|
private |
Definition at line 179 of file observation.h.
Referenced by rModality(), setRModality(), and toString().
|
private |
Table giving for every variables its instantiation.
Definition at line 178 of file observation.h.
Referenced by cbeginVariablesSafe(), cendVariablesSafe(), modality(), setModality(), and toString().