Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
MonotonicityAnnotation.cpp
Go to the documentation of this file.
2
5
7
8namespace storm::modelchecker {
9
10template<typename ParametricType>
13 if (auto* mono = std::get_if<DefaultMonotonicityAnnotation>(&data)) {
14 return *mono;
15 }
16 return storm::NullRef;
17}
18
19template<typename ParametricType>
22 if (auto* mono = std::get_if<OrderBasedMonotonicityAnnotation>(&data)) {
23 return *mono;
24 }
25 return storm::NullRef;
26}
27
28template<typename ParametricType>
31 if (auto const* mono = std::get_if<DefaultMonotonicityAnnotation>(&data)) {
32 return *mono;
33 }
34 return storm::NullRef;
35}
36
37template<typename ParametricType>
40 if (auto const* mono = std::get_if<OrderBasedMonotonicityAnnotation>(&data)) {
41 return *mono;
42 }
43 return storm::NullRef;
44}
45
46template<typename ParametricType>
50 if (auto defaultMono = getDefaultMonotonicityAnnotation(); defaultMono.has_value() && defaultMono->globalMonotonicity) {
51 result.reset(*defaultMono->globalMonotonicity);
52 } else if (auto orderMono = getOrderBasedMonotonicityAnnotation(); orderMono.has_value() && orderMono->localMonotonicityResult) {
53 if (auto globalRes = orderMono->localMonotonicityResult->getGlobalMonotonicityResult()) {
54 result.reset(*globalRes);
55 }
56 }
57 return result;
58}
59
61} // namespace storm::modelchecker
Helper class that optionally holds a reference to an object of type T.
Definition OptionalRef.h:48
void reset()
Unsets the reference.
constexpr NullRefType NullRef
Definition OptionalRef.h:31
storm::OptionalRef< storm::analysis::MonotonicityResult< VariableType > const > getGlobalMonotonicityResult() const
storm::OptionalRef< DefaultMonotonicityAnnotation > getDefaultMonotonicityAnnotation()
storm::OptionalRef< OrderBasedMonotonicityAnnotation > getOrderBasedMonotonicityAnnotation()