Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
MonotonicityAnnotation.cpp
Go to the documentation of this file.
2
6
7namespace storm::modelchecker {
8
9template<typename ParametricType>
12 if (auto* mono = std::get_if<DefaultMonotonicityAnnotation>(&data)) {
13 return *mono;
14 }
15 return storm::NullRef;
16}
17
18template<typename ParametricType>
21 if (auto* mono = std::get_if<OrderBasedMonotonicityAnnotation>(&data)) {
22 return *mono;
23 }
24 return storm::NullRef;
25}
26
27template<typename ParametricType>
30 if (auto const* mono = std::get_if<DefaultMonotonicityAnnotation>(&data)) {
31 return *mono;
32 }
33 return storm::NullRef;
34}
35
36template<typename ParametricType>
39 if (auto const* mono = std::get_if<OrderBasedMonotonicityAnnotation>(&data)) {
40 return *mono;
41 }
42 return storm::NullRef;
43}
44
45template<typename ParametricType>
49 if (auto defaultMono = getDefaultMonotonicityAnnotation(); defaultMono.has_value() && defaultMono->globalMonotonicity) {
50 result.reset(*defaultMono->globalMonotonicity);
51 } else if (auto orderMono = getOrderBasedMonotonicityAnnotation(); orderMono.has_value() && orderMono->localMonotonicityResult) {
52 if (auto globalRes = orderMono->localMonotonicityResult->getGlobalMonotonicityResult()) {
53 result.reset(*globalRes);
54 }
55 }
56 return result;
57}
58
60} // 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()