MultiAgentDecisionProcess  Release 0.2.1
ObservationHistoryTree Class Reference

ObservationHistoryTree is a wrapper for the ObservationHistory class. More...

#include <ObservationHistoryTree.h>

+ Inheritance diagram for ObservationHistoryTree:
+ Collaboration diagram for ObservationHistoryTree:

Public Member Functions

size_t GetLength () const
 Returns the length of the contained ObservationHistory.
ObservationHistoryGetObservationHistory () const
ObservationHistoryTreeGetPredecessor () const
 Get the predecessor TreeNode*.
ObservationHistoryTreeGetSuccessor (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.
- Public Member Functions inherited from TreeNode< ObservationHistory >
bool ExistsSuccessor (Index sucI)
 Check whether a particular successor sucI exists.
ObservationHistoryGetContainedElement () 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

- Protected Attributes inherited from TreeNode< ObservationHistory >
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.

Detailed Description

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.

Constructor & Destructor Documentation

ObservationHistoryTree::ObservationHistoryTree ( ObservationHistory *const  oh)
inline

Create a joint observation history tree for joh.

Definition at line 55 of file ObservationHistoryTree.h.

ObservationHistoryTree::ObservationHistoryTree ( const ObservationHistoryTree a)
inline

Copy constructor.

Definition at line 59 of file ObservationHistoryTree.h.

Member Function Documentation

size_t ObservationHistoryTree::GetLength ( ) const
inline

Returns the length of the contained ObservationHistory.

Definition at line 69 of file ObservationHistoryTree.h.

References TreeNode< ObservationHistory >::GetContainedElement().

ObservationHistory* ObservationHistoryTree::GetObservationHistory ( ) const
inline
ObservationHistoryTree* ObservationHistoryTree::GetPredecessor ( ) const
inline

Get the predecessor TreeNode*.

Reimplemented from TreeNode< ObservationHistory >.

Definition at line 80 of file ObservationHistoryTree.h.

ObservationHistoryTree* ObservationHistoryTree::GetSuccessor ( Index  sucI)
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().


The documentation for this class was generated from the following file: