Scheduler
Public Member Functions | List of all members
Mdp::TransitionMatrix Class Reference

#include <transitionMatrix.h>

Public Member Functions

 TransitionMatrix (int nbOfStates, int nbOfActions)
 
 ~TransitionMatrix ()
 
void set (state_t from, state_t to, action_t action, double proba)
 
double get (state_t from, state_t to, action_t action)
 
double get (size_t stateAndAction, state_t to)
 
void initializeRandomly (std::shared_ptr< Utils::RandomGenerator > gen)
 
void print (std::ostream &stream)
 

Detailed Description

Definition at line 25 of file transitionMatrix.h.

Constructor & Destructor Documentation

TransitionMatrix::TransitionMatrix ( int  nbOfStates,
int  nbOfActions 
)

Definition at line 22 of file transitionMatrix.cpp.

TransitionMatrix::~TransitionMatrix ( )

Definition at line 26 of file transitionMatrix.cpp.

Member Function Documentation

double TransitionMatrix::get ( state_t  from,
state_t  to,
action_t  action 
)

Given an initial state s1 and an action a, this function returns the probability to land in state s2.

Parameters
fromthe state from which we start
tothe state in which we land
actionthe actino taken in the initial state

Definition at line 34 of file transitionMatrix.cpp.

double TransitionMatrix::get ( size_t  stateAndAction,
state_t  to 
)

Given an initial state s1 and an action a, this function returns the probability to land in state s2.

This function breaks hiding of implementation but makes things easier for the policy calculation...

Parameters
stateAndActionis s1*(size of action space) + a.
tothe state in which we land

Definition at line 41 of file transitionMatrix.cpp.

void TransitionMatrix::initializeRandomly ( std::shared_ptr< Utils::RandomGenerator gen)

Definition at line 57 of file transitionMatrix.cpp.

void TransitionMatrix::print ( std::ostream &  stream)

Definition at line 73 of file transitionMatrix.cpp.

void TransitionMatrix::set ( state_t  from,
state_t  to,
action_t  action,
double  proba 
)

Definition at line 49 of file transitionMatrix.cpp.


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