1#ifndef STORM_STORAGE_GEOMETRY_POLYTOPE_H_ 
    2#define STORM_STORAGE_GEOMETRY_POLYTOPE_H_ 
    4#include <boost/optional.hpp> 
   16template<
typename ValueType>
 
   19    typedef std::vector<ValueType> 
Point;
 
   33    static std::shared_ptr<Polytope<ValueType>> 
create(std::vector<Point> 
const& points);
 
  125    std::shared_ptr<Polytope<ValueType>> 
shift(
Point const& b) 
const;
 
  160                                                                       std::vector<storm::expressions::Variable> 
const& variables) 
const;
 
  165    template<
typename TargetType>
 
  171    virtual std::shared_ptr<Polytope<ValueType>> 
clean();
 
  177    virtual std::string 
toString(
bool numbersAsDouble = 
false) 
const;
 
  189                                                       boost::optional<std::vector<Point>> 
const& points);
 
 
This class is responsible for managing a set of typed variables and all expressions using these varia...
 
A bit vector that is internally represented as a vector of 64-bit values.
 
std::vector< ValueType > Point
 
virtual std::shared_ptr< Polytope< ValueType > > affineTransformation(std::vector< Point > const &matrix, Point const &vector) const =0
Returns the affine transformation of this polytope P w.r.t.
 
static std::shared_ptr< Polytope< ValueType > > createDownwardClosure(std::vector< Point > const &points)
Creates the downward closure of the given points (i.e., the set { x | ex.
 
virtual bool contains(std::shared_ptr< Polytope< ValueType > > const &other) const =0
Returns true iff the given polytope is a subset of this polytope.
 
virtual std::vector< Point > getVerticesInClockwiseOrder() const
Returns the vertices of this 2D-polytope in clockwise order.
 
virtual std::pair< Point, bool > optimize(Point const &direction) const =0
Finds an optimal point inside this polytope w.r.t.
 
virtual std::shared_ptr< Polytope< ValueType > > minkowskiSum(std::shared_ptr< Polytope< ValueType > > const &rhs) const =0
Returns the minkowskiSum of this polytope and rhs.
 
std::vector< std::shared_ptr< Polytope< ValueType > > > setMinus(std::shared_ptr< Polytope< ValueType > > const &rhs) const
Computes the set {x \in this | x \notin rhs}.
 
static std::shared_ptr< Polytope< ValueType > > create(std::vector< Halfspace< ValueType > > const &halfspaces)
Creates a polytope from the given halfspaces.
 
virtual std::vector< storm::expressions::Expression > getConstraints(storm::expressions::ExpressionManager const &manager, std::vector< storm::expressions::Variable > const &variables) const
Returns the constrains defined by this polytope as an expression over the given variables.
 
virtual std::shared_ptr< Polytope< ValueType > > intersection(Halfspace< ValueType > const &halfspace) const =0
 
virtual std::shared_ptr< Polytope< ValueType > > downwardClosure() const
Returns the downward closure of this, i.e., the set { x | ex.
 
std::shared_ptr< Polytope< TargetType > > convertNumberRepresentation() const
converts the intern number representation of the polytope to the given target type
 
virtual bool isNativePolytope() const
 
virtual std::shared_ptr< Polytope< ValueType > > clean()
Performs cleaning operations, e.g., deleting redundant halfspaces.
 
static std::shared_ptr< Polytope< ValueType > > createUniversalPolytope()
Creates the universal polytope (i.e., the set R^n)
 
virtual std::string toString(bool numbersAsDouble=false) const
 
virtual bool isUniversal() const =0
Returns whether this polytope is universal (i.e., equals R^n).
 
virtual bool isEmpty() const =0
Returns whether this polytope is the empty set.
 
virtual std::shared_ptr< Polytope< ValueType > > convexUnion(std::shared_ptr< Polytope< ValueType > > const &rhs) const =0
Returns the convex union of this polytope and rhs.
 
virtual std::vector< Halfspace< ValueType > > getHalfspaces() const =0
Returns the halfspaces of this polytope.
 
virtual bool contains(Point const &point) const =0
Returns true iff the given point is inside of the polytope.
 
virtual std::vector< Point > getVertices() const =0
Returns the vertices of this polytope.
 
static std::shared_ptr< Polytope< ValueType > > createEmptyPolytope()
Creates the empty polytope (i.e., emptyset)
 
virtual std::shared_ptr< Polytope< ValueType > > intersection(std::shared_ptr< Polytope< ValueType > > const &rhs) const =0
Intersects this polytope with rhs and returns the result.
 
static std::shared_ptr< Polytope< ValueType > > createSelectiveDownwardClosure(std::vector< Point > const &points, storm::storage::BitVector const &selectedDimensions)
Creates the downward closure of the given points but only with respect to the selected dimensions,...
 
std::shared_ptr< Polytope< ValueType > > shift(Point const &b) const
Returns the Polytope described by the set {x+b | x \in this}.
 
virtual std::vector< storm::expressions::Variable > declareVariables(storm::expressions::ExpressionManager &manager, std::string const &namePrefix) const
Declares one variable for each dimension and returns the obtained variables.