Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
StateReward.h
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4
7
8namespace storm {
9namespace storage {
10namespace expressions {
11class Variable;
12}
13} // namespace storage
14} // namespace storm
15
16namespace storm {
17namespace prism {
19 public:
29 StateReward(storm::expressions::Expression const& statePredicateExpression, storm::expressions::Expression const& rewardValueExpression,
30 std::string const& filename = "", uint_fast64_t lineNumber = 0);
31
32 // Create default implementations of constructors/assignment.
33 StateReward() = default;
34 StateReward(StateReward const& other) = default;
35 StateReward& operator=(StateReward const& other) = default;
36 StateReward(StateReward&& other) = default;
37 StateReward& operator=(StateReward&& other) = default;
38
45
52
59 StateReward substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution) const;
60
61 friend std::ostream& operator<<(std::ostream& stream, StateReward const& stateReward);
62
63 private:
64 // The predicate that characterizes the states that obtain this reward.
65 storm::expressions::Expression statePredicateExpression;
66
67 // The expression that specifies the value of the reward obtained.
68 storm::expressions::Expression rewardValueExpression;
69};
70
71} // namespace prism
72} // namespace storm
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