Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
HyperplaneEnumeration.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
5
6namespace storm {
7namespace storage {
8namespace geometry {
9
10template<typename ValueType>
12 public:
13 typedef Eigen::Matrix<ValueType, Eigen::Dynamic, Eigen::Dynamic> EigenMatrix;
14 typedef Eigen::Matrix<ValueType, Eigen::Dynamic, 1> EigenVector;
15
17 virtual ~HyperplaneEnumeration() = default;
18
19 /*
20 * Generates the vertices of the given polytope by enumerating all intersection points generated by subsets of hyperplanes of size hPoly.dimension().
21 * If the given flag is true, this method will also compute
22 * * the minimal set of hyperplanes which represent the given hPoly (can be used to remove redundant hyperplanes), and
23 * * for each hyperplane, the set of (non-redundant) vertices that lie on that hyperplane.
24 *
25 * Use the provided getter methods to retrieve the results
26 *
27 * @return true iff conversion was successful.
28 */
29 void generateVerticesFromConstraints(EigenMatrix const& constraintMatrix, EigenVector const& constraintVector,
30 bool generateRelevantHyperplanesAndVertexSets);
31
32 std::vector<EigenVector>& getResultVertices();
33
40
46 std::vector<std::vector<uint_fast64_t>>& getVertexSets();
47
48 /*
49 * Returns true if the hyperplanes with indices of subset and item are all linear independent
50 * Note that this is also used by the hybrid polytope.
51 */
52 static bool linearDependenciesFilter(std::vector<uint_fast64_t> const& subset, uint_fast64_t const& item, EigenMatrix const& A);
53
54 private:
55 std::vector<EigenVector> resultVertices;
56 EigenMatrix relevantMatrix;
57 EigenVector relevantVector;
58 std::vector<std::vector<uint_fast64_t>> vertexSets;
59};
60} // namespace geometry
61} // namespace storage
62} // namespace storm
static bool linearDependenciesFilter(std::vector< uint_fast64_t > const &subset, uint_fast64_t const &item, EigenMatrix const &A)
void generateVerticesFromConstraints(EigenMatrix const &constraintMatrix, EigenVector const &constraintVector, bool generateRelevantHyperplanesAndVertexSets)
EigenMatrix & getRelevantMatrix()
Returns the set of halfspaces which are not redundant.
std::vector< std::vector< uint_fast64_t > > & getVertexSets()
Returns for each hyperplane the set of vertices that lie on that hyperplane.
Eigen::Matrix< ValueType, Eigen::Dynamic, Eigen::Dynamic > EigenMatrix
Eigen::Matrix< ValueType, Eigen::Dynamic, 1 > EigenVector