#ifndef STORM_UTILITY_PARAMETRIC_H #define STORM_UTILITY_PARAMETRIC_H #include "storm/adapters/RationalFunctionAdapter.h" #include namespace storm { namespace utility { namespace parametric { /*! * Access the type of variables from a given function type */ template struct VariableType { typedef void type; }; /*! * Acess the type of coefficients from a given function type */ template struct CoefficientType { typedef void type; }; #ifdef STORM_HAVE_CARL template<> struct VariableType { typedef storm::RationalFunctionVariable type; }; template<> struct CoefficientType { typedef storm::RationalFunctionCoefficient type; }; #endif template using Valuation = std::map::type, typename CoefficientType::type>; /*! * Evaluates the given function wrt. the given valuation */ template typename CoefficientType::type evaluate(FunctionType const& function, Valuation const& valuation); /*! * Add all variables that occur in the given function to the the given set */ template void gatherOccurringVariables(FunctionType const& function, std::set::type>& variableSet); /*! * Checks whether the function is linear (in one parameter) */ template bool isLinear(FunctionType const& function); /*! * Checks whether the function is a multilinear polynomial, i.e., a polynomial which only considers variables with exponent at most 1 */ template bool isMultiLinearPolynomial(FunctionType const& function); } } } #endif /* STORM_UTILITY_PARAMETRIC_H */