Scheduler
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
mdp
transitionMatrix.h
Go to the documentation of this file.
1
10
#ifndef MDPTRANSITIONMATRIX_H
11
#define MDPTRANSITIONMATRIX_H
12
13
#include <memory>
14
#include <ostream>
15
#include <vector>
16
17
#include "
state.h
"
18
#include "
action_impl.h
"
19
20
namespace
Utils
{
class
RandomGenerator;}
21
22
namespace
Mdp
23
{
24
25
class
TransitionMatrix
26
{
27
public
:
28
TransitionMatrix
(
int
nbOfStates,
int
nbOfActions);
29
~
TransitionMatrix
();
30
void
set
(
state_t
from,
state_t
to,
action_t
action,
double
proba);
37
double
get
(
state_t
from,
state_t
to,
action_t
action);
44
double
get
(
size_t
stateAndAction,
state_t
to);
45
void
initializeRandomly(std::shared_ptr<Utils::RandomGenerator> gen);
46
void
print(std::ostream& stream);
47
private
:
48
double
*getArray();
49
50
double
*matrix{
nullptr
};
51
size_t
nbOfStates;
52
size_t
nbOfActions;
53
};
54
55
56
}
57
58
#endif
Mdp::action_t
size_t action_t
Definition:
action_impl.h:18
Mdp
Definition:
action.h:18
state.h
Mdp::state_t
size_t state_t
Definition:
state.h:19
Mdp::TransitionMatrix
Definition:
transitionMatrix.h:25
Utils
Definition:
context.h:16
action_impl.h
Generated on Sun Nov 26 2017 17:01:36 for Scheduler by
1.8.11