Scheduler
|
#include <policy.h>
Public Member Functions | |
Policy (int nbOfStates, int nbOfActions, std::shared_ptr< Utils::RandomGenerator > gen) | |
void | update (state_t state, const std::vector< double > &vector) |
action_t | getAction (state_t state) |
void | initializeUniformly () |
void | initializeRandomly (std::shared_ptr< Utils::RandomGenerator > gen) |
void | initializeFromFile (std::string filename) |
void | saveToFile (std::string filename) |
void | print (std::ostream &stream) |
size_t | getNbOfStates () |
size_t | getNbOfActions () |
Protected Member Functions | |
std::vector< double > * | getActionVector (state_t state) |
void | handleErrorInGettingAction (std::vector< double > *vector, state_t state, double d) |
Protected Attributes | |
std::vector< std::vector< double > > | policy |
size_t | nbOfStates |
size_t | nbOfActions |
std::shared_ptr< Utils::RandomGenerator > | randomGenerator |
Policy::Policy | ( | int | nbOfStates, |
int | nbOfActions, | ||
std::shared_ptr< Utils::RandomGenerator > | gen | ||
) |
Definition at line 22 of file policy.cpp.
Definition at line 98 of file policy.cpp.
|
protected |
Definition at line 93 of file policy.cpp.
size_t Policy::getNbOfActions | ( | ) |
Definition at line 154 of file policy.cpp.
size_t Policy::getNbOfStates | ( | ) |
Definition at line 149 of file policy.cpp.
|
protected |
Definition at line 118 of file policy.cpp.
void Policy::initializeFromFile | ( | std::string | filename | ) |
Definition at line 51 of file policy.cpp.
void Policy::initializeRandomly | ( | std::shared_ptr< Utils::RandomGenerator > | gen | ) |
Definition at line 32 of file policy.cpp.
void Policy::initializeUniformly | ( | ) |
Definition at line 41 of file policy.cpp.
void Policy::print | ( | std::ostream & | stream | ) |
Definition at line 132 of file policy.cpp.
void Policy::saveToFile | ( | std::string | filename | ) |
Definition at line 73 of file policy.cpp.
void Policy::update | ( | state_t | state, |
const std::vector< double > & | vector | ||
) |
Definition at line 79 of file policy.cpp.
|
protected |
|
protected |