33 using std::cout;
using std::endl;
35 #include "lp_solver.hpp" 36 #include "polynomial.hpp" 38 #include "system_constants.hpp" 101 {
return e1.first == e2.first && e1.second == e2.second; }
186 void common_initialization(NVAR_TYPE);
210 skeleton(NVAR_TYPE, vector<constraint> &);
242 return constraints.size();
259 static unsigned invocations;
261 for (
unsigned i = 0; i < constraints.size(); ++i) {
273 bool inconsistent =
true;
275 auto riter = rays.begin();
276 inconsistent and riter != rays.end();
279 if (((*riter) * c) > 0)
280 inconsistent =
false;
282 return not inconsistent;
305 virtual bool solve(vector<constraint> &);
328 set<edge> adjacencies_by_graphs(set<ray>);
352 vector<constraint> constraints;
an edge connecting the two rays and
unsigned long get_number_of_edges()
Returns the number of edges defining the skeleton.
constraint get_constraint(int index)
Returns the indicated constraint. Numbering starts at 0.
ray get_first_ray() const
Returns the first ray listed in this edge.
friend bool operator<(const edge &, const edge &)
Compares two edges lexicographically.
void which_constraints_active_at(const ray &u, bool *result) const
returns the set of constraints in the skeleton active at u
skeleton of a polyhedral cone, with methods allowing definition and refinement
set< edge > get_edges()
Returns the edges that define the skeleton.
exact or approximate polyhedral cone solution, with methods allowing definition and refinement ...
set< edge > union_of_edge_sets(const set< edge > &, const set< edge > &)
edge & operator=(const edge &)
Assignment operator.
ray get_second_ray() const
Returns the second ray listed in this edge.
friend ostream & operator<<(ostream &, const edge &)
Output has the form where is the first ray in this edge, etc.
vector< bool > intersections_of_active_constraints(bool *, bool *, unsigned)
bool is_consistent(const constraint &c) const
tests for consistency of a potentially new constraint.
NVAR_TYPE get_dimension() const
Returns the dimension of the underlying vector space.
edge(const ray &, const ray &)
Creates a new edge that joins the two rays.
unsigned long get_number_of_constraints()
Returns the number of constraints defining the skeleton.
bool is_first_subset_of_second(bool *, bool *, unsigned)
bool is_active_at(const constraint &hyperplane) const
Returns true if and only if the hyperplane is active at this ray.
const vector< constraint > & get_constraints()
Returns the constraints that define the skeleton.
friend bool operator==(const edge &e1, const edge &e2)
Equal if and only if.
a ray defined by nonnegative coordinates
int number_of_common_constraints(bool *, bool *, unsigned)