![]() |
aGrUM 3.1.1
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 | |
| Idx | modality (const DiscreteVariable *var) const |
| Returns the modality assumed by the given variable in this observation. | |
| Idx | rModality (const DiscreteVariable *var) const |
| Returns the modality assumed by the given variable in this observation. | |
| void | setModality (const DiscreteVariable *var, Idx modality) |
| Sets the modality assumed by the given variable in this observation. | |
| 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 gum::Observation::Observation | ( | ) |
Default constructor.
Definition at line 48 of file observation_inl.h.
References Observation().
Referenced by Observation(), ~Observation(), and operator delete().
| INLINE gum::Observation::~Observation | ( | ) |
Default destructor.
Definition at line 53 of file observation_inl.h.
References Observation().
| INLINE HashTableConstIteratorSafe< const DiscreteVariable *, Idx > gum::Observation::cbeginVariablesSafe | ( | ) | const |
Returns an const safe iterator on the beginning of the list of variables in this observation.
Definition at line 83 of file observation_inl.h.
References _varInst_.
| INLINE HashTableConstIteratorSafe< const DiscreteVariable *, Idx > gum::Observation::cendVariablesSafe | ( | ) | const |
Returns an const safe iterator on the end of the list of variables in this observation.
Definition at line 88 of file observation_inl.h.
References _varInst_.
| INLINE Idx gum::Observation::modality | ( | const DiscreteVariable * | var | ) | const |
Returns the modality assumed by the given variable in this observation.
| NotFound | if variable is not in this observation |
Definition at line 66 of file observation_inl.h.
References _varInst_.
Referenced by gum::NodeDatabase< AttributeSelection, isScalar >::_addObservation_(), gum::IncrementalGraphLearner< AttributeSelection, isScalar >::_assumeValue_(), gum::IncrementalGraphLearner< AttributeSelection, isScalar >::_branchObs_(), setModality(), and setRModality().
| INLINE void gum::Observation::operator delete | ( | void * | p | ) |
Default constructor.
Definition at line 62 of file observation_inl.h.
References Observation(), gum::SmallObjectAllocator::deallocate(), and gum::SmallObjectAllocator::instance().
| INLINE void * gum::Observation::operator new | ( | size_t | s | ) |
Allocators and Deallocators redefinition.
Definition at line 58 of file observation_inl.h.
References gum::SmallObjectAllocator::allocate(), and gum::SmallObjectAllocator::instance().
| INLINE double gum::Observation::reward | ( | ) | const |
Returns the modality assumed by the given variable in this observation.
| NotFound | if variable is not in this observation |
Definition at line 78 of file observation_inl.h.
References _reward_.
Referenced by gum::NodeDatabase< AttributeSelection, isScalar >::_addObservation_(), gum::IncrementalGraphLearner< AttributeSelection, isScalar >::_assumeValue_(), gum::FMDPLearner< VariableAttributeSelection, RewardAttributeSelection, LearnerSelection >::addObservation(), and setReward().
| INLINE Idx gum::Observation::rModality | ( | const DiscreteVariable * | var | ) | const |
Returns the modality assumed by the given variable in this observation.
| NotFound | if variable is not in this observation |
Definition at line 68 of file observation_inl.h.
References _rInst_.
Referenced by gum::NodeDatabase< AttributeSelection, isScalar >::_addObservation_(), and gum::IncrementalGraphLearner< AttributeSelection, isScalar >::_branchObs_().
| INLINE void gum::Observation::setModality | ( | const DiscreteVariable * | var, |
| Idx | modality ) |
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 70 of file observation_inl.h.
References _varInst_, and modality().
Referenced by gum::SDYNA::feedback().
| INLINE void gum::Observation::setReward | ( | double | reward | ) |
Returns the modality assumed by the given variable in this observation.
| NotFound | if variable is not in this observation |
Definition at line 80 of file observation_inl.h.
References _reward_, and reward().
Referenced by gum::SDYNA::feedback().
| INLINE void gum::Observation::setRModality | ( | const DiscreteVariable * | var, |
| Idx | modality ) |
Returns the modality assumed by the given variable in this observation.
| NotFound | if variable is not in this observation |
Definition at line 74 of file observation_inl.h.
References _rInst_, and modality().
Referenced by gum::SDYNA::feedback().
| std::string gum::Observation::toString | ( | ) | const |
Definition at line 50 of file observation.cpp.
|
private |
The reward associated to this transition.
Definition at line 166 of file observation.h.
Referenced by reward(), and setReward().
|
private |
Definition at line 163 of file observation.h.
Referenced by rModality(), setRModality(), and toString().
|
private |
Table giving for every variables its instantiation.
Definition at line 162 of file observation.h.
Referenced by cbeginVariablesSafe(), cendVariablesSafe(), modality(), setModality(), and toString().