Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
StateBehavior.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4
6
7namespace storm {
8namespace generator {
9
10template<typename ValueType, typename StateType = uint32_t>
12 public:
17
22
26 void addStateReward(ValueType const& stateReward);
27
31 void addStateRewards(std::vector<ValueType>&& stateRewards);
32
36 void setExpanded(bool newValue = true);
37
41 bool wasExpanded() const;
42
46 bool empty() const;
47
51 typename std::vector<Choice<ValueType, StateType>>::const_iterator begin() const;
52
56 typename std::vector<Choice<ValueType, StateType>>::const_iterator end() const;
57
61 std::vector<Choice<ValueType, StateType>> const& getChoices() const;
62
66 std::vector<Choice<ValueType, StateType>>& getChoices();
67
71 std::vector<ValueType> const& getStateRewards() const;
72
76 std::size_t getNumberOfChoices() const;
77
78 private:
79 // The choices available in the state.
80 std::vector<Choice<ValueType, StateType>> choices;
81
82 // The state rewards (under the different, selected reward models) of the state.
83 std::vector<ValueType> stateRewards;
84
85 // A flag indicating whether the state was actually expanded.
86 bool expanded;
87};
88
89} // namespace generator
90} // 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.