Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
StateBehavior.h
Go to the documentation of this file.
1#ifndef STORM_GENERATOR_PRISM_STATEBEHAVIOR_H_
2#define STORM_GENERATOR_PRISM_STATEBEHAVIOR_H_
3
4#include <cstdint>
5
7
8namespace storm {
9namespace generator {
10
11template<typename ValueType, typename StateType = uint32_t>
13 public:
18
23
27 void addStateReward(ValueType const& stateReward);
28
32 void addStateRewards(std::vector<ValueType>&& stateRewards);
33
37 void setExpanded(bool newValue = true);
38
42 bool wasExpanded() const;
43
47 bool empty() const;
48
52 typename std::vector<Choice<ValueType, StateType>>::const_iterator begin() const;
53
57 typename std::vector<Choice<ValueType, StateType>>::const_iterator end() const;
58
62 std::vector<Choice<ValueType, StateType>> const& getChoices() const;
63
67 std::vector<Choice<ValueType, StateType>>& getChoices();
68
72 std::vector<ValueType> const& getStateRewards() const;
73
77 std::size_t getNumberOfChoices() const;
78
79 private:
80 // The choices available in the state.
81 std::vector<Choice<ValueType, StateType>> choices;
82
83 // The state rewards (under the different, selected reward models) of the state.
84 std::vector<ValueType> stateRewards;
85
86 // A flag indicating whether the state was actually expanded.
87 bool expanded;
88};
89
90} // namespace generator
91} // namespace storm
92
93#endif /* STORM_GENERATOR_PRISM_STATEBEHAVIOR_H_ */
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