Gröbner basis project
Codebase for research into Gröbner basis computation
|
skeleton of a polyhedral cone, with methods allowing definition and refinement More...
#include <skeleton.hpp>
Public Member Functions | |
Construction | |
void | common_initialization (NVAR_TYPE) |
Initialization common to all constructors. | |
skeleton (NVAR_TYPE) | |
Constructs a basic skeleton in the given number of dimensions, initialized to the axes, or (equivalently) to the set of constraints \( x_i \geq 0 \). More... | |
skeleton (NVAR_TYPE, vector< constraint > &) | |
Constructs a skeleton described by the given system of constraints. More... | |
skeleton (skeleton &) | |
Performs a deep copy of other . | |
virtual bool | copy (const LP_Solver *) |
performs a deep copy, similar to a copy constructor More... | |
Destruction | |
~skeleton () | |
Currently does nothing the compiler wouldn't do. | |
Basic properties | |
NVAR_TYPE | get_dimension () const |
Returns the dimension of the underlying vector space. | |
unsigned long | get_number_of_edges () |
Returns the number of edges defining the skeleton. | |
set< edge > | get_edges () |
Returns the edges that define the skeleton. | |
unsigned long | get_number_of_constraints () |
Returns the number of constraints defining the skeleton. | |
const vector< constraint > & | get_constraints () |
Returns the constraints that define the skeleton. | |
constraint | get_constraint (int index) |
Returns the indicated constraint. Numbering starts at 0. | |
Computation | |
void | which_constraints_active_at (const ray &u, bool *result) const |
returns the set of constraints in the skeleton active at u | |
bool | is_consistent (const constraint &c) const |
tests for consistency of a potentially new constraint. | |
Modification | |
virtual bool | solve (vector< constraint > &) |
Adds the indicated constraints (plural!) and re-computes the skeleton. More... | |
virtual bool | solve (constraint &) |
Adds the indicated constraint (singular!) and re-computes the skeleton. More... | |
set< edge > | adjacencies_by_graphs (set< ray >) |
Re-computes the edges in the skeleton using Zolotych's GraphAdj algorithm and returns the result. | |
skeleton & | operator= (const skeleton &) |
Assignment operator; empties current set & copies from other. | |
![]() | |
virtual unsigned long | get_number_of_rays () |
Returns the number of rays defining the skeleton. | |
virtual const set< ray > & | get_rays () |
Returns the rays that define the skeleton. | |
virtual bool | makes_consistent_constraint (const Monomial &t, const Monomial &u, bool show_data=false) |
tests for consistency of a constraint generated by two monomials. | |
Friends | |
I/O | |
ostream & | operator<< (ostream &, const skeleton &) |
prints out the constraints, then the rays, then the edges. | |
Additional Inherited Members | |
![]() | |
set< ray > | rays |
skeleton of a polyhedral cone, with methods allowing definition and refinement
This class implements the Double Description Method, an iterative algorithm for computing the skeleton of a cone. This particular version uses Zolotykh's GraphAdj criterion [5]. The iterative nature means that the cone can be updated with new constraints, passed to that algorithm, and the skeleton will be automatically recomputed.
Definition at line 169 of file skeleton.hpp.
skeleton::skeleton | ( | NVAR_TYPE | dimension | ) |
Constructs a basic skeleton in the given number of dimensions, initialized to the axes, or (equivalently) to the set of constraints \( x_i \geq 0 \).
The rays are informed of their active constraints.
Definition at line 102 of file skeleton.cpp.
skeleton::skeleton | ( | NVAR_TYPE | dimension, |
vector< constraint > & | constraints | ||
) |
Constructs a skeleton described by the given system of constraints.
Practically speaking, it first generates a basic skeleton, then iterates on the given constraints.
u.size() == v.size()
for all u
, v
in the vector Definition at line 107 of file skeleton.cpp.
|
virtual |
performs a deep copy, similar to a copy constructor
Implements LP_Solver.
Definition at line 123 of file skeleton.cpp.
|
virtual |
Adds the indicated constraints (plural!) and re-computes the skeleton.
true
if and only if the new constraints are consistent with the current constraintsfalse
, you have an inconsistent system! While the present cone will remain consistent, the function will not roll back previous changes you have made, so if you want to iterate again, your best bet is to copy the skeleton, and try that copy. Accept the new constraints only if that copy succeeds, in which case, you might as well discard the original, and keep the copy. Implements LP_Solver.
Definition at line 246 of file skeleton.cpp.
|
virtual |
Adds the indicated constraint (singular!) and re-computes the skeleton.
true
if and only if the new constraint is consistent with the current constraintsfalse
, you have an inconsistent system! While the present cone will remain consistent, the function will not roll back previous changes you have made, so if you want to iterate again, your best bet is to copy the skeleton, and try that copy. Accept the new constraints only if that copy succeeds, in which case, you might as well discard the original, and keep the copy. Implements LP_Solver.
Definition at line 138 of file skeleton.cpp.