Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
RationalNumberAdapter.h
Go to the documentation of this file.
1#pragma once
2
3#include "storm-config.h"
4
5#if defined(STORM_HAVE_CLN)
6#pragma clang diagnostic push
7#pragma clang diagnostic ignored "-Wmismatched-tags"
8#include <cln/cln.h>
9#pragma clang diagnostic pop
10#endif
11
12#if defined(STORM_HAVE_GMP)
13#include <gmpxx.h>
14#endif
15
16#include <carl/interval/Interval.h>
17#include <carl/numbers/numbers.h>
18
19#if defined(STORM_HAVE_CLN)
20namespace cln {
21inline size_t hash_value(cl_RA const& n) {
22 std::hash<cln::cl_RA> h;
23 return h(n);
24}
25} // namespace cln
26#endif
27
28#if defined(STORM_HAVE_GMP)
29inline size_t hash_value(mpq_class const& q) {
30 std::hash<mpq_class> h;
31 return h(q);
32}
33#endif
34
35namespace storm {
36#if defined(STORM_HAVE_CLN)
37typedef cln::cl_RA ClnRationalNumber;
38#endif
39#if defined(STORM_HAVE_GMP)
40typedef mpq_class GmpRationalNumber;
41#endif
42
43#if defined(STORM_HAVE_CLN) && defined(STORM_USE_CLN_EA)
44typedef ClnRationalNumber RationalNumber;
45#elif defined(STORM_HAVE_GMP) && !defined(STORM_USE_CLN_EA)
46typedef GmpRationalNumber RationalNumber;
47#elif defined(STORM_USE_CLN_EA)
48#error CLN is to be used, but is not available.
49#else
50#error GMP is to be used, but is not available.
51#endif
52} // namespace storm
size_t hash_value(carl::MultivariatePolynomial< C, O, P > const &p)
LabParser.cpp.
Definition cli.cpp:18