Browse Source

Removed ConstraintType<ValueType> definition out of RationalFunctionAdapter to make things more consistent.

tempestpy_adaptions
Tim Quatmann 6 years ago
parent
commit
7881512a17
  1. 10
      src/storm/adapters/RationalFunctionAdapter.h
  2. 15
      src/storm/analysis/GraphConditions.h

10
src/storm/adapters/RationalFunctionAdapter.h

@ -78,15 +78,7 @@ namespace storm {
typedef carl::RationalFunction<Polynomial, true> RationalFunction;
typedef carl::Interval<double> Interval;
template <typename ValueType, typename Enable=void>
struct ConstraintType {
typedef void* val;
};
template<typename ValueType>
struct ConstraintType<ValueType, typename std::enable_if<std::is_same<storm::RationalFunction, ValueType>::value>::type> {
typedef carl::Formula<typename ValueType::PolyType::PolyType> val;
};
typedef carl::Formula<RawPolynomial> RationalFunctionConstraint;
}

15
src/storm/analysis/GraphConditions.h

@ -8,6 +8,17 @@
namespace storm {
namespace analysis {
template <typename ValueType, typename Enable=void>
struct ConstraintType {
typedef void* val;
};
template<typename ValueType>
struct ConstraintType<ValueType, typename std::enable_if<std::is_same<storm::RationalFunction, ValueType>::value>::type> {
typedef storm::RationalFunctionConstraint val;
};
/**
* Class to collect constraints on parametric Markov chains.
*/
@ -15,11 +26,11 @@ namespace storm {
class ConstraintCollector {
private:
// A set of constraints that says that the DTMC actually has valid probability distributions in all states.
std::unordered_set<typename storm::ConstraintType<ValueType>::val> wellformedConstraintSet;
std::unordered_set<typename ConstraintType<ValueType>::val> wellformedConstraintSet;
// A set of constraints that makes sure that the underlying graph of the model does not change depending
// on the parameter values.
std::unordered_set<typename storm::ConstraintType<ValueType>::val> graphPreservingConstraintSet;
std::unordered_set<typename ConstraintType<ValueType>::val> graphPreservingConstraintSet;
// A set of variables
std::set<storm::RationalFunctionVariable> variableSet;

Loading…
Cancel
Save