1#ifndef STORM_STORAGE_GEOMETRY_NATIVEPOLYTOPE_H_
2#define STORM_STORAGE_GEOMETRY_NATIVEPOLYTOPE_H_
13template<
typename ValueType>
16 typedef Eigen::Matrix<ValueType, Eigen::Dynamic, Eigen::Dynamic>
EigenMatrix;
17 typedef Eigen::Matrix<ValueType, Eigen::Dynamic, 1>
EigenVector;
32 boost::optional<std::vector<Point>>
const& points);
63 virtual std::vector<Point>
getVertices()
const override;
68 virtual std::vector<Halfspace<ValueType>>
getHalfspaces()
const override;
73 virtual bool isEmpty()
const override;
113 virtual std::shared_ptr<Polytope<ValueType>>
affineTransformation(std::vector<Point>
const& matrix,
Point const& vector)
const override;
122 virtual std::pair<Point, bool>
optimize(
Point const& direction)
const override;
130 std::string
const& namePrefix)
const override;
136 std::vector<storm::expressions::Variable>
const& variables)
const override;
140 virtual std::shared_ptr<Polytope<ValueType>>
clean()
override;
144 std::vector<EigenVector> getEigenVertices()
const;
This class is responsible for managing a set of typed variables and all expressions using these varia...
virtual bool contains(Point const &point) const override
Returns true iff the given point is inside of the polytope.
Eigen::Matrix< ValueType, Eigen::Dynamic, Eigen::Dynamic > EigenMatrix
virtual std::vector< storm::expressions::Variable > declareVariables(storm::expressions::ExpressionManager &manager, std::string const &namePrefix) const override
declares one variable for each dimension and returns the obtained variables.
virtual std::pair< Point, bool > optimize(Point const &direction) const override
Finds an optimal point inside this polytope w.r.t.
virtual std::shared_ptr< Polytope< ValueType > > clean() override
Performs cleaning operations, e.g., deleting redundant halfspaces.
virtual std::shared_ptr< Polytope< ValueType > > affineTransformation(std::vector< Point > const &matrix, Point const &vector) const override
Returns the affine transformation of this polytope P w.r.t.
virtual bool isNativePolytope() const override
Polytope< ValueType >::Point Point
virtual std::vector< Point > getVertices() const override
Returns the vertices of this polytope.
Eigen::Matrix< ValueType, Eigen::Dynamic, 1 > EigenVector
virtual bool isUniversal() const override
Returns whether this polytope is universal (i.e., equals R^n).
virtual std::shared_ptr< Polytope< ValueType > > intersection(std::shared_ptr< Polytope< ValueType > > const &rhs) const override
Intersects this polytope with rhs and returns the result.
virtual std::shared_ptr< Polytope< ValueType > > minkowskiSum(std::shared_ptr< Polytope< ValueType > > const &rhs) const override
Returns the minkowskiSum of this polytope and rhs.
static std::shared_ptr< Polytope< ValueType > > create(boost::optional< std::vector< Halfspace< ValueType > > > const &halfspaces, boost::optional< std::vector< Point > > const &points)
Creates a NativePolytope from the given halfspaces or points.
virtual bool isEmpty() const override
Returns whether this polytope is the empty set.
virtual std::vector< storm::expressions::Expression > getConstraints(storm::expressions::ExpressionManager const &manager, std::vector< storm::expressions::Variable > const &variables) const override
returns the constrains defined by this polytope as an expression over the given variables
virtual ~NativePolytope()
virtual std::vector< Halfspace< ValueType > > getHalfspaces() const override
Returns the halfspaces of this polytope.
virtual std::shared_ptr< Polytope< ValueType > > convexUnion(std::shared_ptr< Polytope< ValueType > > const &rhs) const override
Returns the convex union of this polytope and rhs.
std::vector< ValueType > Point