Scheduler
|
#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) |
Definition at line 25 of file transitionMatrix.h.
TransitionMatrix::TransitionMatrix | ( | int | nbOfStates, |
int | nbOfActions | ||
) |
Definition at line 22 of file transitionMatrix.cpp.
TransitionMatrix::~TransitionMatrix | ( | ) |
Definition at line 26 of file transitionMatrix.cpp.
Given an initial state s1 and an action a, this function returns the probability to land in state s2.
from | the state from which we start |
to | the state in which we land |
action | the 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...
stateAndAction | is s1*(size of action space) + a. |
to | the 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.
Definition at line 49 of file transitionMatrix.cpp.