From 98fff70cb187b0d157260620e15722f975d742c7 Mon Sep 17 00:00:00 2001 From: TimQu Date: Thu, 16 Feb 2017 12:37:49 +0100 Subject: [PATCH] some eigen adaptions --- src/storm/adapters/EigenAdapter.h | 25 ++++++++++++++++++++++++- src/storm/utility/eigen.h | 1 + 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/storm/adapters/EigenAdapter.h b/src/storm/adapters/EigenAdapter.h index a996d3e82..aa08c857a 100644 --- a/src/storm/adapters/EigenAdapter.h +++ b/src/storm/adapters/EigenAdapter.h @@ -3,9 +3,11 @@ #include #include "storm/utility/eigen.h" +#include "storm/adapters/CarlAdapter.h" #include "storm/storage/SparseMatrix.h" + namespace storm { namespace adapters { @@ -40,4 +42,25 @@ namespace std { return seed; } }; -} \ No newline at end of file +} + +namespace StormEigen { + template<> struct NumTraits : GenericNumTraits + { + typedef storm::RationalNumber Real; + typedef storm::RationalNumber NonInteger; + typedef storm::RationalNumber Nested; + static inline Real epsilon() { return 0; } + static inline Real dummy_precision() { return 0; } + static inline Real digits10() { return 0; } + enum { + IsInteger = 0, + IsSigned = 1, + IsComplex = 0, + RequireInitialization = 1, + ReadCost = 6, + AddCost = 150, + MulCost = 100 + }; + }; +} diff --git a/src/storm/utility/eigen.h b/src/storm/utility/eigen.h index 793d66d66..7104b649a 100644 --- a/src/storm/utility/eigen.h +++ b/src/storm/utility/eigen.h @@ -11,6 +11,7 @@ #pragma GCC diagnostic ignored "-Wignored-attributes" #pragma GCC diagnostic ignored "-Wmisleading-indentation" #pragma GCC diagnostic ignored "-Wunused-parameter" +#include #include #include #pragma GCC diagnostic pop