Gröbner basis project
Codebase for research into Gröbner basis computation
PPL_Solver Class Reference

approximate skeleton of a polyhedral cone, using PPL linear solver More...

#include <ppl_solver.hpp>

Inheritance diagram for PPL_Solver:
LP_Solver

Public Member Functions

Construction
 PPL_Solver (NVAR_TYPE n)
 initializes solver for \( n \) variables
 
 PPL_Solver (const PPL_Solver &)
 copy constructor (deep copy)
 
virtual bool copy (const LP_Solver *)
 performs a deep copy, similar to a copy constructor More...
 
Destruction
 ~PPL_Solver ()
 
Basic properties
virtual NVAR_TYPE get_dimension () const
 Returns the dimension of the underlying vector space.
 
virtual unsigned long get_number_of_constraints ()
 
Modification
virtual bool solve (constraint &)
 Adds the indicated constraint (singular!) and re-computes the solution. More...
 
virtual bool solve (vector< constraint > &)
 Adds the indicated constraints (plural!) and re-computes the solution. More...
 
virtual void setup_rays ()
 clear the current set of rays and extracts the ones contained in lp
 
- Public Member Functions inherited from LP_Solver
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.
 

Protected Attributes

PPL::NNC_Polyhedron * lp
 PPL problem interface.
 
unsigned m
 number of constraints
 
NVAR_TYPE n
 number of variables
 
RAYENT_TYPE * ray_data
 used to retrieve rays
 
PPL::Variable ** X
 array of variables
 
- Protected Attributes inherited from LP_Solver
set< rayrays
 

Static Protected Attributes

static unsigned instances = 0
 number of PPL instances
 

Detailed Description

approximate skeleton of a polyhedral cone, using PPL linear solver

Author
John Perry
Version
1.0
Date
January 2017

This class serves as an interface to PPL [1], which we can use to find the skeleton to a polyhedral cone.

Definition at line 21 of file ppl_solver.hpp.

Member Function Documentation

◆ copy()

bool PPL_Solver::copy ( const LP_Solver )
virtual

performs a deep copy, similar to a copy constructor

Warning
Do not mix-and-match solvers. At the present time, a PPL_Solver is not equipped to copy a GLPK_Solver, or vice versa. (This doesn't even make sense between exact and approximate solvers.)

Implements LP_Solver.

Definition at line 65 of file ppl_solver.cpp.

◆ solve() [1/2]

bool PPL_Solver::solve ( constraint )
virtual

Adds the indicated constraint (singular!) and re-computes the solution.

Returns
true if and only if the new constraint is consistent with the current constraints
Warning
Checking the return value is crucial! If the function returns false, 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 91 of file ppl_solver.cpp.

◆ solve() [2/2]

bool PPL_Solver::solve ( vector< constraint > &  )
virtual

Adds the indicated constraints (plural!) and re-computes the solution.

Returns
true if and only if the new constraints are consistent with the current constraints
Warning
Checking the return value is crucial! If the function returns false, 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 103 of file ppl_solver.cpp.


The documentation for this class was generated from the following files: