Storm
A Modern Probabilistic Model Checker
|
#include <Choice.h>
Public Member Functions | |
Choice (uint_fast64_t actionIndex=0, bool markovian=false) | |
Choice (Choice const &other)=default | |
Choice & | operator= (Choice const &other)=default |
Choice (Choice &&other)=default | |
Choice & | operator= (Choice &&other)=default |
void | add (Choice const &other) |
Adds the given choice to the current one. | |
StateType | sampleFromDistribution (ValueType const &quantile) const |
Given a value q, find the event in the ordered distribution that corresponds to this prob. | |
storm::storage::Distribution< ValueType, StateType >::iterator | begin () |
Returns an iterator to the distribution associated with this choice. | |
storm::storage::Distribution< ValueType, StateType >::const_iterator | begin () const |
Returns an iterator to the distribution associated with this choice. | |
storm::storage::Distribution< ValueType, StateType >::iterator | end () |
Returns an iterator past the end of the distribution associated with this choice. | |
storm::storage::Distribution< ValueType, StateType >::const_iterator | end () const |
Returns an iterator past the end of the distribution associated with this choice. | |
void | addLabel (std::string const &label) |
Adds the given label to the labels associated with this choice. | |
void | addLabels (std::set< std::string > const &labels) |
Adds the given label set to the labels associated with this choice. | |
bool | hasLabels () const |
Returns whether there are labels defined for this choice. | |
std::set< std::string > const & | getLabels () const |
Retrieves the set of labels associated with this choice. | |
void | setPlayerIndex (storm::storage::PlayerIndex const &playerIndex) |
Sets the players index. | |
bool | hasPlayerIndex () const |
Returns whether there is an index for the player defined for this choice. | |
storm::storage::PlayerIndex const & | getPlayerIndex () const |
Retrieves the players index associated with this choice. | |
void | addOriginData (boost::any const &data) |
Adds the given data that specifies the origin of this choice w.r.t. | |
bool | hasOriginData () const |
Returns whether there is origin data defined for this choice. | |
boost::any const & | getOriginData () const |
Returns the origin data associated with this choice. | |
uint_fast64_t | getActionIndex () const |
Retrieves the index of the action of this choice. | |
ValueType | getTotalMass () const |
Retrieves the total mass of this choice. | |
void | addProbability (StateType const &state, ValueType const &value) |
Adds the given probability value to the given state in the underlying distribution. | |
void | addReward (ValueType const &value) |
Adds the given value to the reward associated with this choice. | |
void | addRewards (std::vector< ValueType > &&values) |
Adds the given choices rewards to this choice. | |
std::vector< ValueType > const & | getRewards () const |
Retrieves the rewards for this choice under selected reward models. | |
bool | isMarkovian () const |
Retrieves whether the choice is Markovian. | |
std::size_t | size () const |
Retrieves the size of the distribution associated with this choice. | |
void | reserve (std::size_t const &size) |
If the size is already known, reserves space in the underlying distribution. | |
Friends | |
template<typename ValueTypePrime , typename StateTypePrime > | |
std::ostream & | operator<< (std::ostream &out, Choice< ValueTypePrime, StateTypePrime > const &choice) |
Inserts the contents of this object to the given output stream. | |
storm::generator::Choice< ValueType, StateType >::Choice | ( | uint_fast64_t | actionIndex = 0 , |
bool | markovian = false |
||
) |
Definition at line 16 of file Choice.cpp.
|
default |
|
default |
void storm::generator::Choice< ValueType, StateType >::add | ( | Choice< ValueType, StateType > const & | other | ) |
Adds the given choice to the current one.
Definition at line 22 of file Choice.cpp.
void storm::generator::Choice< ValueType, StateType >::addLabel | ( | std::string const & | label | ) |
Adds the given label to the labels associated with this choice.
label | The label to associate with this choice. |
Definition at line 74 of file Choice.cpp.
void storm::generator::Choice< ValueType, StateType >::addLabels | ( | std::set< std::string > const & | labels | ) |
Adds the given label set to the labels associated with this choice.
labelSet | The label set to associate with this choice. |
Definition at line 82 of file Choice.cpp.
void storm::generator::Choice< ValueType, StateType >::addOriginData | ( | boost::any const & | data | ) |
Adds the given data that specifies the origin of this choice w.r.t.
the model specification
Definition at line 116 of file Choice.cpp.
void storm::generator::Choice< ValueType, StateType >::addProbability | ( | StateType const & | state, |
ValueType const & | value | ||
) |
Adds the given probability value to the given state in the underlying distribution.
Definition at line 158 of file Choice.cpp.
void storm::generator::Choice< ValueType, StateType >::addReward | ( | ValueType const & | value | ) |
Adds the given value to the reward associated with this choice.
Definition at line 164 of file Choice.cpp.
void storm::generator::Choice< ValueType, StateType >::addRewards | ( | std::vector< ValueType > && | values | ) |
Adds the given choices rewards to this choice.
Definition at line 169 of file Choice.cpp.
storm::storage::Distribution< ValueType, StateType >::iterator storm::generator::Choice< ValueType, StateType >::begin | ( | ) |
Returns an iterator to the distribution associated with this choice.
Definition at line 54 of file Choice.cpp.
storm::storage::Distribution< ValueType, StateType >::const_iterator storm::generator::Choice< ValueType, StateType >::begin | ( | ) | const |
Returns an iterator to the distribution associated with this choice.
Definition at line 59 of file Choice.cpp.
storm::storage::Distribution< ValueType, StateType >::iterator storm::generator::Choice< ValueType, StateType >::end | ( | ) |
Returns an iterator past the end of the distribution associated with this choice.
Definition at line 64 of file Choice.cpp.
storm::storage::Distribution< ValueType, StateType >::const_iterator storm::generator::Choice< ValueType, StateType >::end | ( | ) | const |
Returns an iterator past the end of the distribution associated with this choice.
Definition at line 69 of file Choice.cpp.
uint_fast64_t storm::generator::Choice< ValueType, StateType >::getActionIndex | ( | ) | const |
Retrieves the index of the action of this choice.
Definition at line 148 of file Choice.cpp.
std::set< std::string > const & storm::generator::Choice< ValueType, StateType >::getLabels | ( | ) | const |
Retrieves the set of labels associated with this choice.
Definition at line 96 of file Choice.cpp.
boost::any const & storm::generator::Choice< ValueType, StateType >::getOriginData | ( | ) | const |
Returns the origin data associated with this choice.
Definition at line 143 of file Choice.cpp.
storm::storage::PlayerIndex const & storm::generator::Choice< ValueType, StateType >::getPlayerIndex | ( | ) | const |
Retrieves the players index associated with this choice.
Definition at line 111 of file Choice.cpp.
std::vector< ValueType > const & storm::generator::Choice< ValueType, StateType >::getRewards | ( | ) | const |
Retrieves the rewards for this choice under selected reward models.
Definition at line 174 of file Choice.cpp.
ValueType storm::generator::Choice< ValueType, StateType >::getTotalMass | ( | ) | const |
Retrieves the total mass of this choice.
Definition at line 153 of file Choice.cpp.
bool storm::generator::Choice< ValueType, StateType >::hasLabels | ( | ) | const |
Returns whether there are labels defined for this choice.
Definition at line 91 of file Choice.cpp.
bool storm::generator::Choice< ValueType, StateType >::hasOriginData | ( | ) | const |
Returns whether there is origin data defined for this choice.
Definition at line 138 of file Choice.cpp.
bool storm::generator::Choice< ValueType, StateType >::hasPlayerIndex | ( | ) | const |
Returns whether there is an index for the player defined for this choice.
Definition at line 106 of file Choice.cpp.
bool storm::generator::Choice< ValueType, StateType >::isMarkovian | ( | ) | const |
Retrieves whether the choice is Markovian.
Definition at line 179 of file Choice.cpp.
|
default |
|
default |
void storm::generator::Choice< ValueType, StateType >::reserve | ( | std::size_t const & | size | ) |
If the size is already known, reserves space in the underlying distribution.
Definition at line 189 of file Choice.cpp.
StateType storm::generator::Choice< ValueType, StateType >::sampleFromDistribution | ( | ValueType const & | quantile | ) | const |
Given a value q, find the event in the ordered distribution that corresponds to this prob.
Example: Given a (sub)distribution { x -> 0.4, y -> 0.3, z -> 0.2 }, A value q in [0,0.4] yields x, q in [0.4, 0.7] yields y, and q in [0.7, 0.9] yields z. Any other value for q yields undefined behavior.
quantile | q, a value in the CDF. |
Definition at line 49 of file Choice.cpp.
void storm::generator::Choice< ValueType, StateType >::setPlayerIndex | ( | storm::storage::PlayerIndex const & | playerIndex | ) |
Sets the players index.
The | player index associated with this choice. |
Definition at line 101 of file Choice.cpp.
std::size_t storm::generator::Choice< ValueType, StateType >::size | ( | ) | const |
Retrieves the size of the distribution associated with this choice.
Definition at line 184 of file Choice.cpp.
|
friend |
Inserts the contents of this object to the given output stream.
out | The stream in which to insert the contents. |