Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
Bound.cpp
Go to the documentation of this file.
1#include "storm/logic/Bound.h"
2
5
6namespace storm::logic {
7
8template<typename ValueType>
9bool Bound::isSatisfied(ValueType const& compareValue) const {
10 ValueType thresholdAsValueType = evaluateThresholdAs<ValueType>();
11 switch (comparisonType) {
13 return compareValue > thresholdAsValueType;
15 return compareValue >= thresholdAsValueType;
17 return compareValue < thresholdAsValueType;
19 return compareValue <= thresholdAsValueType;
20 }
21 STORM_LOG_THROW_UNCONDITIONALLY(storm::exceptions::IllegalArgumentException, "Unknown ComparisonType.");
22}
23
24storm::RationalNumber Bound::evaluateThresholdAsRational() const {
25 return threshold.evaluateAsRational();
26}
27
28template<typename ValueType>
32
33template bool Bound::isSatisfied(double const& compareValue) const;
34template double Bound::evaluateThresholdAs() const;
35
36template bool Bound::isSatisfied(storm::RationalNumber const& compareValue) const;
37template storm::RationalNumber Bound::evaluateThresholdAs() const;
40
41#if STORM_RATIONAL_NUMBER_DIFFERS_FROM_COEFFICIENT
42template bool Bound::isSatisfied(storm::RationalFunctionCoefficient const& compareValue) const;
43template storm::RationalFunctionCoefficient Bound::evaluateThresholdAs() const;
46#endif
47
49
50} // namespace storm::logic
A value of ValueType extended with the two infinities -infinity and +infinity.
#define STORM_LOG_THROW_UNCONDITIONALLY(exception, message)
Definition macros.h:48
TargetType convertNumber(SourceType const &number)
carl::RationalFunction< Polynomial, true > RationalFunction
ComparisonType comparisonType
Definition Bound.h:17
storm::expressions::Expression threshold
Definition Bound.h:18
storm::RationalNumber evaluateThresholdAsRational() const
Definition Bound.cpp:24
bool isSatisfied(ValueType const &compareValue) const
Definition Bound.cpp:9
ValueType evaluateThresholdAs() const
Definition Bound.cpp:29