#include <ppl.hh>
Inherits Parma_Polyhedra_Library::Linear_System.
Classes | |
class | const_iterator |
An iterator over a system of constraints. More... | |
Public Member Functions | |
Constraint_System () | |
Default constructor: builds an empty system of constraints. | |
Constraint_System (const Constraint &c) | |
Builds the singleton system containing only constraint c . | |
Constraint_System (const Congruence_System &cgs) | |
Builds a system containing copies of any equalities in cgs . | |
Constraint_System (const Constraint_System &cs) | |
Ordinary copy-constructor. | |
~Constraint_System () | |
Destructor. | |
Constraint_System & | operator= (const Constraint_System &y) |
Assignment operator. | |
dimension_type | space_dimension () const |
Returns the dimension of the vector space enclosing *this . | |
bool | has_strict_inequalities () const |
Returns true if and only if *this contains one or more strict inequality constraints. | |
void | clear () |
Removes all the constraints from the constraint system and sets its space dimension to 0. | |
void | insert (const Constraint &c) |
Inserts in *this a copy of the constraint c , increasing the number of space dimensions if needed. | |
bool | empty () const |
Returns true if and only if *this has no constraints. | |
const_iterator | begin () const |
Returns the const_iterator pointing to the first constraint, if *this is not empty; otherwise, returns the past-the-end const_iterator. | |
const_iterator | end () const |
Returns the past-the-end const_iterator. | |
bool | OK () const |
Checks if all the invariants are satisfied. | |
memory_size_type | total_memory_in_bytes () const |
Returns the total size in bytes of the memory occupied by *this . | |
memory_size_type | external_memory_in_bytes () const |
Returns the size in bytes of the memory managed by *this . | |
void | swap (Constraint_System &y) |
Swaps *this with y . | |
Static Public Member Functions | |
static dimension_type | max_space_dimension () |
Returns the maximum space dimension a Constraint_System can handle. | |
static void | initialize () |
Initializes the class. | |
static void | finalize () |
Finalizes the class. | |
static const Constraint_System & | zero_dim_empty () |
Returns the singleton system containing only Constraint::zero_dim_false(). | |
Friends | |
bool | operator== (const Polyhedron &x, const Polyhedron &y) |
Returns true if and only if x and y are the same polyhedron. | |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &s, const Constraint_System &cs) |
Output operator. | |
void | swap (Parma_Polyhedra_Library::Constraint_System &x, Parma_Polyhedra_Library::Constraint_System &y) |
Specializes std::swap . |
An object of the class Constraint_System is a system of constraints, i.e., a multiset of objects of the class Constraint. When inserting constraints in a system, space dimensions are automatically adjusted so that all the constraints in the system are defined on the same vector space.
x
and y
are defined as follows: Variable x(0); Variable y(1);
Constraint_System cs; cs.insert(x >= 0); cs.insert(x <= 3); cs.insert(y >= 0); cs.insert(y <= 3);
cs.insert(x + y > 0); cs.insert(x + y < 6); cs.insert(x - y < 3); cs.insert(y - x < 3);
Constraint_System cs; cs.insert(x >= 0); cs.insert(x - y <= 0); cs.insert(x - y + 1 >= 0);
bool operator== | ( | const Polyhedron & | x, | |
const Polyhedron & | y | |||
) | [friend] |
Returns true
if and only if x
and y
are the same polyhedron.
Note that x
and y
may be topology- and/or dimension-incompatible polyhedra: in those cases, the value false
is returned.
std::ostream & operator<< | ( | std::ostream & | s, | |
const Constraint_System & | cs | |||
) | [related] |
Output operator.
Writes true
if cs
is empty. Otherwise, writes on s
the constraints of cs
, all in one row and separated by ", ".
void swap | ( | Parma_Polyhedra_Library::Constraint_System & | x, | |
Parma_Polyhedra_Library::Constraint_System & | y | |||
) | [related] |
Specializes std::swap
.