Storm 1.13.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
StateReward.h
Go to the documentation of this file.
1#ifndef STORM_STORAGE_PRISM_STATEREWARD_H_
2#define STORM_STORAGE_PRISM_STATEREWARD_H_
3
4#include <map>
5
8
9namespace storm {
10namespace storage {
11namespace expressions {
12class Variable;
13}
14} // namespace storage
15} // namespace storm
16
17namespace storm {
18namespace prism {
20 public:
30 StateReward(storm::expressions::Expression const& statePredicateExpression, storm::expressions::Expression const& rewardValueExpression,
31 std::string const& filename = "", uint_fast64_t lineNumber = 0);
32
33 // Create default implementations of constructors/assignment.
34 StateReward() = default;
35 StateReward(StateReward const& other) = default;
36 StateReward& operator=(StateReward const& other) = default;
37 StateReward(StateReward&& other) = default;
38 StateReward& operator=(StateReward&& other) = default;
39
46
53
60 StateReward substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution) const;
61
62 friend std::ostream& operator<<(std::ostream& stream, StateReward const& stateReward);
63
64 private:
65 // The predicate that characterizes the states that obtain this reward.
66 storm::expressions::Expression statePredicateExpression;
67
68 // The expression that specifies the value of the reward obtained.
69 storm::expressions::Expression rewardValueExpression;
70};
71
72} // namespace prism
73} // namespace storm
74
75#endif /* STORM_STORAGE_PRISM_STATEREWARD_H_ */
LocatedInformation(std::string const &filename, uint_fast64_t lineNumber)
Constructs a located information with the given filename and line number.
friend std::ostream & operator<<(std::ostream &stream, StateReward const &stateReward)
storm::expressions::Expression const & getStatePredicateExpression() const
Retrieves the state predicate that is associated with this state reward.
storm::expressions::Expression const & getRewardValueExpression() const
Retrieves the reward value associated with this state reward.
StateReward(StateReward const &other)=default
StateReward(storm::expressions::Expression const &statePredicateExpression, storm::expressions::Expression const &rewardValueExpression, std::string const &filename="", uint_fast64_t lineNumber=0)
Creates a state reward for the states satisfying the given expression with the value given by a secon...
StateReward & operator=(StateReward const &other)=default
StateReward & operator=(StateReward &&other)=default
StateReward substitute(std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution) const
Substitutes all identifiers in the state reward according to the given map.
StateReward(StateReward &&other)=default