32 #ifndef GUM_OBSERVATION_H 33 #define GUM_OBSERVATION_H 35 #include <agrum/tools/core/hashTable.h> 36 #include <agrum/tools/core/smallobjectallocator/smallObjectAllocator.h> 38 #include <agrum/tools/variables/discreteVariable.h> 64 GUM_CONSTRUCTOR(Observation);
72 GUM_DESTRUCTOR(Observation);
79 void*
operator new(size_t s) {
return SmallObjectAllocator::instance().allocate(s); }
81 SmallObjectAllocator::instance().deallocate(p,
sizeof(Observation));
140 return _varInst_.cbeginSafe();
148 return _varInst_.cendSafe();
void operator delete(void *p)
Default constructor.
INLINE void emplace(Args &&... args)
~Observation()
Default destructor.
HashTableConstIteratorSafe< const DiscreteVariable *, Idx > cendVariablesSafe() const
Returns an const safe iterator on the end of the list of variables in this observation.
Observation()
Default constructor.
HashTableConstIteratorSafe< const DiscreteVariable *, Idx > cbeginVariablesSafe() const
Returns an const safe iterator on the beginning of the list of variables in this observation.
HashTable< const DiscreteVariable *, Idx > _varInst_
Table giving for every variables its instantiation.
std::string toString() const
HashTable< const DiscreteVariable *, Idx > _rInst_
double _reward_
The reward associated to this transition.
void * operator new(size_t s)
Allocators and Deallocators redefinition.