PPL
1.2
|
The partially reduced product of two abstractions. More...
#include <ppl.hh>
Public Member Functions | |
Partially_Reduced_Product (dimension_type num_dimensions=0, Degenerate_Element kind=UNIVERSE) | |
Builds an object having the specified properties. More... | |
Partially_Reduced_Product (const Congruence_System &cgs) | |
Builds a pair, copying a system of congruences. More... | |
Partially_Reduced_Product (Congruence_System &cgs) | |
Builds a pair, recycling a system of congruences. More... | |
Partially_Reduced_Product (const Constraint_System &cs) | |
Builds a pair, copying a system of constraints. More... | |
Partially_Reduced_Product (Constraint_System &cs) | |
Builds a pair, recycling a system of constraints. More... | |
Partially_Reduced_Product (const C_Polyhedron &ph, Complexity_Class complexity=ANY_COMPLEXITY) | |
Builds a product, from a C polyhedron. More... | |
Partially_Reduced_Product (const NNC_Polyhedron &ph, Complexity_Class complexity=ANY_COMPLEXITY) | |
Builds a product, from an NNC polyhedron. More... | |
Partially_Reduced_Product (const Grid &gr, Complexity_Class complexity=ANY_COMPLEXITY) | |
Builds a product, from a grid. More... | |
template<typename Interval > | |
Partially_Reduced_Product (const Box< Interval > &box, Complexity_Class complexity=ANY_COMPLEXITY) | |
Builds a product out of a box. More... | |
template<typename U > | |
Partially_Reduced_Product (const BD_Shape< U > &bd, Complexity_Class complexity=ANY_COMPLEXITY) | |
Builds a product out of a BD shape. More... | |
template<typename U > | |
Partially_Reduced_Product (const Octagonal_Shape< U > &os, Complexity_Class complexity=ANY_COMPLEXITY) | |
Builds a product out of an octagonal shape. More... | |
Partially_Reduced_Product (const Partially_Reduced_Product &y, Complexity_Class complexity=ANY_COMPLEXITY) | |
Ordinary copy constructor. | |
template<typename E1 , typename E2 , typename S > | |
Partially_Reduced_Product (const Partially_Reduced_Product< E1, E2, S > &y, Complexity_Class complexity=ANY_COMPLEXITY) | |
Builds a conservative, upward approximation of y . More... | |
Partially_Reduced_Product & | operator= (const Partially_Reduced_Product &y) |
The assignment operator. (*this and y can be dimension-incompatible.) | |
bool | reduce () const |
Reduce. | |
Member Functions that Do Not Modify the Partially_Reduced_Product | |
dimension_type | space_dimension () const |
Returns the dimension of the vector space enclosing *this . | |
dimension_type | affine_dimension () const |
Returns the minimum affine dimension (see also grid affine dimension) of the components of *this . | |
const D1 & | domain1 () const |
Returns a constant reference to the first of the pair. | |
const D2 & | domain2 () const |
Returns a constant reference to the second of the pair. | |
Constraint_System | constraints () const |
Returns a system of constraints which approximates *this . | |
Constraint_System | minimized_constraints () const |
Returns a system of constraints which approximates *this , in reduced form. | |
Congruence_System | congruences () const |
Returns a system of congruences which approximates *this . | |
Congruence_System | minimized_congruences () const |
Returns a system of congruences which approximates *this , in reduced form. | |
Poly_Con_Relation | relation_with (const Constraint &c) const |
Returns the relations holding between *this and c . | |
Poly_Con_Relation | relation_with (const Congruence &cg) const |
Returns the relations holding between *this and cg . | |
Poly_Gen_Relation | relation_with (const Generator &g) const |
Returns the relations holding between *this and g . | |
bool | is_empty () const |
Returns true if and only if either of the components of *this are empty. | |
bool | is_universe () const |
Returns true if and only if both of the components of *this are the universe. | |
bool | is_topologically_closed () const |
Returns true if and only if both of the components of *this are topologically closed subsets of the vector space. | |
bool | is_disjoint_from (const Partially_Reduced_Product &y) const |
Returns true if and only if *this and y are componentwise disjoint. More... | |
bool | is_discrete () const |
Returns true if and only if a component of *this is discrete. | |
bool | is_bounded () const |
Returns true if and only if a component of *this is bounded. | |
bool | constrains (Variable var) const |
Returns true if and only if var is constrained in *this . More... | |
bool | bounds_from_above (const Linear_Expression &expr) const |
Returns true if and only if expr is bounded in *this . More... | |
bool | bounds_from_below (const Linear_Expression &expr) const |
Returns true if and only if expr is bounded in *this . More... | |
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. More... | |
bool | maximize (const Linear_Expression &expr, Coefficient &sup_n, Coefficient &sup_d, bool &maximum, Generator &g) 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. More... | |
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 i *this , in which case the infimum value is computed. More... | |
bool | minimize (const Linear_Expression &expr, Coefficient &inf_n, Coefficient &inf_d, bool &minimum, Generator &g) 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. More... | |
bool | contains (const Partially_Reduced_Product &y) const |
Returns true if and only if each component of *this contains the corresponding component of y . More... | |
bool | strictly_contains (const Partially_Reduced_Product &y) const |
Returns true if and only if each component of *this strictly contains the corresponding component of y . More... | |
bool | OK () const |
Checks if all the invariants are satisfied. | |
Space Dimension Preserving Member Functions that May Modify the Partially_Reduced_Product | |
void | add_constraint (const Constraint &c) |
Adds constraint c to *this . More... | |
void | refine_with_constraint (const Constraint &c) |
Use the constraint c to refine *this . More... | |
void | add_congruence (const Congruence &cg) |
Adds a copy of congruence cg to *this . More... | |
void | refine_with_congruence (const Congruence &cg) |
Use the congruence cg to refine *this . More... | |
void | add_congruences (const Congruence_System &cgs) |
Adds a copy of the congruences in cgs to *this . More... | |
void | refine_with_congruences (const Congruence_System &cgs) |
Use the congruences in cgs to refine *this . More... | |
void | add_recycled_congruences (Congruence_System &cgs) |
Adds the congruences in cgs to *this. More... | |
void | add_constraints (const Constraint_System &cs) |
Adds a copy of the constraint system in cs to *this . More... | |
void | refine_with_constraints (const Constraint_System &cs) |
Use the constraints in cs to refine *this . More... | |
void | add_recycled_constraints (Constraint_System &cs) |
Adds the constraint system in cs to *this . More... | |
void | unconstrain (Variable var) |
Computes the cylindrification of *this with respect to space dimension var , assigning the result to *this . More... | |
void | unconstrain (const Variables_Set &vars) |
Computes the cylindrification of *this with respect to the set of space dimensions vars , assigning the result to *this . More... | |
void | intersection_assign (const Partially_Reduced_Product &y) |
Assigns to *this the componentwise intersection of *this and y . More... | |
void | upper_bound_assign (const Partially_Reduced_Product &y) |
Assigns to *this an upper bound of *this and y computed on the corresponding components. More... | |
bool | upper_bound_assign_if_exact (const Partially_Reduced_Product &y) |
Assigns to *this an upper bound of *this and y computed on the corresponding components. If it is exact on each of the components of *this , true is returned, otherwise false is returned. More... | |
void | difference_assign (const Partially_Reduced_Product &y) |
Assigns to *this an approximation of the set-theoretic difference of *this and y . More... | |
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 . More... | |
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 . More... | |
void | generalized_affine_image (Variable var, 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 (see also generalized affine relation.) More... | |
void | generalized_affine_preimage (Variable var, 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 . (see also generalized affine relation.) More... | |
void | generalized_affine_image (const Linear_Expression &lhs, Relation_Symbol relsym, const Linear_Expression &rhs) |
Assigns to *this the image of *this with respect to the generalized affine relation ![]() ![]() relsym . (see also generalized affine relation.) More... | |
void | generalized_affine_preimage (const Linear_Expression &lhs, Relation_Symbol relsym, const Linear_Expression &rhs) |
Assigns to *this the preimage of *this with respect to the generalized affine relation ![]() ![]() relsym . (see also generalized affine relation.) More... | |
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 Partially_Reduced_Product &y) |
Assigns to *this the result of computing the time-elapse between *this and y . (See also time-elapse.) More... | |
void | topological_closure_assign () |
Assigns to *this its topological closure. | |
void | widening_assign (const Partially_Reduced_Product &y, unsigned *tp=NULL) |
Assigns to *this the result of computing the "widening" between *this and y . More... | |
void | drop_some_non_integer_points (Complexity_Class complexity=ANY_COMPLEXITY) |
Possibly tightens *this by dropping some points with non-integer coordinates. More... | |
void | drop_some_non_integer_points (const Variables_Set &vars, Complexity_Class complexity=ANY_COMPLEXITY) |
Possibly tightens *this by dropping some points with non-integer coordinates for the space dimensions corresponding to vars . More... | |
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 components of *this in the new vector space. More... | |
void | add_space_dimensions_and_project (dimension_type m) |
Adds m new space dimensions and does not embed the components in the new vector space. More... | |
void | concatenate_assign (const Partially_Reduced_Product &y) |
Assigns to the first (resp., second) component of *this the "concatenation" of the first (resp., second) components of *this and y , taken in this order. See also Concatenating Polyhedra. More... | |
void | remove_space_dimensions (const Variables_Set &vars) |
Removes all the specified dimensions from the vector space. More... | |
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 . More... | |
template<typename Partial_Function > | |
void | map_space_dimensions (const Partial_Function &pfunc) |
Remaps the dimensions of the vector space according to a partial function. More... | |
void | expand_space_dimension (Variable var, dimension_type m) |
Creates m copies of the space dimension corresponding to var . More... | |
void | fold_space_dimensions (const Variables_Set &vars, Variable dest) |
Folds the space dimensions in vars into dest . More... | |
Miscellaneous Member Functions | |
~Partially_Reduced_Product () | |
Destructor. | |
void | m_swap (Partially_Reduced_Product &y) |
Swaps *this with product y . (*this and y can be dimension-incompatible.) | |
void | ascii_dump () const |
Writes to std::cerr an ASCII representation of *this . | |
void | ascii_dump (std::ostream &s) const |
Writes to s an ASCII representation of *this . | |
void | print () const |
Prints *this to std::cerr using operator<< . | |
bool | ascii_load (std::istream &s) |
Loads from s an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this accordingly. Returns true if successful, false otherwise. | |
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 . | |
int32_t | hash_code () const |
Returns a 32-bit hash code for *this . More... | |
Static Public Member Functions | |
static dimension_type | max_space_dimension () |
Returns the maximum space dimension this product can handle. | |
Protected Types | |
typedef D1 | Domain1 |
The type of the first component. | |
typedef D2 | Domain2 |
The type of the second component. | |
Protected Member Functions | |
void | clear_reduced_flag () const |
Clears the reduced flag. | |
void | set_reduced_flag () const |
Sets the reduced flag. | |
bool | is_reduced () const |
Return true if and only if the reduced flag is set. | |
Protected Attributes | |
D1 | d1 |
The first component. | |
D2 | d2 |
The second component. | |
bool | reduced |
Flag to record whether the components are reduced with respect to each other and the reduction class. | |
Related Functions | |
(Note that these are not member functions.) | |
template<typename D1 , typename D2 , typename R > | |
std::ostream & | operator<< (std::ostream &s, const Partially_Reduced_Product< D1, D2, R > &dp) |
Output operator. More... | |
template<typename D1 , typename D2 , typename R > | |
void | swap (Partially_Reduced_Product< D1, D2, R > &x, Partially_Reduced_Product< D1, D2, R > &y) |
Swaps x with y . More... | |
template<typename D1 , typename D2 , typename R > | |
bool | operator== (const Partially_Reduced_Product< D1, D2, R > &x, const Partially_Reduced_Product< D1, D2, R > &y) |
Returns true if and only if the components of x and y are pairwise equal. More... | |
template<typename D1 , typename D2 , typename R > | |
bool | operator!= (const Partially_Reduced_Product< D1, D2, R > &x, const Partially_Reduced_Product< D1, D2, R > &y) |
Returns true if and only if the components of x and y are not pairwise equal. More... | |
template<typename D1 , typename D2 , typename R > | |
bool | operator== (const Partially_Reduced_Product< D1, D2, R > &x, const Partially_Reduced_Product< D1, D2, R > &y) |
template<typename D1 , typename D2 , typename R > | |
bool | operator!= (const Partially_Reduced_Product< D1, D2, R > &x, const Partially_Reduced_Product< D1, D2, R > &y) |
template<typename D1 , typename D2 , typename R > | |
std::ostream & | operator<< (std::ostream &s, const Partially_Reduced_Product< D1, D2, R > &dp) |
template<typename D1 , typename D2 , typename R > | |
void | swap (Partially_Reduced_Product< D1, D2, R > &x, Partially_Reduced_Product< D1, D2, R > &y) |
The partially reduced product of two abstractions.
D1
and D2
are the simple pointset domains: C_Polyhedron
, NNC_Polyhedron
, Grid
, Octagonal_Shape<T>
, BD_Shape<T>
, Box<T>
.An object of the class Partially_Reduced_Product<D1, D2, R>
represents the (partially reduced) product of two pointset domains D1
and D2
where the form of any reduction is defined by the reduction class R
.
Suppose and
are two abstract domains with concretization functions:
and
, respectively.
The partially reduced product , for any reduction class
R
, has a concretization where, if
The operations are defined to be the result of applying the corresponding operations on each of the components provided the product is already reduced by the reduction method defined by R
. In particular, if R
is the No_Reduction<D1, D2>
class, then the class Partially_Reduced_Product<D1, D2, R>
domain is the direct product as defined in [CC79].
How the results on the components are interpreted and combined depend on the specific test. For example, the test for emptiness will first make sure the product is reduced (using the reduction method provided by R
if it is not already known to be reduced) and then test if either component is empty; thus, if R
defines no reduction between its components and is a direct product in one dimension where
denotes the set of numbers that are integral multiples of 3 while
denotes the set of numbers between 1 and 2, then an operation that tests for emptiness should return false. However, the test for the universe returns true if and only if the test
is_universe()
on both components returns true.
R
is the No_Reduction<D1, D2>
class and that variables x
and y
are defined (where they are used) as follows:
|
inlineexplicit |
Builds an object having the specified properties.
num_dimensions | The number of dimensions of the vector space enclosing the pair; |
kind | Specifies whether a universe or an empty pair has to be built. |
std::length_error | Thrown if num_dimensions exceeds the maximum allowed space dimension. |
|
inlineexplicit |
Builds a pair, copying a system of congruences.
The pair inherits the space dimension of the congruence system.
cgs | The system of congruences to be approximated by the pair. |
std::length_error | Thrown if num_dimensions exceeds the maximum allowed space dimension. |
|
inlineexplicit |
Builds a pair, recycling a system of congruences.
The pair inherits the space dimension of the congruence system.
cgs | The system of congruences to be approximates by the pair. Its data-structures may be recycled to build the pair. |
std::length_error | Thrown if num_dimensions exceeds the maximum allowed space dimension. |
|
inlineexplicit |
Builds a pair, copying a system of constraints.
The pair inherits the space dimension of the constraint system.
cs | The system of constraints to be approximated by the pair. |
std::length_error | Thrown if num_dimensions exceeds the maximum allowed space dimension. |
|
inlineexplicit |
Builds a pair, recycling a system of constraints.
The pair inherits the space dimension of the constraint system.
cs | The system of constraints to be approximated by the pair. |
std::length_error | Thrown if the space dimension of cs exceeds the maximum allowed space dimension. |
|
inlineexplicit |
Builds a product, from a C polyhedron.
Builds a product containing ph
using algorithms whose complexity does not exceed the one specified by complexity
. If complexity
is ANY_COMPLEXITY
, then the built product is the smallest one containing ph
. The product inherits the space dimension of the polyhedron.
ph | The polyhedron to be approximated by the product. |
complexity | The complexity that will not be exceeded. |
std::length_error | Thrown if the space dimension of ph exceeds the maximum allowed space dimension. |
|
inlineexplicit |
Builds a product, from an NNC polyhedron.
Builds a product containing ph
using algorithms whose complexity does not exceed the one specified by complexity
. If complexity
is ANY_COMPLEXITY
, then the built product is the smallest one containing ph
. The product inherits the space dimension of the polyhedron.
ph | The polyhedron to be approximated by the product. |
complexity | The complexity that will not be exceeded. |
std::length_error | Thrown if the space dimension of ph exceeds the maximum allowed space dimension. |
|
inlineexplicit |
Builds a product, from a grid.
Builds a product containing gr
. The product inherits the space dimension of the grid.
gr | The grid to be approximated by the product. |
complexity | The complexity is ignored. |
std::length_error | Thrown if the space dimension of gr exceeds the maximum allowed space dimension. |
|
inline |
Builds a product out of a box.
Builds a product containing box
. The product inherits the space dimension of the box.
box | The box representing the pair to be built. |
complexity | The complexity is ignored. |
std::length_error | Thrown if the space dimension of box exceeds the maximum allowed space dimension. |
|
inline |
Builds a product out of a BD shape.
Builds a product containing bd
. The product inherits the space dimension of the BD shape.
bd | The BD shape representing the product to be built. |
complexity | The complexity is ignored. |
std::length_error | Thrown if the space dimension of bd exceeds the maximum allowed space dimension. |
|
inline |
Builds a product out of an octagonal shape.
Builds a product containing os
. The product inherits the space dimension of the octagonal shape.
os | The octagonal shape representing the product to be built. |
complexity | The complexity is ignored. |
std::length_error | Thrown if the space dimension of os exceeds the maximum allowed space dimension. |
|
inlineexplicit |
Builds a conservative, upward approximation of y
.
The complexity argument is ignored.
|
inline |
Returns true
if and only if *this
and y
are componentwise disjoint.
std::invalid_argument | Thrown if x and y are dimension-incompatible. |
|
inline |
Returns true
if and only if var
is constrained in *this
.
std::invalid_argument | Thrown if var is not a space dimension of *this . |
|
inline |
Returns true
if and only if expr
is bounded in *this
.
This method is the same as bounds_from_below.
std::invalid_argument | Thrown if expr and *this are dimension-incompatible. |
|
inline |
Returns true
if and only if expr
is bounded in *this
.
This method is the same as bounds_from_above.
std::invalid_argument | Thrown if expr and *this are dimension-incompatible. |
bool Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::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.
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 the supremum value can be reached in this . |
std::invalid_argument | Thrown if expr and *this are dimension-incompatible. |
If *this
is empty or expr
is not bounded by *this
, false
is returned and sup_n
, sup_d
and maximum
are left untouched.
bool Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::maximize | ( | const Linear_Expression & | expr, |
Coefficient & | sup_n, | ||
Coefficient & | sup_d, | ||
bool & | maximum, | ||
Generator & | g | ||
) | 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.
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 the supremum value can be reached in this . |
g | 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. |
If *this
is empty or expr
is not bounded by *this
, false
is returned and sup_n
, sup_d
, maximum
and g
are left untouched.
bool Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::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 i *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 the infimum value can be reached in this . |
std::invalid_argument | Thrown if expr and *this are dimension-incompatible. |
If *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::Partially_Reduced_Product< D1, D2, R >::minimize | ( | const Linear_Expression & | expr, |
Coefficient & | inf_n, | ||
Coefficient & | inf_d, | ||
bool & | minimum, | ||
Generator & | g | ||
) | 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.
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 the infimum value can be reached in this . |
g | When minimization succeeds, will be assigned the point or closure point where expr reaches its infimum value. |
std::invalid_argument | Thrown if expr and *this are dimension-incompatible. |
If *this
is empty or expr
is not bounded from below, false
is returned and inf_n
, inf_d
, minimum
and point
are left untouched.
|
inline |
Returns true
if and only if each component of *this
contains the corresponding component of y
.
std::invalid_argument | Thrown if *this and y are dimension-incompatible. |
|
inline |
Returns true
if and only if each component of *this
strictly contains the corresponding component of y
.
std::invalid_argument | Thrown if *this and y are dimension-incompatible. |
|
inline |
Adds constraint c
to *this
.
std::invalid_argument | Thrown if *this and c are dimension-incompatible. |
|
inline |
Use the constraint c
to refine *this
.
c | The constraint to be used for refinement. |
std::invalid_argument | Thrown if *this and c are dimension-incompatible. |
|
inline |
Adds a copy of congruence cg
to *this
.
std::invalid_argument | Thrown if *this and congruence cg are dimension-incompatible. |
|
inline |
Use the congruence cg
to refine *this
.
cg | The congruence to be used for refinement. |
std::invalid_argument | Thrown if *this and cg are dimension-incompatible. |
|
inline |
Adds a copy of the congruences in cgs
to *this
.
cgs | The congruence system to be added. |
std::invalid_argument | Thrown if *this and cgs are dimension-incompatible. |
|
inline |
Use the congruences in cgs
to refine *this
.
cgs | The congruences to be used for refinement. |
std::invalid_argument | Thrown if *this and cgs are dimension-incompatible. |
void Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::add_recycled_congruences | ( | Congruence_System & | cgs | ) |
Adds the congruences in cgs
to *this.
cgs | The congruence system to be added that may be recycled. |
std::invalid_argument | Thrown if *this and cs are dimension-incompatible. |
cgs
upon successful or exceptional return is that it can be safely destroyed.
|
inline |
Adds a copy of the constraint system in cs
to *this
.
cs | The constraint system to be added. |
std::invalid_argument | Thrown if *this and cs are dimension-incompatible. |
|
inline |
Use the constraints in cs
to refine *this
.
cs | The constraints to be used for refinement. |
std::invalid_argument | Thrown if *this and cs are dimension-incompatible. |
void Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::add_recycled_constraints | ( | Constraint_System & | cs | ) |
Adds the constraint system in cs
to *this
.
cs | The constraint system to be added that may be recycled. |
std::invalid_argument | Thrown if *this and cs are dimension-incompatible. |
cs
upon successful or exceptional return is that it can be safely destroyed.
|
inline |
Computes the cylindrification of *this
with respect to space dimension var
, assigning the result to *this
.
var | The space dimension that will be unconstrained. |
std::invalid_argument | Thrown if var is not a space dimension of *this . |
|
inline |
Computes the cylindrification of *this
with respect to the set of space dimensions vars
, assigning the result to *this
.
vars | The set of space dimension that will be unconstrained. |
std::invalid_argument | Thrown if *this is dimension-incompatible with one of the Variable objects contained in vars . |
|
inline |
Assigns to *this
the componentwise intersection of *this
and y
.
std::invalid_argument | Thrown if *this and y are dimension-incompatible. |
|
inline |
Assigns to *this
an upper bound of *this
and y
computed on the corresponding components.
std::invalid_argument | Thrown if *this and y are dimension-incompatible. |
|
inline |
Assigns to *this
an upper bound of *this
and y
computed on the corresponding components. If it is exact on each of the components of *this
, true
is returned, otherwise false
is returned.
std::invalid_argument | Thrown if *this and y are dimension-incompatible. |
|
inline |
Assigns to *this
an approximation of the set-theoretic difference of *this
and y
.
std::invalid_argument | Thrown if *this and y are dimension-incompatible. |
|
inline |
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 . |
|
inline |
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 . |
|
inline |
Assigns to *this
the image of *this
with respect to the generalized affine relation , where
is the relation symbol encoded by
relsym
(see also generalized affine relation.)
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. |
|
inline |
Assigns to *this
the preimage of *this
with respect to the generalized affine relation , where
is the relation symbol encoded by
relsym
. (see also generalized affine relation.)
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. |
|
inline |
Assigns to *this
the image of *this
with respect to the generalized affine relation , where
is the relation symbol encoded by
relsym
. (see also generalized affine relation.)
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. |
|
inline |
Assigns to *this
the preimage of *this
with respect to the generalized affine relation , where
is the relation symbol encoded by
relsym
. (see also generalized affine relation.)
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. |
|
inline |
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 . |
|
inline |
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 . |
|
inline |
Assigns to *this
the result of computing the time-elapse between *this
and y
. (See also time-elapse.)
std::invalid_argument | Thrown if *this and y are dimension-incompatible. |
|
inline |
Assigns to *this
the result of computing the "widening" between *this
and y
.
This widening uses either the congruence or generator systems depending on which of the systems describing x and y are up to date and minimized.
y | A product 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 dimension-incompatible. |
|
inline |
Possibly tightens *this
by dropping some points with non-integer coordinates.
complexity | The maximal complexity of any algorithms used. |
complexity
is ANY_COMPLEXITY
.
|
inline |
Possibly tightens *this
by dropping some points with non-integer coordinates for the space dimensions corresponding to vars
.
vars | Points with non-integer coordinates for these variables/space-dimensions can be discarded. |
complexity | The maximal complexity of any algorithms used. |
complexity
is ANY_COMPLEXITY
.
|
inline |
Adds m
new space dimensions and embeds the components of *this
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() . |
|
inline |
Adds m
new space dimensions and does not embed the components 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() . |
|
inline |
Assigns to the first (resp., second) component of *this
the "concatenation" of the first (resp., second) components of *this
and y
, taken in this order. See also Concatenating Polyhedra.
std::length_error | Thrown if the concatenation would cause the vector space to exceed dimension max_space_dimension() . |
|
inline |
|
inline |
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 . |
|
inline |
Remaps the dimensions of the vector space according to a partial function.
If pfunc
maps only some of the dimensions of *this
then the rest will be projected away.
If the highest dimension mapped to by pfunc
is higher than the highest dimension in *this
then the number of dimensions in this
will be increased to the highest dimension mapped to by pfunc
.
pfunc | The partial function specifying the destiny of each space dimension. |
The template class Partial_Function
must provide the following methods.
returns 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.
returns the maximum value that belongs to the codomain of the partial function. The max_in_codomain()
method is called at most once.
Let be the represented function and
be the value of
i
. If is defined in
, then
is assigned to
j
and true
is returned. If is undefined in
, then
false
is returned. This method is called at most times, where
is the dimension of the vector space enclosing
*this
.
The result is undefined if pfunc
does not encode a partial function with the properties described in specification of the mapping operator.
|
inline |
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() . |
If *this
has space dimension , with
, and
var
has space dimension , then the
-th space dimension is expanded to
m
new space dimensions ,
,
,
.
|
inline |
Folds the space dimensions in vars
into dest
.
vars | The set of Variable objects corresponding to the space dimensions to be folded; |
dest | 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 dest or with one of the Variable objects contained in vars . Also thrown if dest is contained in vars . |
If *this
has space dimension , with
,
dest
has space dimension ,
vars
is a set of variables whose maximum space dimension is also less than or equal to , and
dest
is not a member of vars
, then the space dimensions corresponding to variables in vars
are folded into the -th space dimension.
|
inline |
Returns a 32-bit hash code for *this
.
If x
and y
are such that x == y
, then x.hash_code() == y.hash_code()
.
|
related |
Output operator.
Writes a textual representation of dp
on s
.
|
related |
Swaps x
with y
.
|
related |
Returns true
if and only if the components of x
and y
are pairwise equal.
Note that x
and y
may be dimension-incompatible: in those cases, the value false
is returned.
|
related |
Returns true
if and only if the components of x
and y
are not pairwise equal.
Note that x
and y
may be dimension-incompatible: in those cases, the value true
is returned.
|
related |
|
related |
|
related |
|
related |