Class sdm::DecisionRule
Class List > sdm > DecisionRule
A public interface for decision rules. Contains all the methods that must be implemented to well define a decision rule in SDMS.
#include <decision_rule.hpp>
Inherits the following classes: Action, sdm::Function
Inherited by the following classes: sdm::DeterministicDecisionRule, sdm::StochasticDecisionRule
Public Types inherited from sdm::Function
See sdm::Function
| Type | Name |
|---|---|
| typedef TInput | input_type |
| typedef TOutput | output_type |
Public Functions
| Type | Name |
|---|---|
| virtual std::shared_ptr< Action > | act (const std::shared_ptr< State > & state) const = 0 Get the action deducted from a given state. |
| virtual bool | elementExist (const std::shared_ptr< State > &) = 0 |
| virtual double | getProbability (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action) const = 0 Get the probability of action 'action' in state 'state'. |
| virtual TypeAction | getTypeAction () const |
| std::shared_ptr< Action > | operator() (const std::shared_ptr< State > & s) |
| virtual void | setProbability (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, double proba) = 0 Sets the probability of selecting action a when observing state s. |
| virtual std::string | str () const = 0 |
Public Functions inherited from sdm::Function
See sdm::Function
| Type | Name |
|---|---|
| virtual output_type | operator() (const input_type &) = 0 |
| virtual | ~Function () |
Public Functions Documentation
function act
virtual std::shared_ptr< Action > sdm::DecisionRule::act (
const std::shared_ptr< State > & state
) const = 0
Parameters:
statethe generic state
Returns:
the corresponding action
function elementExist
virtual bool sdm::DecisionRule::elementExist (
const std::shared_ptr< State > &
) = 0
function getProbability
virtual double sdm::DecisionRule::getProbability (
const std::shared_ptr< State > & state,
const std::shared_ptr< Action > & action
) const = 0
Parameters:
statethe stateactionthe actionprobathe probability
function getTypeAction
inline virtual TypeAction sdm::DecisionRule::getTypeAction () const
function operator()
inline std::shared_ptr< Action > sdm::DecisionRule::operator() (
const std::shared_ptr< State > & s
)
function setProbability
virtual void sdm::DecisionRule::setProbability (
const std::shared_ptr< State > & state,
const std::shared_ptr< Action > & action,
double proba
) = 0
Parameters:
statethe stateactionthe actionprobathe probability
function str
virtual std::string sdm::DecisionRule::str () const = 0
The documentation for this class was generated from the following file src/sdm/core/action/decision_rule.hpp