MultiAgentDecisionProcess  Release 0.2.1
PartialJPPVIndexValuePair Class Reference

PartialJPPVIndexValuePair represents a (PartialJointPolicyPureVector,Value) pair. More...

#include <PartialJPPVIndexValuePair.h>

+ Inheritance diagram for PartialJPPVIndexValuePair:
+ Collaboration diagram for PartialJPPVIndexValuePair:

Public Member Functions

PartialJointPolicyDiscretePureGetJPol ()
 Copy assignment operator.
PartialJointPolicyPureVectorGetPartialJPPV ()
 PartialJPPVIndexValuePair (PartialJointPolicyPureVector *jp, double val)
 PartialJPPVIndexValuePair (const PartialJointPolicyPureVector &jp, double val)
std::string SoftPrint () const
 Softprint the PartialPolicyPoolItemInterface.
std::string SoftPrintBrief () const
 Softprint the PartialPolicyPoolItemInterface in brief.
 ~PartialJPPVIndexValuePair ()
 Destructor.
- Public Member Functions inherited from PartialJointPolicyValuePair
double GetValue () const
 Returns the heuristic value.
PartialJointPolicyValuePairoperator= (const PartialJointPolicyValuePair &o)
 Copy assignment operator.
 PartialJointPolicyValuePair (double val)
 (default) Constructor
 ~PartialJointPolicyValuePair ()
 Destructor.
- Public Member Functions inherited from PartialPolicyPoolItemInterface
void Print () const
 Prints a description to stdout.
void PrintBrief () const
 Prints a brief description to stdout.
virtual ~PartialPolicyPoolItemInterface ()
 (default) Constructor

Private Member Functions

void AllocateJPPV ()

Private Attributes

PartialJointPolicyPureVector_m_jpol
size_t _m_jpolDepth
LIndex _m_jpolIndex
double _m_pastR
const
Interface_ProblemToPolicyDiscretePure
_m_pu

Detailed Description

PartialJPPVIndexValuePair represents a (PartialJointPolicyPureVector,Value) pair.

It stores the LIindex of the the PartialJointPolicyPureVector.

In contrast, JPPVValPair maintains a pointer to the PartialJointPolicyPureVector. This class only stores the LIndex of the PartialJointPolicyPureVector, allowing to free memory. Therefore, this class should be preferred over JPPVValPair when a lot of policies (i.e., policy items) will be retained in memory. E.g., in MAA* like algorithms.

For instance the NewPPI() function in GMAA_MAAstar uses this class (and consequently frees the memory).

Definition at line 54 of file PartialJPPVIndexValuePair.h.

Constructor & Destructor Documentation

PartialJPPVIndexValuePair::~PartialJPPVIndexValuePair ( )

Destructor.

Definition at line 53 of file PartialJPPVIndexValuePair.cpp.

References _m_jpol.

Member Function Documentation

void PartialJPPVIndexValuePair::AllocateJPPV ( )
private
PartialJointPolicyDiscretePure* PartialJPPVIndexValuePair::GetJPol ( )
inlinevirtual

Copy assignment operator.

Returns a pointer to the wrapped (partial) joint policy

Implements PartialPolicyPoolItemInterface.

Definition at line 77 of file PartialJPPVIndexValuePair.h.

References GetPartialJPPV().

PartialJointPolicyPureVector * PartialJPPVIndexValuePair::GetPartialJPPV ( )

Definition at line 58 of file PartialJPPVIndexValuePair.cpp.

References _m_jpol, and AllocateJPPV().

Referenced by GetJPol().

string PartialJPPVIndexValuePair::SoftPrint ( ) const
virtual
string PartialJPPVIndexValuePair::SoftPrintBrief ( ) const
virtual

Member Data Documentation

PartialJointPolicyPureVector* PartialJPPVIndexValuePair::_m_jpol
private
size_t PartialJPPVIndexValuePair::_m_jpolDepth
private

Definition at line 60 of file PartialJPPVIndexValuePair.h.

Referenced by AllocateJPPV(), and PartialJPPVIndexValuePair().

LIndex PartialJPPVIndexValuePair::_m_jpolIndex
private
double PartialJPPVIndexValuePair::_m_pastR
private

Definition at line 61 of file PartialJPPVIndexValuePair.h.

Referenced by AllocateJPPV(), and PartialJPPVIndexValuePair().

const Interface_ProblemToPolicyDiscretePure* PartialJPPVIndexValuePair::_m_pu
private

Definition at line 62 of file PartialJPPVIndexValuePair.h.

Referenced by AllocateJPPV(), and PartialJPPVIndexValuePair().


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