MultiAgentDecisionProcess
|
PartialJPPVIndexValuePair represents a (PartialJointPolicyPureVector,Value) pair. More...
#include <PartialJPPVIndexValuePair.h>
Public Member Functions | |
PartialJointPolicyDiscretePure * | GetJPol () |
PartialJointPolicyPureVector * | GetPartialJPPV () |
PartialJPPVIndexValuePair (PartialJointPolicyPureVector *jp, double val) | |
PartialJPPVIndexValuePair (const PartialJointPolicyPureVector &jp, double val) | |
std::string | SoftPrint () const |
Softprint the PartialPolicyPoolItemInterface. More... | |
std::string | SoftPrintBrief () const |
Softprint the PartialPolicyPoolItemInterface in brief. More... | |
~PartialJPPVIndexValuePair () | |
Destructor. More... | |
Public Member Functions inherited from PartialJointPolicyValuePair | |
double | GetValue () const |
Returns the heuristic value. More... | |
PartialJointPolicyValuePair & | operator= (const PartialJointPolicyValuePair &o) |
Copy assignment operator. More... | |
PartialJointPolicyValuePair (double val) | |
(default) Constructor More... | |
void | SetValue (double value) |
Sets the heuristic value. More... | |
~PartialJointPolicyValuePair () | |
Destructor. More... | |
Public Member Functions inherited from PartialPolicyPoolItemInterface | |
virtual void | CleanUpBGIPSolver ()=0 |
Deletes the BGIPSolver instance associated with this PPI. More... | |
virtual PartialPolicyPoolItemInterface * | Clone () const =0 |
Returns a pointer to a copy of this class. More... | |
virtual boost::shared_ptr < BGCG_Solver > | GetBGCGSolverPointer () const =0 |
Returns a pointer to the BGIPSolver instance generated by this PartialJointPolicyDiscretePure. More... | |
virtual boost::shared_ptr < BayesianGameIdenticalPayoffSolver_T < JointPolicyPureVectorForClusteredBG > > | GetBGIPSolver_T_PointerCluster () const =0 |
Returns a pointer to the BGIPSolver instance generated by this PartialJointPolicyDiscretePure. More... | |
virtual boost::shared_ptr < BayesianGameIdenticalPayoffSolver_T < JointPolicyPureVector > > | GetBGIPSolver_T_PointerJPPV () const =0 |
Returns a pointer to the BGIPSolver instance generated by this PartialJointPolicyDiscretePure. More... | |
virtual boost::shared_ptr < BayesianGameIdenticalPayoffSolver > | GetBGIPSolverPointer () const =0 |
Returns a pointer to the BGIPSolver instance generated by this PartialJointPolicyDiscretePure. More... | |
virtual boost::shared_ptr < PartialJointPolicyDiscretePure > | GetJPol () const =0 |
Copy assignment operator. More... | |
void | Print () const |
Prints a description to stdout. More... | |
void | PrintBrief () const |
Prints a brief description to stdout. More... | |
virtual void | SetBGCGSolverPointer (const boost::shared_ptr< BGCG_Solver > &bgcgs)=0 |
Sets the pointer to the BGIPSolver instance associated with this PartialJointPolicyDiscretePure. More... | |
virtual void | SetBGIPSolver_T_Pointer (const boost::shared_ptr< BayesianGameIdenticalPayoffSolver_T< JointPolicyPureVector > > &bgips)=0 |
Sets the pointer to the BGIPSolver instance associated with this PartialJointPolicyDiscretePure. More... | |
virtual void | SetBGIPSolver_T_Pointer (const boost::shared_ptr< BayesianGameIdenticalPayoffSolver_T< JointPolicyPureVectorForClusteredBG > > &bgips)=0 |
Sets the pointer to the BGIPSolver instance associated with this PartialJointPolicyDiscretePure. More... | |
virtual void | SetBGIPSolverPointer (const boost::shared_ptr< BayesianGameIdenticalPayoffSolver > &bgips)=0 |
Sets the pointer to the BGIPSolver instance associated with this PartialJointPolicyDiscretePure. More... | |
virtual | ~PartialPolicyPoolItemInterface () |
(default) Constructor More... | |
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 |
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).
PartialJPPVIndexValuePair::PartialJPPVIndexValuePair | ( | PartialJointPolicyPureVector * | jp, |
double | val | ||
) |
References _m_jpol, _m_jpolDepth, _m_jpolIndex, _m_pu, JointPolicy::GetDepth(), and PartialJointPolicyPureVector::GetIndex().
PartialJPPVIndexValuePair::PartialJPPVIndexValuePair | ( | const PartialJointPolicyPureVector & | jp, |
double | val | ||
) |
PartialJPPVIndexValuePair::~PartialJPPVIndexValuePair | ( | ) |
Destructor.
References _m_jpol.
|
private |
References _m_jpol, _m_jpolDepth, _m_jpolIndex, _m_pastR, _m_pu, PolicyGlobals::OHIST_INDEX, and PartialJointPolicyPureVector::SetIndex().
Referenced by GetPartialJPPV().
|
inline |
References GetPartialJPPV().
PartialJointPolicyPureVector * PartialJPPVIndexValuePair::GetPartialJPPV | ( | ) |
References _m_jpol, and AllocateJPPV().
Referenced by GetJPol().
|
virtual |
Softprint the PartialPolicyPoolItemInterface.
Implements PartialPolicyPoolItemInterface.
References _m_jpolIndex, and PartialJointPolicyValuePair::GetValue().
|
virtual |
Softprint the PartialPolicyPoolItemInterface in brief.
Implements PartialPolicyPoolItemInterface.
References _m_jpolIndex, and PartialJointPolicyValuePair::GetValue().
|
private |
Referenced by AllocateJPPV(), GetPartialJPPV(), PartialJPPVIndexValuePair(), and ~PartialJPPVIndexValuePair().
|
private |
Referenced by AllocateJPPV(), and PartialJPPVIndexValuePair().
|
private |
Referenced by AllocateJPPV(), PartialJPPVIndexValuePair(), SoftPrint(), and SoftPrintBrief().
|
private |
Referenced by AllocateJPPV(), and PartialJPPVIndexValuePair().
|
private |
Referenced by AllocateJPPV(), and PartialJPPVIndexValuePair().