Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
StateBehavior.cpp
Go to the documentation of this file.
2
4
5namespace storm {
6namespace generator {
7
8template<typename ValueType, typename StateType>
10 // Intentionally left empty.
11}
12
13template<typename ValueType, typename StateType>
15 choices.push_back(std::move(choice));
16}
17
18template<typename ValueType, typename StateType>
19void StateBehavior<ValueType, StateType>::addStateReward(ValueType const& stateReward) {
20 stateRewards.push_back(stateReward);
21}
22
23template<typename ValueType, typename StateType>
24void StateBehavior<ValueType, StateType>::addStateRewards(std::vector<ValueType>&& stateRewards) {
25 this->stateRewards = std::move(stateRewards);
26}
27
28template<typename ValueType, typename StateType>
30 this->expanded = newValue;
31}
32
33template<typename ValueType, typename StateType>
35 return expanded;
36}
37
38template<typename ValueType, typename StateType>
40 return choices.empty();
41}
42
43template<typename ValueType, typename StateType>
44typename std::vector<Choice<ValueType, StateType>>::const_iterator StateBehavior<ValueType, StateType>::begin() const {
45 return choices.begin();
46}
47
48template<typename ValueType, typename StateType>
49typename std::vector<Choice<ValueType, StateType>>::const_iterator StateBehavior<ValueType, StateType>::end() const {
50 return choices.end();
51}
52
53template<typename ValueType, typename StateType>
54std::vector<Choice<ValueType, StateType>> const& StateBehavior<ValueType, StateType>::getChoices() const {
55 return choices;
56}
57
58template<typename ValueType, typename StateType>
59std::vector<Choice<ValueType, StateType>>& StateBehavior<ValueType, StateType>::getChoices() {
60 return choices;
61}
62
63template<typename ValueType, typename StateType>
64std::vector<ValueType> const& StateBehavior<ValueType, StateType>::getStateRewards() const {
65 return stateRewards;
66}
67
68template<typename ValueType, typename StateType>
70 return choices.size();
71}
72
73template class StateBehavior<double>;
74
75#ifdef STORM_HAVE_CARL
78#endif
79} // namespace generator
80} // namespace storm
void addChoice(Choice< ValueType, StateType > &&choice)
Adds the given choice to the behavior of the state.
std::vector< Choice< ValueType, StateType > > const & getChoices() const
Retrieves the vector of choices.
void addStateReward(ValueType const &stateReward)
Adds the given state reward to the behavior of the state.
bool empty() const
Retrieves whether the behavior is empty in the sense that there are no available choices.
std::vector< Choice< ValueType, StateType > >::const_iterator end() const
Retrieves an iterator past the choices available in the behavior.
StateBehavior()
Creates an empty behavior, i.e.
std::vector< Choice< ValueType, StateType > >::const_iterator begin() const
Retrieves an iterator to the choices available in the behavior.
bool wasExpanded() const
Retrieves whether the state was expanded.
void addStateRewards(std::vector< ValueType > &&stateRewards)
Adds the given state rewards to the behavior of the state.
std::vector< ValueType > const & getStateRewards() const
Retrieves the list of state rewards under selected reward models.
std::size_t getNumberOfChoices() const
Retrieves the number of choices in the behavior.
void setExpanded(bool newValue=true)
Sets whether the state was expanded.
LabParser.cpp.
Definition cli.cpp:18