27 #ifndef GUM_FMDP_FACTORY_H 28 #define GUM_FMDP_FACTORY_H 67 template <
typename GUM_SCALAR >
148 void addAction(
const std::string& action);
274 std::vector< const MultiDimImplementation< GUM_SCALAR >* >
__ddBag;
314 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 323 #endif // GUM_FMDP_FACTORY_H void addReward()
Tells the factory to add a reward table to the current fmdp. This reward table will be extracted from...
void __illegalStateError(const std::string &s)
Raise an OperationNotAllowed with the message "Illegal state.".
std::vector< std::string > __stringBag
Just to keep track of strings between two start/end calls.
void endTransitionDeclaration()
Tells the factory that we're out of a transition declaration.
FMDPfactory_state state() const
Returns the current state of the factory.
void __resetParts()
Reset the different parts used to constructed the FMDP.
void endActionDeclaration()
Tells the factory that we're out of an action declaration.
A factory class to ease Factored Markov Decision Process construction.
FMDPFactory< GUM_SCALAR > & operator=(const FMDPFactory< GUM_SCALAR > &source)
Copy operator is illegal, use only copy constructor.
void addAction(const std::string &action)
Tells the factory to add an action to the current fmdp.
void __initializeFunctionGraph()
Insert every variables in the function graph.
Header file of gum::Sequence, a class for storing (ordered) sequences of objects. ...
MultiDimFunctionGraph< GUM_SCALAR > * __FunctionGraph
The FunctionGraph we're building at a given time.
void startDiscountDeclaration()
Tells the factory that we're in a cost declaration.
FMDPfactory_state
The enumeration of states in which the factory can be in.
void startActionDeclaration()
Tells the factory that we're in an action declaration.
Template Implementation of the FMDPFactory class.
void addDiscount(float discount)
Tells the factory to add a cost table to the current fmdp.
void startVariableDeclaration()
Tells the factory that we're in a variable declaration.
void endCostDeclaration()
Tells the factory that we're out of a cost declaration.
void addArc(NodeId from, NodeId to, Idx modality)
Insert in diagram a non terminal node.
void setRoot(NodeId rootId)
add an arc in diagram
const DiscreteVariable * variable(const std::string &name) const
Returns a constant reference on a variable given it's name.
This class is used to implement factored decision process.
void addModality(const std::string &name)
Adds a modality to the current variable.
Base class for discrete random variable.
gum is the global namespace for all aGrUM entities
void __checkModalityInBag(const std::string &mod)
Used in VARIABLE mode Checks if in __stringBag there is no other modality with the same name...
bool __bar_flag
Depending on the context this flag is used for some VERY important reasons.
The class for generic Hash Tables.
FMDP< GUM_SCALAR > * fmdp() const
Returns the Factored Markov Decision Process created by this factory.
Class for implementation of factored markov decision process.
void endDiscountDeclaration()
Tells the factory that we're out of a cost declaration.
~FMDPFactory()
Destructor.
void addTransition(const std::string &var, const MultiDimAdressable *transition)
Tells the factory to add a transition table to the current fmdp.
void addCost()
Tells the factory to add a cost table to the current fmdp. This cost table will be extracted from inc...
Idx __actionIdcpt
Action Id counter.
void endRewardDeclaration()
Tells the factory that we're out of a cost declaration.
HashTable< std::string, const DiscreteVariable *> __varNameMap
Mapping between a declared variable's name and itself.
std::vector< FMDPfactory_state > __states
State stack.
void endVariableDeclaration()
Tells the factory that we're out of a variable declaration.
NodeId addInternalNode(std::string name_of_var)
Insert in diagram a non terminal node.
void startCostDeclaration()
Tells the factory that we're in a cost declaration.
NodeId addTerminalNode(float value)
Insert in diagram a terminal node.
void variableName(const std::string &name)
Tells the factory the current variable's name.
bool __foo_flag
Depending on the context this flag is used for some VERY important reasons.
Abstract base class for all multi dimensionnal addressable.
FMDP< GUM_SCALAR > * __fmdp
The constructed FMDP.
std::vector< const MultiDimImplementation< GUM_SCALAR > *> __ddBag
Just to keep track of multidim between two start/end calls.
void variableDescription(const std::string &desc)
Tells the factory the current variable's description.
Headers of the IFMDPFactory interface-like class.
A factory class to ease Factored Markov Decision Process construction.
Size Idx
Type for indexes.
void setOperationModeOn(std::string operationType)
Tells the factory that we're in a reward declaration mode where the global reward diagram is an opera...
void __finalizeFunctionGraph()
Insert every variables in the function graph.
void startRewardDeclaration()
Tells the factory that we're in a reward declaration.
FMDPFactory(FMDP< GUM_SCALAR > *fmdp)
Use this constructor if you want to use an already created factored markov decision process...
Base class for labelized discrete random variables.
Size NodeId
Type for node ids.
void startTransitionDeclaration()
Tells the factory that we're in a transition declaration.