Storm 1.11.1.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
4
5namespace storm::logic {
6
7template<typename ValueType>
8bool Bound::isSatisfied(ValueType const& compareValue) const {
9 ValueType thresholdAsValueType = evaluateThresholdAs<ValueType>();
10 switch (comparisonType) {
12 return compareValue > thresholdAsValueType;
14 return compareValue >= thresholdAsValueType;
16 return compareValue < thresholdAsValueType;
18 return compareValue <= thresholdAsValueType;
19 }
20 STORM_LOG_THROW(false, storm::exceptions::IllegalArgumentException, "Unknown ComparisonType");
21}
22
23storm::RationalNumber Bound::evaluateThresholdAsRational() const {
25}
26
27template<typename ValueType>
28ValueType Bound::evaluateThresholdAs() const {
29 return storm::utility::convertNumber<ValueType>(evaluateThresholdAsRational());
30}
31
32template bool Bound::isSatisfied(double const& compareValue) const;
33#if defined(STORM_HAVE_CLN)
34template bool Bound::isSatisfied(storm::ClnRationalNumber const& compareValue) const;
35template storm::ClnRationalNumber Bound::evaluateThresholdAs() const;
36#endif
37#if defined(STORM_HAVE_GMP)
38template bool Bound::isSatisfied(storm::GmpRationalNumber const& compareValue) const;
39template storm::GmpRationalNumber Bound::evaluateThresholdAs() const;
40#endif
41template double Bound::evaluateThresholdAs() const;
43
44} // namespace storm::logic
storm::RationalNumber evaluateAsRational() const
Evaluates the expression and returns the resulting rational number.
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30
ComparisonType comparisonType
Definition Bound.h:18
storm::expressions::Expression threshold
Definition Bound.h:19
storm::RationalNumber evaluateThresholdAsRational() const
Definition Bound.cpp:23
bool isSatisfied(ValueType const &compareValue) const
Definition Bound.cpp:8
ValueType evaluateThresholdAs() const
Definition Bound.cpp:28