#pragma once #include #include "storm-pars/utility/parametric.h" namespace storm { namespace storage { template class ParameterRegion{ public: typedef typename storm::utility::parametric::VariableType::type VariableType; typedef typename storm::utility::parametric::CoefficientType::type CoefficientType; typedef typename storm::utility::parametric::Valuation Valuation; ParameterRegion(); ParameterRegion(Valuation const& lowerBoundaries, Valuation const& upperBoundaries); ParameterRegion(Valuation&& lowerBoundaries, Valuation&& upperBoundaries); ParameterRegion(ParameterRegion const& other) = default; ParameterRegion(ParameterRegion&& other) = default; ParameterRegion& operator=(ParameterRegion const& other) = default; virtual ~ParameterRegion() = default; std::set const& getVariables() const; CoefficientType const& getLowerBoundary(VariableType const& variable) const; CoefficientType const& getUpperBoundary(VariableType const& variable) const; Valuation const& getLowerBoundaries() const; Valuation const& getUpperBoundaries() const; /*! * Returns a vector of all possible combinations of lower and upper bounds of the given variables. * The first entry of the returned vector will map every variable to its lower bound * The second entry will map every variable to its lower bound, except the first one (i.e. *getVariables.begin()) * ... * The last entry will map every variable to its upper bound * * If the given set of variables is empty, the returned vector will contain an empty map */ std::vector getVerticesOfRegion(std::set const& consideredVariables) const; /*! * Returns some point that lies within this region */ Valuation getSomePoint() const; /*! * Returns the center point of this region */ Valuation getCenterPoint() const; /*! * Returns the area of this region */ CoefficientType area() const; /*! * Splits the region at the given point and inserts the resulting subregions at the end of the given vector. * It is assumed that the point lies within this region. * Subregions with area()==0 are not inserted in the vector. */ void split(Valuation const& splittingPoint, std::vector>& regionVector) const; //returns the region as string in the format 0.3<=p<=0.4,0.2<=q<=0.5; std::string toString(bool boundariesAsDouble = false) const; private: void init(); Valuation lowerBoundaries; Valuation upperBoundaries; std::set variables; }; template std::ostream& operator<<(std::ostream& out, ParameterRegion const& region); } }