Scheduler
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Mdp::StateSpace Class Reference

#include <stateSpace.h>

Inheritance diagram for Mdp::StateSpace:
CustomStateSpace CustomStateSpace

Public Member Functions

 StateSpace (const StateSpace &)=delete
 
StateSpaceoperator= (const StateSpace &)=delete
 
 ~StateSpace ()
 
virtual size_t size ()
 
virtual state_t getState ()
 
virtual void updateCurrentState ()
 
virtual double getReward ()
 
virtual size_t getNbOfDimensions ()
 
virtual std::vector< size_t > * factorize (state_t state)
 
virtual std::vector< size_t > getDimensionSizes ()
 

Protected Member Functions

 StateSpace ()
 
void updateInternalState ()
 
int getPriorityStateInternal ()
 
 StateSpace (size_t nbOfStates, size_t nbOfPriorityStates, std::vector< StateSpaceDimension * > dimensions, std::vector< PriorityState * > priorityStates)
 
state_t convertState (StateInternal)
 

Protected Attributes

size_t nbOfStates {0}
 
size_t nbOfPriorityStates {0}
 
std::vector< StateSpaceDimension * > dimensions
 
std::vector< PriorityState * > priorityStates
 
StateInternal currentState
 
std::shared_ptr< DomainModeldomainModel {nullptr}
 
state_t currentExternalState {0}
 
StateInternal internalState
 

Friends

class StateSpaceBuilder
 

Detailed Description

Definition at line 29 of file stateSpace.h.

Constructor & Destructor Documentation

Mdp::StateSpace::StateSpace ( const StateSpace )
delete
StateSpace::~StateSpace ( )

Definition at line 34 of file stateSpace.cpp.

Mdp::StateSpace::StateSpace ( )
inlineprotected

Definition at line 57 of file stateSpace.h.

StateSpace::StateSpace ( size_t  nbOfStates,
size_t  nbOfPriorityStates,
std::vector< StateSpaceDimension * >  dimensions,
std::vector< PriorityState * >  priorityStates 
)
protected

Definition at line 25 of file stateSpace.cpp.

Member Function Documentation

state_t StateSpace::convertState ( StateInternal  iState)
protected

Definition at line 132 of file stateSpace.cpp.

std::vector< size_t > * StateSpace::factorize ( state_t  state)
virtual

Returns the state as a factorized vector: one element for each dimension

Definition at line 81 of file stateSpace.cpp.

std::vector< size_t > StateSpace::getDimensionSizes ( )
virtual

Returns for each state dimension, the number of positions

Definition at line 120 of file stateSpace.cpp.

size_t StateSpace::getNbOfDimensions ( )
virtual

Returns the number of dimensions in the state space

Definition at line 75 of file stateSpace.cpp.

int StateSpace::getPriorityStateInternal ( )
protected

Definition at line 150 of file stateSpace.cpp.

double StateSpace::getReward ( )
virtual

Return the immediate reward corresponding to the current state

Reimplemented in CustomStateSpace, and CustomStateSpace.

Definition at line 166 of file stateSpace.cpp.

state_t StateSpace::getState ( )
virtual

Reimplemented in CustomStateSpace, and CustomStateSpace.

Definition at line 54 of file stateSpace.cpp.

StateSpace& Mdp::StateSpace::operator= ( const StateSpace )
delete
size_t StateSpace::size ( )
virtual

Reimplemented in CustomStateSpace, and CustomStateSpace.

Definition at line 160 of file stateSpace.cpp.

void StateSpace::updateCurrentState ( )
virtual

The only reason why getState and updateCurrentState are two different functions is for performance

Reimplemented in CustomStateSpace, and CustomStateSpace.

Definition at line 59 of file stateSpace.cpp.

void StateSpace::updateInternalState ( )
protected

This returns the state in the part of the state space that has dimensions. If the current state is actually a priority state, this value is not the real current state.

Definition at line 42 of file stateSpace.cpp.

Friends And Related Function Documentation

friend class StateSpaceBuilder
friend

Definition at line 31 of file stateSpace.h.

Member Data Documentation

state_t Mdp::StateSpace::currentExternalState {0}
protected

Definition at line 76 of file stateSpace.h.

StateInternal Mdp::StateSpace::currentState
protected

Definition at line 74 of file stateSpace.h.

std::vector<StateSpaceDimension *> Mdp::StateSpace::dimensions
protected

Definition at line 72 of file stateSpace.h.

std::shared_ptr<DomainModel> Mdp::StateSpace::domainModel {nullptr}
protected

Definition at line 75 of file stateSpace.h.

StateInternal Mdp::StateSpace::internalState
protected

Definition at line 78 of file stateSpace.h.

size_t Mdp::StateSpace::nbOfPriorityStates {0}
protected

Definition at line 71 of file stateSpace.h.

size_t Mdp::StateSpace::nbOfStates {0}
protected

Definition at line 70 of file stateSpace.h.

std::vector<PriorityState *> Mdp::StateSpace::priorityStates
protected

Definition at line 73 of file stateSpace.h.


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