MultiAgentDecisionProcess
Release 0.2.1
|
ObservationHistoryTree is a wrapper for the ObservationHistory class. More...
#include <ObservationHistoryTree.h>
Public Member Functions | |
size_t | GetLength () const |
Returns the length of the contained ObservationHistory. | |
ObservationHistory * | GetObservationHistory () const |
ObservationHistoryTree * | GetPredecessor () const |
Get the predecessor TreeNode*. | |
ObservationHistoryTree * | GetSuccessor (Index jObsI) |
Get the succesor TreeNode* for the sucI'th successor. | |
ObservationHistoryTree (ObservationHistory *const oh) | |
Create a joint observation history tree for joh. | |
ObservationHistoryTree (const ObservationHistoryTree &a) | |
Copy constructor. | |
![]() | |
bool | ExistsSuccessor (Index sucI) |
Check whether a particular successor sucI exists. | |
ObservationHistory * | GetContainedElement () const |
Returns a pointer to the contained element (Tcontained) | |
Index | GetIndex () const |
Returns the index of this TreeNode (and thus corresponding to the contained element). | |
void | Print () const |
Prints the tree starting from this node of the history tree (including the successors). | |
void | PrintThisNode () const |
Prints only this node of the history tree (not the successors). | |
void | SetIndex (Index i) |
Sets the index to i. | |
void | SetPredeccessor (TreeNode< ObservationHistory > *pred) |
Sets the predecessor of this node to be pred. | |
void | SetSuccessor (Index sucI, TreeNode< ObservationHistory > *suc) |
Sets the sucI'th successor of this TreeNode to suc. | |
TreeNode () | |
(default) Constructor | |
TreeNode (ObservationHistory *const oh) | |
TreeNode (const TreeNode &a) | |
Copy constructor. | |
virtual | ~TreeNode () |
Destructor. |
Additional Inherited Members | |
![]() | |
ObservationHistory * | _m_containedElem |
The contained element. | |
Index | _m_index |
The index of this TreeNode (and thus of the contained Tcontained - typically an observation history). | |
bool | _m_indexValid |
Whether the index is valid. | |
TreeNode< ObservationHistory > * | _m_pred |
A Pointer to the predecessor. | |
std::map< Index, TreeNode < ObservationHistory > * > | _m_successor |
The map that stores the pointers to the successor TreeNodes. |
ObservationHistoryTree is a wrapper for the ObservationHistory class.
An ObservationHistoryTree actually represents a node in the tree of observation histories. But each node also specifies a (sub-)tree so there is no actual difference between a tree and a node. This implementation assumes that ObservationHistories are always contained in exactly 1 ObservationHistoryTree: i.e., deleting an object of ObservationHistoryTree will free the memory of the node and the subtree represented by it as well as the memory of all the contained ObservationHistories.
Definition at line 46 of file ObservationHistoryTree.h.
|
inline |
Create a joint observation history tree for joh.
Definition at line 55 of file ObservationHistoryTree.h.
|
inline |
Copy constructor.
Definition at line 59 of file ObservationHistoryTree.h.
|
inline |
Returns the length of the contained ObservationHistory.
Definition at line 69 of file ObservationHistoryTree.h.
References TreeNode< ObservationHistory >::GetContainedElement().
|
inline |
Definition at line 77 of file ObservationHistoryTree.h.
References TreeNode< ObservationHistory >::GetContainedElement().
Referenced by PlanningUnitMADPDiscrete::CreateObservationHistoryTree().
|
inline |
Get the predecessor TreeNode*.
Reimplemented from TreeNode< ObservationHistory >.
Definition at line 80 of file ObservationHistoryTree.h.
|
inline |
Get the succesor TreeNode* for the sucI'th successor.
Reimplemented from TreeNode< ObservationHistory >.
Definition at line 85 of file ObservationHistoryTree.h.
Referenced by ActionObservationHistory::ActionObservationHistory(), and JointObservationHistory::JointObservationHistory().