MultiAgentDecisionProcess  Release 0.2.1
JPPVIndexValuePair Class Reference

JPPVIndexValuePair represents a (JointPolicyPureVector,Value) pair. More...

#include <JPPVIndexValuePair.h>

+ Inheritance diagram for JPPVIndexValuePair:
+ Collaboration diagram for JPPVIndexValuePair:

Public Member Functions

JointPolicyDiscretePureGetJPol ()
 Copy assignment operator.
JointPolicyPureVectorGetJPPV ()
 JPPVIndexValuePair (JointPolicyPureVector *jp, double value)
 JPPVIndexValuePair (const JointPolicyPureVector &jp, double value)
std::string SoftPrint () const
 Softprint the PolicyPoolItemInterface.
std::string SoftPrintBrief () const
 Softprint the PolicyPoolItemInterface in brief.
 ~JPPVIndexValuePair ()
 Destructor.
- Public Member Functions inherited from JointPolicyValuePair
double GetValue () const
 Returns the heuristic value.
 JointPolicyValuePair (double val)
 (default) Constructor
JointPolicyValuePairoperator= (const JointPolicyValuePair &o)
 Copy assignment operator.
 ~JointPolicyValuePair ()
 Destructor.
- Public Member Functions inherited from PolicyPoolItemInterface
void Print () const
 Prints a description to stdout.
void PrintBrief () const
 Prints a brief description to stdout.
virtual ~PolicyPoolItemInterface ()
 (default) Constructor

Private Member Functions

void AllocateJPPV ()

Private Attributes

JointPolicyPureVector_m_jpol
size_t _m_jpolDepth
LIndex _m_jpolIndex
const
Interface_ProblemToPolicyDiscretePure
_m_pu

Detailed Description

JPPVIndexValuePair represents a (JointPolicyPureVector,Value) pair.

It stores the LIndex of the the JointPolicyPureVector.

In contrast, JPPVValuePair maintains a pointer to the JointPolicyPureVector. This class only stores the LIndex of the JointPolicyPureVector, allowing to free memory. Therefore, this class should be preferred over JPPVValuePair 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 JPPVIndexValuePair.h.

Constructor & Destructor Documentation

JPPVIndexValuePair::JPPVIndexValuePair ( JointPolicyPureVector jp,
double  value 
)
JPPVIndexValuePair::JPPVIndexValuePair ( const JointPolicyPureVector jp,
double  value 
)
JPPVIndexValuePair::~JPPVIndexValuePair ( )

Destructor.

Definition at line 53 of file JPPVIndexValuePair.cpp.

References _m_jpol.

Member Function Documentation

void JPPVIndexValuePair::AllocateJPPV ( )
private
JointPolicyDiscretePure * JPPVIndexValuePair::GetJPol ( )
virtual

Copy assignment operator.

Returns a pointer to the wrapped (partial) joint policy

Implements PolicyPoolItemInterface.

Definition at line 58 of file JPPVIndexValuePair.cpp.

References GetJPPV().

JointPolicyPureVector * JPPVIndexValuePair::GetJPPV ( )

Definition at line 61 of file JPPVIndexValuePair.cpp.

References _m_jpol, and AllocateJPPV().

Referenced by GetJPol().

string JPPVIndexValuePair::SoftPrint ( ) const
virtual

Softprint the PolicyPoolItemInterface.

Implements PolicyPoolItemInterface.

Definition at line 79 of file JPPVIndexValuePair.cpp.

References _m_jpolIndex, and JointPolicyValuePair::GetValue().

string JPPVIndexValuePair::SoftPrintBrief ( ) const
virtual

Softprint the PolicyPoolItemInterface in brief.

Implements PolicyPoolItemInterface.

Definition at line 87 of file JPPVIndexValuePair.cpp.

References _m_jpolIndex, and JointPolicyValuePair::GetValue().

Member Data Documentation

JointPolicyPureVector* JPPVIndexValuePair::_m_jpol
private
size_t JPPVIndexValuePair::_m_jpolDepth
private

Definition at line 60 of file JPPVIndexValuePair.h.

Referenced by AllocateJPPV(), and JPPVIndexValuePair().

LIndex JPPVIndexValuePair::_m_jpolIndex
private

Definition at line 59 of file JPPVIndexValuePair.h.

Referenced by AllocateJPPV(), JPPVIndexValuePair(), SoftPrint(), and SoftPrintBrief().

const Interface_ProblemToPolicyDiscretePure* JPPVIndexValuePair::_m_pu
private

Definition at line 61 of file JPPVIndexValuePair.h.

Referenced by AllocateJPPV(), and JPPVIndexValuePair().


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