MultiAgentDecisionProcess
Release 0.2.1
|
TransitionModelMappingSparse implements a TransitionModelDiscrete. More...
#include <TransitionModelMappingSparse.h>
Public Types | |
typedef boost::numeric::ublas::compressed_matrix < double > | SparseMatrix |
Public Member Functions | |
virtual TransitionModelMappingSparse * | Clone () const |
Returns a pointer to a copy of this class. | |
double | Get (Index sI, Index jaI, Index sucSI) const |
Returns P(s'|s,ja). | |
const SparseMatrix * | GetMatrixPtr (Index a) const |
Get a pointer to a transition matrix for a particular action. | |
void | Set (Index sI, Index jaI, Index sucSI, double prob) |
Sets P(s'|s,ja) | |
TransitionModelMappingSparse (int nrS=1, int nrJA=1) | |
default Constructor | |
TransitionModelMappingSparse (const TransitionModelMappingSparse &TM) | |
Copy constructor. | |
~TransitionModelMappingSparse () | |
Destructor. | |
![]() | |
Index | SampleSuccessorState (Index sI, Index jaI) |
Sample a successor state. | |
std::string | SoftPrint () const |
SoftPrints tabular transition model. | |
TransitionModelDiscrete (int nrS=1, int nrJA=1) | |
Constructor with the dimensions of the transition model. | |
virtual | ~TransitionModelDiscrete () |
![]() | |
void | Print () const |
TransitionModel () | |
default Constructor | |
virtual | ~TransitionModel () |
Destructor. |
Private Attributes | |
std::vector< SparseMatrix * > | _m_T |
Friends | |
class | TGet_TransitionModelMappingSparse |
TransitionModelMappingSparse implements a TransitionModelDiscrete.
Uses sparse matrices.
Definition at line 42 of file TransitionModelMappingSparse.h.
typedef boost::numeric::ublas::compressed_matrix<double> TransitionModelMappingSparse::SparseMatrix |
Definition at line 49 of file TransitionModelMappingSparse.h.
TransitionModelMappingSparse::TransitionModelMappingSparse | ( | int | nrS = 1 , |
int | nrJA = 1 |
||
) |
default Constructor
Definition at line 32 of file TransitionModelMappingSparse.cpp.
References _m_T.
Referenced by Clone().
TransitionModelMappingSparse::TransitionModelMappingSparse | ( | const TransitionModelMappingSparse & | TM | ) |
TransitionModelMappingSparse::~TransitionModelMappingSparse | ( | ) |
|
inlinevirtual |
Returns a pointer to a copy of this class.
Implements TransitionModelDiscrete.
Definition at line 91 of file TransitionModelMappingSparse.h.
References TransitionModelMappingSparse().
|
inlinevirtual |
Returns P(s'|s,ja).
Implements TransitionModelDiscrete.
Definition at line 70 of file TransitionModelMappingSparse.h.
References _m_T.
|
inline |
Get a pointer to a transition matrix for a particular action.
Definition at line 87 of file TransitionModelMappingSparse.h.
References _m_T.
Referenced by AlphaVectorPlanning::Initialize(), and MDPValueIteration::Plan().
|
inlinevirtual |
Sets P(s'|s,ja)
sI, jaI, sucSI, are indices of the state, taken joint action and resulting successor state. prob is the probability. The order of events is s, ja, s', so is the arg. list
Implements TransitionModelDiscrete.
Definition at line 79 of file TransitionModelMappingSparse.h.
References _m_T, prob, and Globals::PROB_PRECISION.
|
friend |
Definition at line 94 of file TransitionModelMappingSparse.h.
|
private |
Definition at line 54 of file TransitionModelMappingSparse.h.
Referenced by Get(), GetMatrixPtr(), Set(), TGet_TransitionModelMappingSparse::TGet_TransitionModelMappingSparse(), TransitionModelMappingSparse(), and ~TransitionModelMappingSparse().