Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
Bound.cpp
Go to the documentation of this file.
1#include "storm/logic/Bound.h"
3
4namespace storm::logic {
5
6template<typename ValueType>
7bool Bound::isSatisfied(ValueType const& compareValue) const {
8 ValueType thresholdAsValueType = evaluateThresholdAs<ValueType>();
9 switch (comparisonType) {
11 return compareValue > thresholdAsValueType;
13 return compareValue >= thresholdAsValueType;
15 return compareValue < thresholdAsValueType;
17 return compareValue <= thresholdAsValueType;
18 }
19 STORM_LOG_THROW(false, storm::exceptions::IllegalArgumentException, "Unknown ComparisonType");
20}
21
22storm::RationalNumber Bound::evaluateThresholdAsRational() const {
24}
25
26template<typename ValueType>
27ValueType Bound::evaluateThresholdAs() const {
28 return storm::utility::convertNumber<ValueType>(evaluateThresholdAsRational());
29}
30
31template bool Bound::isSatisfied(double const& compareValue) const;
32template bool Bound::isSatisfied(storm::RationalNumber const& compareValue) const;
33template double Bound::evaluateThresholdAs() const;
34template storm::RationalNumber Bound::evaluateThresholdAs() const;
36
37} // 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:22
bool isSatisfied(ValueType const &compareValue) const
Definition Bound.cpp:7
ValueType evaluateThresholdAs() const
Definition Bound.cpp:27