MultiAgentDecisionProcess  Release 0.2.1
JPPVIndexValuePair.cpp
Go to the documentation of this file.
1 
28 #include "JPPVIndexValuePair.h"
29 #include "JointPolicyPureVector.h"
30 
31 using namespace std;
32 
34  double value) :
36 {
37  _m_jpol=0;
38  _m_jpolIndex=jp->GetIndex();
39  _m_jpolDepth=jp->GetDepth();
41 }
42 
44  double value) :
46 {
47  _m_jpol=0;
51 }
52 
54 {
55  delete _m_jpol;
56 }
57 
59 { return GetJPPV(); }
60 
62 {
63  if(_m_jpol==0)
64  AllocateJPPV();
65 
66  return(_m_jpol);
67 }
68 
70 {
71  if(_m_jpol==0) // not yet instantiated, do it now
72  {
76  }
77 }
78 
80 {
81  stringstream ss;
82  ss << "JPPVIndexValuePair: value="<< GetValue() <<", jpolIndex:";
83  ss << _m_jpolIndex;
84  return(ss.str());
85 }
86 
88 {
89  stringstream ss;
90  ss << "JPPVIndexValuePair(" << GetValue() << ","
91  << _m_jpolIndex << ")";
92  return(ss.str());
93 }