Browse Source

some eigen adaptions

tempestpy_adaptions
TimQu 8 years ago
parent
commit
98fff70cb1
  1. 25
      src/storm/adapters/EigenAdapter.h
  2. 1
      src/storm/utility/eigen.h

25
src/storm/adapters/EigenAdapter.h

@ -3,9 +3,11 @@
#include <memory>
#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;
}
};
}
}
namespace StormEigen {
template<> struct NumTraits<storm::RationalNumber> : GenericNumTraits<storm::RationalNumber>
{
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
};
};
}

1
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 <Eigen/Dense>
#include <Eigen/Sparse>
#include <unsupported/Eigen/IterativeSolvers>
#pragma GCC diagnostic pop

Loading…
Cancel
Save