Inherited by Parma_Polyhedra_Library::C_Polyhedron, and Parma_Polyhedra_Library::NNC_Polyhedron.
Exception Throwers | |
void | throw_runtime_error (const char *method) const |
void | throw_invalid_argument (const char *method, const char *reason) const |
void | throw_topology_incompatible (const char *method, const char *ph_name, const Polyhedron &ph) const |
void | throw_topology_incompatible (const char *method, const char *c_name, const Constraint &c) const |
void | throw_topology_incompatible (const char *method, const char *g_name, const Generator &g) const |
void | throw_topology_incompatible (const char *method, const char *cs_name, const Constraint_System &cs) const |
void | throw_topology_incompatible (const char *method, const char *gs_name, const Generator_System &gs) const |
void | throw_dimension_incompatible (const char *method, const char *other_name, dimension_type other_dim) const |
void | throw_dimension_incompatible (const char *method, const char *ph_name, const Polyhedron &ph) const |
void | throw_dimension_incompatible (const char *method, const char *e_name, const Linear_Expression &e) const |
void | throw_dimension_incompatible (const char *method, const char *c_name, const Constraint &c) const |
void | throw_dimension_incompatible (const char *method, const char *g_name, const Generator &g) const |
void | throw_dimension_incompatible (const char *method, const char *cg_name, const Congruence &cg) const |
void | throw_dimension_incompatible (const char *method, const char *cs_name, const Constraint_System &cs) const |
void | throw_dimension_incompatible (const char *method, const char *gs_name, const Generator_System &gs) const |
void | throw_dimension_incompatible (const char *method, const char *cgs_name, const Congruence_System &cgs) const |
void | throw_dimension_incompatible (const char *method, const char *var_name, const Variable var) const |
void | throw_dimension_incompatible (const char *method, dimension_type required_space_dim) const |
void | throw_invalid_generator (const char *method, const char *g_name) const |
void | throw_invalid_generators (const char *method, const char *gs_name) const |
static void | throw_space_dimension_overflow (Topology topol, const char *method, const char *reason) |
Public Member Functions | |
Member Functions that Do Not Modify the Polyhedron | |
dimension_type | space_dimension () const |
Returns the dimension of the vector space enclosing *this . | |
dimension_type | affine_dimension () const |
Returns ![]() *this is empty; otherwise, returns the affine dimension of *this . | |
const Constraint_System & | constraints () const |
Returns the system of constraints. | |
const Constraint_System & | minimized_constraints () const |
Returns the system of constraints, with no redundant constraint. | |
const Generator_System & | generators () const |
Returns the system of generators. | |
const Generator_System & | minimized_generators () const |
Returns the system of generators, with no redundant generator. | |
Poly_Con_Relation | relation_with (const Constraint &c) const |
Returns the relations holding between the polyhedron *this and the constraint c . | |
Poly_Gen_Relation | relation_with (const Generator &g) const |
Returns the relations holding between the polyhedron *this and the generator g . | |
bool | is_empty () const |
Returns true if and only if *this is an empty polyhedron. | |
bool | is_universe () const |
Returns true if and only if *this is a universe polyhedron. | |
bool | is_topologically_closed () const |
Returns true if and only if *this is a topologically closed subset of the vector space. | |
bool | is_disjoint_from (const Polyhedron &y) const |
Returns true if and only if *this and y are disjoint. | |
bool | is_bounded () const |
Returns true if and only if *this is a bounded polyhedron. | |
bool | bounds_from_above (const Linear_Expression &expr) const |
Returns true if and only if expr is bounded from above in *this . | |
bool | bounds_from_below (const Linear_Expression &expr) const |
Returns true if and only if expr is bounded from below in *this . | |
bool | maximize (const Linear_Expression &expr, Coefficient &sup_n, Coefficient &sup_d, bool &maximum) const |
Returns true if and only if *this is not empty and expr is bounded from above in *this , in which case the supremum value is computed. | |
bool | maximize (const Linear_Expression &expr, Coefficient &sup_n, Coefficient &sup_d, bool &maximum, Generator &point) const |
Returns true if and only if *this is not empty and expr is bounded from above in *this , in which case the supremum value and a point where expr reaches it are computed. | |
bool | minimize (const Linear_Expression &expr, Coefficient &inf_n, Coefficient &inf_d, bool &minimum) const |
Returns true if and only if *this is not empty and expr is bounded from below in *this , in which case the infimum value is computed. | |
bool | minimize (const Linear_Expression &expr, Coefficient &inf_n, Coefficient &inf_d, bool &minimum, Generator &point) const |
Returns true if and only if *this is not empty and expr is bounded from below in *this , in which case the infimum value and a point where expr reaches it are computed. | |
bool | contains (const Polyhedron &y) const |
Returns true if and only if *this contains y . | |
bool | strictly_contains (const Polyhedron &y) const |
Returns true if and only if *this strictly contains y . | |
template<typename Box> | |
void | shrink_bounding_box (Box &box, Complexity_Class complexity=ANY_COMPLEXITY) const |
Uses *this to shrink a generic, interval-based bounding box. Assigns to box the intersection of box with the smallest bounding box containing *this . | |
bool | OK (bool check_not_empty=false) const |
Checks if all the invariants are satisfied. | |
Space Dimension Preserving Member Functions that May Modify the Polyhedron | |
void | add_constraint (const Constraint &c) |
Adds a copy of constraint c to the system of constraints of *this (without minimizing the result). | |
bool | add_constraint_and_minimize (const Constraint &c) |
Adds a copy of constraint c to the system of constraints of *this , minimizing the result. | |
void | add_generator (const Generator &g) |
Adds a copy of generator g to the system of generators of *this (without minimizing the result). | |
bool | add_generator_and_minimize (const Generator &g) |
Adds a copy of generator g to the system of generators of *this , minimizing the result. | |
void | add_congruence (const Congruence &cg) |
Adds a copy of congruence cg to the system of congruences of this (without minimizing the result). | |
void | add_constraints (const Constraint_System &cs) |
Adds a copy of the constraints in cs to the system of constraints of *this (without minimizing the result). | |
void | add_recycled_constraints (Constraint_System &cs) |
Adds the constraints in cs to the system of constraints of *this (without minimizing the result). | |
bool | add_constraints_and_minimize (const Constraint_System &cs) |
Adds a copy of the constraints in cs to the system of constraints of *this , minimizing the result. | |
bool | add_recycled_constraints_and_minimize (Constraint_System &cs) |
Adds the constraints in cs to the system of constraints of *this , minimizing the result. | |
void | add_generators (const Generator_System &gs) |
Adds a copy of the generators in gs to the system of generators of *this (without minimizing the result). | |
void | add_recycled_generators (Generator_System &gs) |
Adds the generators in gs to the system of generators of *this (without minimizing the result). | |
bool | add_generators_and_minimize (const Generator_System &gs) |
Adds a copy of the generators in gs to the system of generators of *this , minimizing the result. | |
bool | add_recycled_generators_and_minimize (Generator_System &gs) |
Adds the generators in gs to the system of generators of *this , minimizing the result. | |
void | add_congruences (const Congruence_System &cgs) |
Adds to *this constraints equivalent to the congruences in cgs (without minimizing the result). | |
void | intersection_assign (const Polyhedron &y) |
Assigns to *this the intersection of *this and y . The result is not guaranteed to be minimized. | |
bool | intersection_assign_and_minimize (const Polyhedron &y) |
Assigns to *this the intersection of *this and y , minimizing the result. | |
void | poly_hull_assign (const Polyhedron &y) |
Assigns to *this the poly-hull of *this and y . The result is not guaranteed to be minimized. | |
bool | poly_hull_assign_and_minimize (const Polyhedron &y) |
Assigns to *this the poly-hull of *this and y , minimizing the result. | |
void | upper_bound_assign (const Polyhedron &y) |
Same as poly_hull_assign(y). | |
void | poly_difference_assign (const Polyhedron &y) |
Assigns to *this the poly-difference of *this and y . The result is not guaranteed to be minimized. | |
void | difference_assign (const Polyhedron &y) |
Same as poly_difference_assign(y). | |
void | affine_image (Variable var, const Linear_Expression &expr, Coefficient_traits::const_reference denominator=Coefficient_one()) |
Assigns to *this the affine image of *this under the function mapping variable var to the affine expression specified by expr and denominator . | |
void | affine_preimage (Variable var, const Linear_Expression &expr, Coefficient_traits::const_reference denominator=Coefficient_one()) |
Assigns to *this the affine preimage of *this under the function mapping variable var to the affine expression specified by expr and denominator . | |
void | generalized_affine_image (Variable var, const Relation_Symbol relsym, const Linear_Expression &expr, Coefficient_traits::const_reference denominator=Coefficient_one()) |
Assigns to *this the image of *this with respect to the generalized affine relation ![]() ![]() relsym . | |
void | generalized_affine_preimage (Variable var, const Relation_Symbol relsym, const Linear_Expression &expr, Coefficient_traits::const_reference denominator=Coefficient_one()) |
Assigns to *this the preimage of *this with respect to the generalized affine relation ![]() ![]() relsym . | |
void | generalized_affine_image (const Linear_Expression &lhs, const Relation_Symbol relsym, const Linear_Expression &rhs) |
Assigns to *this the image of *this with respect to the generalized affine relation ![]() ![]() relsym . | |
void | generalized_affine_preimage (const Linear_Expression &lhs, const Relation_Symbol relsym, const Linear_Expression &rhs) |
Assigns to *this the preimage of *this with respect to the generalized affine relation ![]() ![]() relsym . | |
void | bounded_affine_image (Variable var, const Linear_Expression &lb_expr, const Linear_Expression &ub_expr, Coefficient_traits::const_reference denominator=Coefficient_one()) |
Assigns to *this the image of *this with respect to the bounded affine relation ![]() | |
void | bounded_affine_preimage (Variable var, const Linear_Expression &lb_expr, const Linear_Expression &ub_expr, Coefficient_traits::const_reference denominator=Coefficient_one()) |
Assigns to *this the preimage of *this with respect to the bounded affine relation ![]() | |
void | time_elapse_assign (const Polyhedron &y) |
Assigns to *this the result of computing the time-elapse between *this and y . | |
void | topological_closure_assign () |
Assigns to *this its topological closure. | |
void | BHRZ03_widening_assign (const Polyhedron &y, unsigned *tp=0) |
Assigns to *this the result of computing the BHRZ03-widening between *this and y . | |
void | limited_BHRZ03_extrapolation_assign (const Polyhedron &y, const Constraint_System &cs, unsigned *tp=0) |
Improves the result of the BHRZ03-widening computation by also enforcing those constraints in cs that are satisfied by all the points of *this . | |
void | bounded_BHRZ03_extrapolation_assign (const Polyhedron &y, const Constraint_System &cs, unsigned *tp=0) |
Improves the result of the BHRZ03-widening computation by also enforcing those constraints in cs that are satisfied by all the points of *this , plus all the constraints of the form ![]() ![]() ![]() *this . | |
void | H79_widening_assign (const Polyhedron &y, unsigned *tp=0) |
Assigns to *this the result of computing the H79-widening between *this and y . | |
void | limited_H79_extrapolation_assign (const Polyhedron &y, const Constraint_System &cs, unsigned *tp=0) |
Improves the result of the H79-widening computation by also enforcing those constraints in cs that are satisfied by all the points of *this . | |
void | bounded_H79_extrapolation_assign (const Polyhedron &y, const Constraint_System &cs, unsigned *tp=0) |
Improves the result of the H79-widening computation by also enforcing those constraints in cs that are satisfied by all the points of *this , plus all the constraints of the form ![]() ![]() ![]() *this . | |
Member Functions that May Modify the Dimension of the Vector Space | |
void | add_space_dimensions_and_embed (dimension_type m) |
Adds m new space dimensions and embeds the old polyhedron in the new vector space. | |
void | add_space_dimensions_and_project (dimension_type m) |
Adds m new space dimensions to the polyhedron and does not embed it in the new vector space. | |
void | concatenate_assign (const Polyhedron &y) |
Assigns to *this the concatenation of *this and y , taken in this order. | |
void | remove_space_dimensions (const Variables_Set &to_be_removed) |
Removes all the specified dimensions from the vector space. | |
void | remove_higher_space_dimensions (dimension_type new_dimension) |
Removes the higher dimensions of the vector space so that the resulting space will have dimension new_dimension . | |
template<typename Partial_Function> | |
void | map_space_dimensions (const Partial_Function &pfunc) |
Remaps the dimensions of the vector space according to a partial function. | |
void | expand_space_dimension (Variable var, dimension_type m) |
Creates m copies of the space dimension corresponding to var . | |
void | fold_space_dimensions (const Variables_Set &to_be_folded, Variable var) |
Folds the space dimensions in to_be_folded into var . | |
Miscellaneous Member Functions | |
~Polyhedron () | |
Destructor. | |
void | swap (Polyhedron &y) |
Swaps *this with polyhedron y . (*this and y can be dimension-incompatible.). | |
void | ascii_dump () const |
void | ascii_dump (std::ostream &s) const |
void | print () const |
bool | ascii_load (std::istream &s) |
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 . | |
Static Public Member Functions | |
static dimension_type | max_space_dimension () |
Returns the maximum space dimension all kinds of Polyhedron can handle. | |
Protected Member Functions | |
Polyhedron (Topology topol, dimension_type num_dimensions, Degenerate_Element kind) | |
Builds a polyhedron having the specified properties. | |
Polyhedron (const Polyhedron &y) | |
Ordinary copy-constructor. | |
Polyhedron (Topology topol, const Constraint_System &cs) | |
Builds a polyhedron from a system of constraints. | |
Polyhedron (Topology topol, Constraint_System &cs) | |
Builds a polyhedron recycling a system of constraints. | |
Polyhedron (Topology topol, const Generator_System &gs) | |
Builds a polyhedron from a system of generators. | |
Polyhedron (Topology topol, Generator_System &gs) | |
Builds a polyhedron recycling a system of generators. | |
template<typename Box> | |
Polyhedron (Topology topol, const Box &box) | |
Builds a polyhedron out of a generic, interval-based bounding box. | |
Polyhedron & | operator= (const Polyhedron &y) |
The assignment operator. (*this and y can be dimension-incompatible.). | |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &s, const Polyhedron &ph) |
Output operator. | |
bool | operator!= (const Polyhedron &x, const Polyhedron &y) |
Returns true if and only if x and y are different polyhedra. | |
void | swap (Parma_Polyhedra_Library::Polyhedron &x, Parma_Polyhedra_Library::Polyhedron &y) |
Specializes std::swap . |
An object of the class Polyhedron represents a convex polyhedron in the vector space .
A polyhedron can be specified as either a finite system of constraints or a finite system of generators (see Section Representations of Convex Polyhedra) and it is always possible to obtain either representation. That is, if we know the system of constraints, we can obtain from this the system of generators that define the same polyhedron and vice versa. These systems can contain redundant members: in this case we say that they are not in the minimal form. Most operators on polyhedra are provided with two implementations: one of these, denoted <operator-name>_and_minimize
, also enforces the minimization of the representations, and returns the Boolean value false
whenever the resulting polyhedron turns out to be empty.
Two key attributes of any polyhedron are its topological kind (recording whether it is a C_Polyhedron or an NNC_Polyhedron object) and its space dimension (the dimension of the enclosing vector space):
Note that four different polyhedra can be defined on the zero-dimension space: the empty polyhedron, either closed or NNC, and the universe polyhedron , again either closed or NNC.
x
and y
are defined (where they are used) 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); C_Polyhedron ph(cs);
Generator_System gs; gs.insert(point(0*x + 0*y)); gs.insert(point(0*x + 3*y)); gs.insert(point(3*x + 0*y)); gs.insert(point(3*x + 3*y)); C_Polyhedron ph(gs);
Constraint_System cs; cs.insert(x >= 0); cs.insert(x - y <= 0); cs.insert(x - y + 1 >= 0); C_Polyhedron ph(cs);
Generator_System gs; gs.insert(point(0*x + 0*y)); gs.insert(point(0*x + y)); gs.insert(ray(x - y)); C_Polyhedron ph(gs);
C_Polyhedron ph(2); ph.add_constraint(y >= 0);
C_Polyhedron ph(2, EMPTY); ph.add_generator(point(0*x + 0*y)); ph.add_generator(ray(y)); ph.add_generator(line(x));
add_space_dimensions_and_embed
: C_Polyhedron ph(1); ph.add_constraint(x == 2); ph.add_space_dimensions_and_embed(1);
add_space_dimensions_and_project
: C_Polyhedron ph(1); ph.add_constraint(x == 2); ph.add_space_dimensions_and_project(1);
add_space_dimensions_and_embed
. After the last line of code, the resulting polyhedron is the singleton set affine_image
: C_Polyhedron ph(2, EMPTY); ph.add_generator(point(0*x + 0*y)); ph.add_generator(point(0*x + 3*y)); ph.add_generator(point(3*x + 0*y)); ph.add_generator(point(3*x + 3*y)); Linear_Expression expr = x + 4; ph.affine_image(x, expr);
x
is Linear_Expression expr = x + y;
Linear_Expression expr = y;
affine_preimage
: C_Polyhedron ph(2); ph.add_constraint(x >= 0); ph.add_constraint(x <= 3); ph.add_constraint(y >= 0); ph.add_constraint(y <= 3); Linear_Expression expr = x + 4; ph.affine_preimage(x, expr);
var
and the affine expression and the denominator are the same as in Example 6, while the resulting polyhedron is again the same square, but translated to the left. Moreover, if the affine transformation for x
is Linear_Expression expr = x + y;
x
, for example, the affine expression Linear_Expression expr = y;
Variable z(2); Variable w(3);
remove_space_dimensions
: Generator_System gs; gs.insert(point(3*x + y +0*z + 2*w)); C_Polyhedron ph(gs); Variables_Set to_be_removed; to_be_removed.insert(y); to_be_removed.insert(z); ph.remove_space_dimensions(to_be_removed);
remove_space_dimensions
operator, unexpected results can be obtained. For instance, by using the following code we would obtain a different result: set<Variable> to_be_removed1; to_be_removed1.insert(y); ph.remove_space_dimensions(to_be_removed1); set<Variable> to_be_removed2; to_be_removed2.insert(z); ph.remove_space_dimensions(to_be_removed2);
to_be_removed2
we are actually removing variable remove_space_dimensions
is not idempotent: removing twice the same non-empty set of dimensions is never the same as removing them just once. Parma_Polyhedra_Library::Polyhedron::Polyhedron | ( | Topology | topol, | |
dimension_type | num_dimensions, | |||
Degenerate_Element | kind | |||
) | [protected] |
Builds a polyhedron having the specified properties.
topol | The topology of the polyhedron; | |
num_dimensions | The number of dimensions of the vector space enclosing the polyhedron; | |
kind | Specifies whether the universe or the empty polyhedron has to be built. |
Parma_Polyhedra_Library::Polyhedron::Polyhedron | ( | Topology | topol, | |
const Constraint_System & | cs | |||
) | [protected] |
Builds a polyhedron from a system of constraints.
The polyhedron inherits the space dimension of the constraint system.
topol | The topology of the polyhedron; | |
cs | The system of constraints defining the polyhedron. |
std::invalid_argument | Thrown if the topology of cs is incompatible with topol . |
Parma_Polyhedra_Library::Polyhedron::Polyhedron | ( | Topology | topol, | |
Constraint_System & | cs | |||
) | [protected] |
Builds a polyhedron recycling a system of constraints.
The polyhedron inherits the space dimension of the constraint system.
topol | The topology of the polyhedron; | |
cs | The system of constraints defining the polyhedron. It is not declared const because its data-structures will be recycled to build the polyhedron. |
std::invalid_argument | Thrown if the topology of cs is incompatible with topol . |
Parma_Polyhedra_Library::Polyhedron::Polyhedron | ( | Topology | topol, | |
const Generator_System & | gs | |||
) | [protected] |
Builds a polyhedron from a system of generators.
The polyhedron inherits the space dimension of the generator system.
topol | The topology of the polyhedron; | |
gs | The system of generators defining the polyhedron. |
std::invalid_argument | Thrown if the topology of gs is incompatible with topol , or if the system of generators is not empty but has no points. |
Parma_Polyhedra_Library::Polyhedron::Polyhedron | ( | Topology | topol, | |
Generator_System & | gs | |||
) | [protected] |
Builds a polyhedron recycling a system of generators.
The polyhedron inherits the space dimension of the generator system.
topol | The topology of the polyhedron; | |
gs | The system of generators defining the polyhedron. It is not declared const because its data-structures will be recycled to build the polyhedron. |
std::invalid_argument | Thrown if the topology of gs is incompatible with topol , or if the system of generators is not empty but has no points. |
Parma_Polyhedra_Library::Polyhedron::Polyhedron | ( | Topology | topol, | |
const Box & | box | |||
) | [inline, protected] |
Builds a polyhedron out of a generic, interval-based bounding box.
topol | The topology of the polyhedron; | |
box | The bounding box representing the polyhedron to be built. |
std::invalid_argument | Thrown if box has intervals that are incompatible with topol . |
dimension_type space_dimension() const
bool is_empty() const
true
if and only if the bounding box describes the empty set. The is_empty()
method will always be called before the methods below. However, if is_empty()
returns true
, none of the functions below will be called. bool get_lower_bound(dimension_type k, bool closed, Coefficient& n, Coefficient& d) const
k
-th space dimension. If false
. Otherwise, set closed
, n
and d
as follows: closed
is set to true
if the the lower boundary of false
otherwise; n
and d
are assigned the integers bool get_upper_bound(dimension_type k, bool closed, Coefficient& n, Coefficient& d) const
k
-th space dimension. If false
. Otherwise, set closed
, n
and d
as follows: closed
is set to true
if the the upper boundary of false
otherwise; n
and d
are assigned the integers
Poly_Con_Relation Parma_Polyhedra_Library::Polyhedron::relation_with | ( | const Constraint & | c | ) | const |
Returns the relations holding between the polyhedron *this
and the constraint c
.
std::invalid_argument | Thrown if *this and constraint c are dimension-incompatible. |
Poly_Gen_Relation Parma_Polyhedra_Library::Polyhedron::relation_with | ( | const Generator & | g | ) | const |
Returns the relations holding between the polyhedron *this
and the generator g
.
std::invalid_argument | Thrown if *this and generator g are dimension-incompatible. |
bool Parma_Polyhedra_Library::Polyhedron::is_disjoint_from | ( | const Polyhedron & | y | ) | const |
Returns true
if and only if *this
and y
are disjoint.
std::invalid_argument | Thrown if x and y are topology-incompatible or dimension-incompatible. |
bool Parma_Polyhedra_Library::Polyhedron::bounds_from_above | ( | const Linear_Expression & | expr | ) | const [inline] |
Returns true
if and only if expr
is bounded from above in *this
.
std::invalid_argument | Thrown if expr and *this are dimension-incompatible. |
bool Parma_Polyhedra_Library::Polyhedron::bounds_from_below | ( | const Linear_Expression & | expr | ) | const [inline] |
Returns true
if and only if expr
is bounded from below in *this
.
std::invalid_argument | Thrown if expr and *this are dimension-incompatible. |
bool Parma_Polyhedra_Library::Polyhedron::maximize | ( | const Linear_Expression & | expr, | |
Coefficient & | sup_n, | |||
Coefficient & | sup_d, | |||
bool & | maximum | |||
) | const [inline] |
Returns true
if and only if *this
is not empty and expr
is bounded from above in *this
, in which case the supremum value is computed.
expr | The linear expression to be maximized subject to *this ; | |
sup_n | The numerator of the supremum value; | |
sup_d | The denominator of the supremum value; | |
maximum | true if and only if the supremum is also the maximum value. |
std::invalid_argument | Thrown if expr and *this are dimension-incompatible. |
*this
is empty or expr
is not bounded from above, false
is returned and sup_n
, sup_d
and maximum
are left untouched.
bool Parma_Polyhedra_Library::Polyhedron::maximize | ( | const Linear_Expression & | expr, | |
Coefficient & | sup_n, | |||
Coefficient & | sup_d, | |||
bool & | maximum, | |||
Generator & | point | |||
) | const [inline] |
Returns true
if and only if *this
is not empty and expr
is bounded from above in *this
, in which case the supremum value and a point where expr
reaches it are computed.
expr | The linear expression to be maximized subject to *this ; | |
sup_n | The numerator of the supremum value; | |
sup_d | The denominator of the supremum value; | |
maximum | true if and only if the supremum is also the maximum value; | |
point | When maximization succeeds, will be assigned the point or closure point where expr reaches its supremum value. |
std::invalid_argument | Thrown if expr and *this are dimension-incompatible. |
*this
is empty or expr
is not bounded from above, false
is returned and sup_n
, sup_d
, maximum
and point
are left untouched.
bool Parma_Polyhedra_Library::Polyhedron::minimize | ( | const Linear_Expression & | expr, | |
Coefficient & | inf_n, | |||
Coefficient & | inf_d, | |||
bool & | minimum | |||
) | const [inline] |
Returns true
if and only if *this
is not empty and expr
is bounded from below in *this
, in which case the infimum value is computed.
expr | The linear expression to be minimized subject to *this ; | |
inf_n | The numerator of the infimum value; | |
inf_d | The denominator of the infimum value; | |
minimum | true if and only if the infimum is also the minimum value. |
std::invalid_argument | Thrown if expr and *this are dimension-incompatible. |
*this
is empty or expr
is not bounded from below, false
is returned and inf_n
, inf_d
and minimum
are left untouched.
bool Parma_Polyhedra_Library::Polyhedron::minimize | ( | const Linear_Expression & | expr, | |
Coefficient & | inf_n, | |||
Coefficient & | inf_d, | |||
bool & | minimum, | |||
Generator & | point | |||
) | const [inline] |
Returns true
if and only if *this
is not empty and expr
is bounded from below in *this
, in which case the infimum value and a point where expr
reaches it are computed.
expr | The linear expression to be minimized subject to *this ; | |
inf_n | The numerator of the infimum value; | |
inf_d | The denominator of the infimum value; | |
minimum | true if and only if the infimum is also the minimum value; | |
point | When minimization succeeds, will be assigned a point or closure point where expr reaches its infimum value. |
std::invalid_argument | Thrown if expr and *this are dimension-incompatible. |
*this
is empty or expr
is not bounded from below, false
is returned and inf_n
, inf_d
, minimum
and point
are left untouched.
bool Parma_Polyhedra_Library::Polyhedron::contains | ( | const Polyhedron & | y | ) | const |
Returns true
if and only if *this
contains y
.
std::invalid_argument | Thrown if *this and y are topology-incompatible or dimension-incompatible. |
bool Parma_Polyhedra_Library::Polyhedron::strictly_contains | ( | const Polyhedron & | y | ) | const [inline] |
Returns true
if and only if *this
strictly contains y
.
std::invalid_argument | Thrown if *this and y are topology-incompatible or dimension-incompatible. |
void Parma_Polyhedra_Library::Polyhedron::shrink_bounding_box | ( | Box & | box, | |
Complexity_Class | complexity = ANY_COMPLEXITY | |||
) | const [inline] |
Uses *this
to shrink a generic, interval-based bounding box. Assigns to box
the intersection of box
with the smallest bounding box containing *this
.
box | The bounding box to be shrunk; | |
complexity | The complexity class of the algorithm to be used. |
*this
or box
is empty, then the empty box is returned.
If *this
and box
are non-empty, then, for each space dimension with variable
, let
be the upper and
the lower bound of the smallest interval containing
*this
.
If is infinite, then
box
is unaltered; if is finite, then the
box
interval for space dimension is (destructively) intersected with
if a point of
*this
satisfies and with
otherwise.
Similarly, if is infinite, then
box
is unaltered; if is finite, then the
box
interval for space dimension is (destructively) intersected with
if a point of
*this
satisfies and with
otherwise.
The template class Box must provide the following methods, whose return values, if any, are simply ignored.
set_empty()
raise_lower_bound(dimension_type k, bool closed, Coefficient_traits::const_reference n, Coefficient_traits::const_reference d)
k
-th space dimension with closed
is true
, with closed
is false
. lower_upper_bound(dimension_type k, bool closed, Coefficient_traits::const_reference n, Coefficient_traits::const_reference d)
k
-th space dimension with closed
is true
, with closed
is false
.
The function raise_lower_bound(k, closed, n, d)
will be called at most once for each possible value for k
and for all such calls the fraction will be in canonical form, that is,
and
have no common factors and
is positive,
being the unique representation for zero. The same guarantee is offered for the function
lower_upper_bound(k, closed, n, d)
.
bool Parma_Polyhedra_Library::Polyhedron::OK | ( | bool | check_not_empty = false |
) | const |
Checks if all the invariants are satisfied.
true
if and only if *this
satisfies all the invariants and either check_not_empty
is false
or *this
is not empty.check_not_empty | true if and only if, in addition to checking the invariants, *this must be checked to be not empty. |
std::cerr
in case invariants are violated. This is useful for the purpose of debugging the library.
void Parma_Polyhedra_Library::Polyhedron::add_constraint | ( | const Constraint & | c | ) |
Adds a copy of constraint c
to the system of constraints of *this
(without minimizing the result).
std::invalid_argument | Thrown if *this and constraint c are topology-incompatible or dimension-incompatible. |
bool Parma_Polyhedra_Library::Polyhedron::add_constraint_and_minimize | ( | const Constraint & | c | ) |
Adds a copy of constraint c
to the system of constraints of *this
, minimizing the result.
false
if and only if the result is empty.std::invalid_argument | Thrown if *this and constraint c are topology-incompatible or dimension-incompatible. |
void Parma_Polyhedra_Library::Polyhedron::add_generator | ( | const Generator & | g | ) |
Adds a copy of generator g
to the system of generators of *this
(without minimizing the result).
std::invalid_argument | Thrown if *this and generator g are topology-incompatible or dimension-incompatible, or if *this is an empty polyhedron and g is not a point. |
bool Parma_Polyhedra_Library::Polyhedron::add_generator_and_minimize | ( | const Generator & | g | ) |
Adds a copy of generator g
to the system of generators of *this
, minimizing the result.
false
if and only if the result is empty.std::invalid_argument | Thrown if *this and generator g are topology-incompatible or dimension-incompatible, or if *this is an empty polyhedron and g is not a point. |
void Parma_Polyhedra_Library::Polyhedron::add_congruence | ( | const Congruence & | cg | ) |
Adds a copy of congruence cg
to the system of congruences of this
(without minimizing the result).
std::invalid_argument | Thrown if *this and congruence cg are topology-incompatible or dimension-incompatible. |
void Parma_Polyhedra_Library::Polyhedron::add_constraints | ( | const Constraint_System & | cs | ) |
Adds a copy of the constraints in cs
to the system of constraints of *this
(without minimizing the result).
cs | Contains the constraints that will be added to the system of constraints of *this . |
std::invalid_argument | Thrown if *this and cs are topology-incompatible or dimension-incompatible. |
void Parma_Polyhedra_Library::Polyhedron::add_recycled_constraints | ( | Constraint_System & | cs | ) |
Adds the constraints in cs
to the system of constraints of *this
(without minimizing the result).
cs | The constraint system that will be recycled, adding its constraints to the system of constraints of *this . |
std::invalid_argument | Thrown if *this and cs are topology-incompatible or dimension-incompatible. |
cs
upon successful or exceptional return is that it can be safely destroyed. bool Parma_Polyhedra_Library::Polyhedron::add_constraints_and_minimize | ( | const Constraint_System & | cs | ) |
Adds a copy of the constraints in cs
to the system of constraints of *this
, minimizing the result.
false
if and only if the result is empty.cs | Contains the constraints that will be added to the system of constraints of *this . |
std::invalid_argument | Thrown if *this and cs are topology-incompatible or dimension-incompatible. |
bool Parma_Polyhedra_Library::Polyhedron::add_recycled_constraints_and_minimize | ( | Constraint_System & | cs | ) |
Adds the constraints in cs
to the system of constraints of *this
, minimizing the result.
false
if and only if the result is empty.cs | The constraint system that will be recycled, adding its constraints to the system of constraints of *this . |
std::invalid_argument | Thrown if *this and cs are topology-incompatible or dimension-incompatible. |
cs
upon successful or exceptional return is that it can be safely destroyed. void Parma_Polyhedra_Library::Polyhedron::add_generators | ( | const Generator_System & | gs | ) |
Adds a copy of the generators in gs
to the system of generators of *this
(without minimizing the result).
gs | Contains the generators that will be added to the system of generators of *this . |
std::invalid_argument | Thrown if *this and gs are topology-incompatible or dimension-incompatible, or if *this is empty and the system of generators gs is not empty, but has no points. |
void Parma_Polyhedra_Library::Polyhedron::add_recycled_generators | ( | Generator_System & | gs | ) |
Adds the generators in gs
to the system of generators of *this
(without minimizing the result).
gs | The generator system that will be recycled, adding its generators to the system of generators of *this . |
std::invalid_argument | Thrown if *this and gs are topology-incompatible or dimension-incompatible, or if *this is empty and the system of generators gs is not empty, but has no points. |
gs
upon successful or exceptional return is that it can be safely destroyed. bool Parma_Polyhedra_Library::Polyhedron::add_generators_and_minimize | ( | const Generator_System & | gs | ) |
Adds a copy of the generators in gs
to the system of generators of *this
, minimizing the result.
false
if and only if the result is empty.gs | Contains the generators that will be added to the system of generators of *this . |
std::invalid_argument | Thrown if *this and gs are topology-incompatible or dimension-incompatible, or if *this is empty and the the system of generators gs is not empty, but has no points. |
bool Parma_Polyhedra_Library::Polyhedron::add_recycled_generators_and_minimize | ( | Generator_System & | gs | ) |
Adds the generators in gs
to the system of generators of *this
, minimizing the result.
false
if and only if the result is empty.gs | The generator system that will be recycled, adding its generators to the system of generators of *this . |
std::invalid_argument | Thrown if *this and gs are topology-incompatible or dimension-incompatible, or if *this is empty and the the system of generators gs is not empty, but has no points. |
gs
upon successful or exceptional return is that it can be safely destroyed. void Parma_Polyhedra_Library::Polyhedron::add_congruences | ( | const Congruence_System & | cgs | ) |
Adds to *this
constraints equivalent to the congruences in cgs
(without minimizing the result).
cgs | Contains the congruences that will be added to the system of constraints of *this . |
std::invalid_argument | Thrown if *this and cgs are topology-incompatible or dimension-incompatible. |
void Parma_Polyhedra_Library::Polyhedron::intersection_assign | ( | const Polyhedron & | y | ) |
Assigns to *this
the intersection of *this
and y
. The result is not guaranteed to be minimized.
std::invalid_argument | Thrown if *this and y are topology-incompatible or dimension-incompatible. |
bool Parma_Polyhedra_Library::Polyhedron::intersection_assign_and_minimize | ( | const Polyhedron & | y | ) |
Assigns to *this
the intersection of *this
and y
, minimizing the result.
false
if and only if the result is empty.std::invalid_argument | Thrown if *this and y are topology-incompatible or dimension-incompatible. |
void Parma_Polyhedra_Library::Polyhedron::poly_hull_assign | ( | const Polyhedron & | y | ) |
Assigns to *this
the poly-hull of *this
and y
. The result is not guaranteed to be minimized.
std::invalid_argument | Thrown if *this and y are topology-incompatible or dimension-incompatible. |
bool Parma_Polyhedra_Library::Polyhedron::poly_hull_assign_and_minimize | ( | const Polyhedron & | y | ) |
Assigns to *this
the poly-hull of *this
and y
, minimizing the result.
false
if and only if the result is empty.std::invalid_argument | Thrown if *this and y are topology-incompatible or dimension-incompatible. |
void Parma_Polyhedra_Library::Polyhedron::poly_difference_assign | ( | const Polyhedron & | y | ) |
Assigns to *this
the poly-difference of *this
and y
. The result is not guaranteed to be minimized.
std::invalid_argument | Thrown if *this and y are topology-incompatible or dimension-incompatible. |
void Parma_Polyhedra_Library::Polyhedron::affine_image | ( | Variable | var, | |
const Linear_Expression & | expr, | |||
Coefficient_traits::const_reference | denominator = Coefficient_one() | |||
) |
Assigns to *this
the affine image of *this
under the function mapping variable var
to the affine expression specified by expr
and denominator
.
var | The variable to which the affine expression is assigned; | |
expr | The numerator of the affine expression; | |
denominator | The denominator of the affine expression (optional argument with default value 1.) |
std::invalid_argument | Thrown if denominator is zero or if expr and *this are dimension-incompatible or if var is not a space dimension of *this . |
void Parma_Polyhedra_Library::Polyhedron::affine_preimage | ( | Variable | var, | |
const Linear_Expression & | expr, | |||
Coefficient_traits::const_reference | denominator = Coefficient_one() | |||
) |
Assigns to *this
the affine preimage of *this
under the function mapping variable var
to the affine expression specified by expr
and denominator
.
var | The variable to which the affine expression is substituted; | |
expr | The numerator of the affine expression; | |
denominator | The denominator of the affine expression (optional argument with default value 1.) |
std::invalid_argument | Thrown if denominator is zero or if expr and *this are dimension-incompatible or if var is not a space dimension of *this . |
void Parma_Polyhedra_Library::Polyhedron::generalized_affine_image | ( | Variable | var, | |
const Relation_Symbol | relsym, | |||
const Linear_Expression & | expr, | |||
Coefficient_traits::const_reference | denominator = Coefficient_one() | |||
) |
Assigns to *this
the image of *this
with respect to the generalized affine relation , where
is the relation symbol encoded by
relsym
.
var | The left hand side variable of the generalized affine relation; | |
relsym | The relation symbol; | |
expr | The numerator of the right hand side affine expression; | |
denominator | The denominator of the right hand side affine expression (optional argument with default value 1.) |
std::invalid_argument | Thrown if denominator is zero or if expr and *this are dimension-incompatible or if var is not a space dimension of *this or if *this is a C_Polyhedron and relsym is a strict relation symbol. |
void Parma_Polyhedra_Library::Polyhedron::generalized_affine_preimage | ( | Variable | var, | |
const Relation_Symbol | relsym, | |||
const Linear_Expression & | expr, | |||
Coefficient_traits::const_reference | denominator = Coefficient_one() | |||
) |
Assigns to *this
the preimage of *this
with respect to the generalized affine relation , where
is the relation symbol encoded by
relsym
.
var | The left hand side variable of the generalized affine relation; | |
relsym | The relation symbol; | |
expr | The numerator of the right hand side affine expression; | |
denominator | The denominator of the right hand side affine expression (optional argument with default value 1.) |
std::invalid_argument | Thrown if denominator is zero or if expr and *this are dimension-incompatible or if var is not a space dimension of *this or if *this is a C_Polyhedron and relsym is a strict relation symbol. |
void Parma_Polyhedra_Library::Polyhedron::generalized_affine_image | ( | const Linear_Expression & | lhs, | |
const Relation_Symbol | relsym, | |||
const Linear_Expression & | rhs | |||
) |
Assigns to *this
the image of *this
with respect to the generalized affine relation , where
is the relation symbol encoded by
relsym
.
lhs | The left hand side affine expression; | |
relsym | The relation symbol; | |
rhs | The right hand side affine expression. |
std::invalid_argument | Thrown if *this is dimension-incompatible with lhs or rhs or if *this is a C_Polyhedron and relsym is a strict relation symbol. |
void Parma_Polyhedra_Library::Polyhedron::generalized_affine_preimage | ( | const Linear_Expression & | lhs, | |
const Relation_Symbol | relsym, | |||
const Linear_Expression & | rhs | |||
) |
Assigns to *this
the preimage of *this
with respect to the generalized affine relation , where
is the relation symbol encoded by
relsym
.
lhs | The left hand side affine expression; | |
relsym | The relation symbol; | |
rhs | The right hand side affine expression. |
std::invalid_argument | Thrown if *this is dimension-incompatible with lhs or rhs or if *this is a C_Polyhedron and relsym is a strict relation symbol. |
void Parma_Polyhedra_Library::Polyhedron::bounded_affine_image | ( | Variable | var, | |
const Linear_Expression & | lb_expr, | |||
const Linear_Expression & | ub_expr, | |||
Coefficient_traits::const_reference | denominator = Coefficient_one() | |||
) |
Assigns to *this
the image of *this
with respect to the bounded affine relation .
var | The variable updated by the affine relation; | |
lb_expr | The numerator of the lower bounding affine expression; | |
ub_expr | The numerator of the upper bounding affine expression; | |
denominator | The (common) denominator for the lower and upper bounding affine expressions (optional argument with default value 1.) |
std::invalid_argument | Thrown if denominator is zero or if lb_expr (resp., ub_expr ) and *this are dimension-incompatible or if var is not a space dimension of *this . |
void Parma_Polyhedra_Library::Polyhedron::bounded_affine_preimage | ( | Variable | var, | |
const Linear_Expression & | lb_expr, | |||
const Linear_Expression & | ub_expr, | |||
Coefficient_traits::const_reference | denominator = Coefficient_one() | |||
) |
Assigns to *this
the preimage of *this
with respect to the bounded affine relation .
var | The variable updated by the affine relation; | |
lb_expr | The numerator of the lower bounding affine expression; | |
ub_expr | The numerator of the upper bounding affine expression; | |
denominator | The (common) denominator for the lower and upper bounding affine expressions (optional argument with default value 1.) |
std::invalid_argument | Thrown if denominator is zero or if lb_expr (resp., ub_expr ) and *this are dimension-incompatible or if var is not a space dimension of *this . |
void Parma_Polyhedra_Library::Polyhedron::time_elapse_assign | ( | const Polyhedron & | y | ) |
Assigns to *this
the result of computing the time-elapse between *this
and y
.
std::invalid_argument | Thrown if *this and y are topology-incompatible or dimension-incompatible. |
void Parma_Polyhedra_Library::Polyhedron::BHRZ03_widening_assign | ( | const Polyhedron & | y, | |
unsigned * | tp = 0 | |||
) |
Assigns to *this
the result of computing the BHRZ03-widening between *this
and y
.
y | A polyhedron that must be contained in *this ; | |
tp | An optional pointer to an unsigned variable storing the number of available tokens (to be used when applying the widening with tokens delay technique). |
std::invalid_argument | Thrown if *this and y are topology-incompatible or dimension-incompatible. |
void Parma_Polyhedra_Library::Polyhedron::limited_BHRZ03_extrapolation_assign | ( | const Polyhedron & | y, | |
const Constraint_System & | cs, | |||
unsigned * | tp = 0 | |||
) |
Improves the result of the BHRZ03-widening computation by also enforcing those constraints in cs
that are satisfied by all the points of *this
.
y | A polyhedron that must be contained in *this ; | |
cs | The system of constraints used to improve the widened polyhedron; | |
tp | An optional pointer to an unsigned variable storing the number of available tokens (to be used when applying the widening with tokens delay technique). |
std::invalid_argument | Thrown if *this , y and cs are topology-incompatible or dimension-incompatible. |
void Parma_Polyhedra_Library::Polyhedron::bounded_BHRZ03_extrapolation_assign | ( | const Polyhedron & | y, | |
const Constraint_System & | cs, | |||
unsigned * | tp = 0 | |||
) |
Improves the result of the BHRZ03-widening computation by also enforcing those constraints in cs
that are satisfied by all the points of *this
, plus all the constraints of the form and
, with
, that are satisfied by all the points of
*this
.
y | A polyhedron that must be contained in *this ; | |
cs | The system of constraints used to improve the widened polyhedron; | |
tp | An optional pointer to an unsigned variable storing the number of available tokens (to be used when applying the widening with tokens delay technique). |
std::invalid_argument | Thrown if *this , y and cs are topology-incompatible or dimension-incompatible. |
void Parma_Polyhedra_Library::Polyhedron::H79_widening_assign | ( | const Polyhedron & | y, | |
unsigned * | tp = 0 | |||
) |
Assigns to *this
the result of computing the H79-widening between *this
and y
.
y | A polyhedron that must be contained in *this ; | |
tp | An optional pointer to an unsigned variable storing the number of available tokens (to be used when applying the widening with tokens delay technique). |
std::invalid_argument | Thrown if *this and y are topology-incompatible or dimension-incompatible. |
void Parma_Polyhedra_Library::Polyhedron::limited_H79_extrapolation_assign | ( | const Polyhedron & | y, | |
const Constraint_System & | cs, | |||
unsigned * | tp = 0 | |||
) |
Improves the result of the H79-widening computation by also enforcing those constraints in cs
that are satisfied by all the points of *this
.
y | A polyhedron that must be contained in *this ; | |
cs | The system of constraints used to improve the widened polyhedron; | |
tp | An optional pointer to an unsigned variable storing the number of available tokens (to be used when applying the widening with tokens delay technique). |
std::invalid_argument | Thrown if *this , y and cs are topology-incompatible or dimension-incompatible. |
void Parma_Polyhedra_Library::Polyhedron::bounded_H79_extrapolation_assign | ( | const Polyhedron & | y, | |
const Constraint_System & | cs, | |||
unsigned * | tp = 0 | |||
) |
Improves the result of the H79-widening computation by also enforcing those constraints in cs
that are satisfied by all the points of *this
, plus all the constraints of the form and
, with
, that are satisfied by all the points of
*this
.
y | A polyhedron that must be contained in *this ; | |
cs | The system of constraints used to improve the widened polyhedron; | |
tp | An optional pointer to an unsigned variable storing the number of available tokens (to be used when applying the widening with tokens delay technique). |
std::invalid_argument | Thrown if *this , y and cs are topology-incompatible or dimension-incompatible. |
void Parma_Polyhedra_Library::Polyhedron::add_space_dimensions_and_embed | ( | dimension_type | m | ) |
Adds m
new space dimensions and embeds the old polyhedron in the new vector space.
m | The number of dimensions to add. |
std::length_error | Thrown if adding m new space dimensions would cause the vector space to exceed dimension max_space_dimension() . |
void Parma_Polyhedra_Library::Polyhedron::add_space_dimensions_and_project | ( | dimension_type | m | ) |
Adds m
new space dimensions to the polyhedron and does not embed it in the new vector space.
m | The number of space dimensions to add. |
std::length_error | Thrown if adding m new space dimensions would cause the vector space to exceed dimension max_space_dimension() . |
void Parma_Polyhedra_Library::Polyhedron::concatenate_assign | ( | const Polyhedron & | y | ) |
Assigns to *this
the concatenation of *this
and y
, taken in this order.
std::invalid_argument | Thrown if *this and y are topology-incompatible. | |
std::length_error | Thrown if the concatenation would cause the vector space to exceed dimension max_space_dimension() . |
void Parma_Polyhedra_Library::Polyhedron::remove_space_dimensions | ( | const Variables_Set & | to_be_removed | ) |
Removes all the specified dimensions from the vector space.
to_be_removed | The set of Variable objects corresponding to the space dimensions to be removed. |
std::invalid_argument | Thrown if *this is dimension-incompatible with one of the Variable objects contained in to_be_removed . |
void Parma_Polyhedra_Library::Polyhedron::remove_higher_space_dimensions | ( | dimension_type | new_dimension | ) |
Removes the higher dimensions of the vector space so that the resulting space will have dimension new_dimension
.
std::invalid_argument | Thrown if new_dimensions is greater than the space dimension of *this . |
void Parma_Polyhedra_Library::Polyhedron::map_space_dimensions | ( | const Partial_Function & | pfunc | ) | [inline] |
Remaps the dimensions of the vector space according to a partial function.
pfunc | The partial function specifying the destiny of each space dimension. |
bool has_empty_codomain() const
true
if and only if the represented partial function has an empty codomain (i.e., it is always undefined). The has_empty_codomain()
method will always be called before the methods below. However, if has_empty_codomain()
returns true
, none of the functions below will be called. dimension_type max_in_codomain() const
max_in_codomain()
method is called at most once. bool maps(dimension_type i, dimension_type& j) const
i
. If j
and true
is returned. If false
is returned. This method is called at most
The result is undefined if pfunc
does not encode a partial function with the properties described in the specification of the mapping operator.
void Parma_Polyhedra_Library::Polyhedron::expand_space_dimension | ( | Variable | var, | |
dimension_type | m | |||
) |
Creates m
copies of the space dimension corresponding to var
.
var | The variable corresponding to the space dimension to be replicated; | |
m | The number of replicas to be created. |
std::invalid_argument | Thrown if var does not correspond to a dimension of the vector space. | |
std::length_error | Thrown if adding m new space dimensions would cause the vector space to exceed dimension max_space_dimension() . |
*this
has space dimension var
has space dimension m
new space dimensions void Parma_Polyhedra_Library::Polyhedron::fold_space_dimensions | ( | const Variables_Set & | to_be_folded, | |
Variable | var | |||
) |
Folds the space dimensions in to_be_folded
into var
.
to_be_folded | The set of Variable objects corresponding to the space dimensions to be folded; | |
var | The variable corresponding to the space dimension that is the destination of the folding operation. |
std::invalid_argument | Thrown if *this is dimension-incompatible with var or with one of the Variable objects contained in to_be_folded . Also thrown if var is contained in to_be_folded . |
*this
has space dimension var
has space dimension to_be_folded
is a set of variables whose maximum space dimension is also less than or equal to var
is not a member of to_be_folded
, then the space dimensions corresponding to variables in to_be_folded
are folded into the void Parma_Polyhedra_Library::Polyhedron::swap | ( | Polyhedron & | y | ) | [inline] |
Swaps *this
with polyhedron y
. (*this
and y
can be dimension-incompatible.).
std::invalid_argument | Thrown if x and y are topology-incompatible. |
std::ostream & operator<< | ( | std::ostream & | s, | |
const Polyhedron & | ph | |||
) | [related] |
Output operator.
Writes a textual representation of ph
on s:
false
is written if ph
is an empty polyhedron; true
is written if ph
is a universe polyhedron; a minimized system of constraints defining ph
is written otherwise, all constraints in one row separated by ", ".
bool operator!= | ( | const Polyhedron & | x, | |
const Polyhedron & | y | |||
) | [related] |
Returns true
if and only if x
and y
are different polyhedra.
Note that x
and y
may be topology- and/or dimension-incompatible polyhedra: in those cases, the value true
is returned.
void swap | ( | Parma_Polyhedra_Library::Polyhedron & | x, | |
Parma_Polyhedra_Library::Polyhedron & | y | |||
) | [related] |
Specializes std::swap
.