Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
SymbolicEquationSolver.cpp
Go to the documentation of this file.
2
6
7namespace storm {
8namespace solver {
9
10template<storm::dd::DdType DdType, typename ValueType>
12 // Intentionally left empty.
13}
14
15template<storm::dd::DdType DdType, typename ValueType>
20template<storm::dd::DdType DdType, typename ValueType>
22 this->allRows = allRows;
24
25template<storm::dd::DdType DdType, typename ValueType>
27 return this->allRows;
30template<storm::dd::DdType DdType, typename ValueType>
32 this->lowerBounds = lowerBounds;
33}
34
35template<storm::dd::DdType DdType, typename ValueType>
37 this->lowerBound = lowerBound;
38}
39
40template<storm::dd::DdType DdType, typename ValueType>
42 this->upperBounds = upperBounds;
43}
44
45template<storm::dd::DdType DdType, typename ValueType>
47 this->upperBound = upperBound;
49
50template<storm::dd::DdType DdType, typename ValueType>
51void SymbolicEquationSolver<DdType, ValueType>::setBounds(ValueType const& lowerBound, ValueType const& upperBound) {
52 setLowerBound(lowerBound);
53 setUpperBound(upperBound);
54}
55
56template<storm::dd::DdType DdType, typename ValueType>
58 storm::dd::Add<DdType, ValueType> const& upperBounds) {
59 setLowerBounds(lowerBounds);
60 setUpperBounds(upperBounds);
61}
62
63template<storm::dd::DdType DdType, typename ValueType>
65 return static_cast<bool>(lowerBound);
66}
67
68template<storm::dd::DdType DdType, typename ValueType>
70 return lowerBound.get();
71}
72
73template<storm::dd::DdType DdType, typename ValueType>
75 return static_cast<bool>(lowerBounds);
76}
77
78template<storm::dd::DdType DdType, typename ValueType>
82
83template<storm::dd::DdType DdType, typename ValueType>
85 return static_cast<bool>(upperBound);
86}
87
88template<storm::dd::DdType DdType, typename ValueType>
90 return upperBound.get();
91}
92
93template<storm::dd::DdType DdType, typename ValueType>
95 return static_cast<bool>(upperBounds);
96}
97
98template<storm::dd::DdType DdType, typename ValueType>
102
103template<storm::dd::DdType DdType, typename ValueType>
105 STORM_LOG_THROW(lowerBound || lowerBounds, storm::exceptions::UnmetRequirementException, "Requiring lower bounds, but did not get any.");
106 if (lowerBounds) {
107 return lowerBounds.get();
108 } else {
109 return this->allRows.ite(this->allRows.getDdManager().getConstant(lowerBound.get()), this->allRows.getDdManager().template getAddZero<ValueType>());
110 }
111}
112
113template<storm::dd::DdType DdType, typename ValueType>
115 STORM_LOG_THROW(upperBound || upperBounds, storm::exceptions::UnmetRequirementException, "Requiring upper bounds, but did not get any.");
116 if (upperBounds) {
117 return upperBounds.get();
118 } else {
119 return this->allRows.ite(this->allRows.getDdManager().getConstant(upperBound.get()), this->allRows.getDdManager().template getAddZero<ValueType>());
120 }
121}
122
125
128
130} // namespace solver
131} // namespace storm
storm::dd::DdManager< DdType > & getDdManager() const
storm::dd::Add< DdType, ValueType > const & getLowerBounds() const
virtual void setUpperBound(ValueType const &lowerBound)
storm::dd::Add< DdType, ValueType > getUpperBoundsVector() const
Retrieves a vector of upper bounds for all values (if any lower bounds are known).
virtual void setLowerBounds(storm::dd::Add< DdType, ValueType > const &lowerBounds)
virtual void setUpperBounds(storm::dd::Add< DdType, ValueType > const &upperBounds)
virtual void setLowerBound(ValueType const &lowerBound)
storm::dd::Bdd< DdType > const & getAllRows() const
void setAllRows(storm::dd::Bdd< DdType > const &allRows)
storm::dd::Add< DdType, ValueType > getLowerBoundsVector() const
Retrieves a vector of lower bounds for all values (if any lower bounds are known).
storm::dd::Add< DdType, ValueType > const & getUpperBounds() const
virtual void setBounds(ValueType const &lowerBound, ValueType const &upperBound)
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30