# Parma_Polyhedra_Library::Pointset_Powerset< PS > Class Template Reference
[C++ Language Interface]

The powerset construction instantiated on PPL pointset domains. More...

`#include <ppl.hh>`

Inherits Powerset< Parma_Polyhedra_Library::Determinate< PS > >.

List of all members.

## Public Member Functions
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.
Constructors
| Pointset_Powerset (dimension_type num_dimensions=0, Degenerate_Element kind=UNIVERSE)
| Builds a universe (top) or empty (bottom) Pointset_Powerset.
| Pointset_Powerset (const Pointset_Powerset &y, Complexity_Class complexity=ANY_COMPLEXITY)
| Ordinary copy-constructor.
template<typename QH >
| Pointset_Powerset (const Pointset_Powerset< QH > &y, Complexity_Class complexity=ANY_COMPLEXITY)
| Conversion constructor: the type `QH` of the disjuncts in the source powerset is different from `PS`.
template<typename QH1 , typename QH2 , typename R >
| Pointset_Powerset (const Partially_Reduced_Product< QH1, QH2, R > &prp, Complexity_Class complexity=ANY_COMPLEXITY)
| Creates a Pointset_Powerset from a product This will be created as a single disjunct of type PS that approximates the product.
| Pointset_Powerset (const Constraint_System &cs)
| Creates a Pointset_Powerset with a single disjunct approximating the system of constraints `cs`.
| Pointset_Powerset (const Congruence_System &cgs)
| Creates a Pointset_Powerset with a single disjunct approximating the system of congruences `cgs`.
| Pointset_Powerset (const C_Polyhedron &ph, Complexity_Class complexity=ANY_COMPLEXITY)
| Builds a pointset_powerset out of a closed polyhedron.
| Pointset_Powerset (const NNC_Polyhedron &ph, Complexity_Class complexity=ANY_COMPLEXITY)
| Builds a pointset_powerset out of an nnc polyhedron.
| Pointset_Powerset (const Grid &gr, Complexity_Class complexity=ANY_COMPLEXITY)
| Builds a pointset_powerset out of a grid.
template<typename T >
| Pointset_Powerset (const Octagonal_Shape< T > &os, Complexity_Class complexity=ANY_COMPLEXITY)
| Builds a pointset_powerset out of an octagonal shape.
template<typename T >
| Pointset_Powerset (const BD_Shape< T > &bds, Complexity_Class complexity=ANY_COMPLEXITY)
| Builds a pointset_powerset out of a bd shape.
template<typename Interval >
| Pointset_Powerset (const Box< Interval > &box, Complexity_Class complexity=ANY_COMPLEXITY)
| Builds a pointset_powerset out of a box.
Member Functions that Do Not Modify the Pointset_Powerset
dimension_type | space_dimension () const
| Returns the dimension of the vector space enclosing `*this`.
dimension_type | affine_dimension () const
| Returns the dimension of the vector space enclosing `*this`.
bool | is_empty () const
| Returns `true` if and only if `*this` is an empty powerset.
bool | is_universe () const
| Returns `true` if and only if `*this` is the top element of the powerser lattice.
bool | is_topologically_closed () const
| Returns `true` if and only if all the disjuncts in `*this` are topologically closed.
bool | is_bounded () const
| Returns `true` if and only if all elements in `*this` are bounded.
bool | is_disjoint_from (const Pointset_Powerset &y) const
| Returns `true` if and only if `*this` and `y` are disjoint.
bool | is_discrete () const
| Returns `true` if and only if `*this` is discrete.
bool | constrains (Variable var) const
| Returns `true` if and only if `var` is constrained in `*this`.
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 &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.
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 &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.
bool | geometrically_covers (const Pointset_Powerset &y) const
| Returns `true` if and only if `*this` geometrically covers `y`, i.e., if any point (in some element) of `y` is also a point (of some element) of `*this`.
bool | geometrically_equals (const Pointset_Powerset &y) const
| Returns `true` if and only if `*this` is geometrically equal to `y`, i.e., if (the elements of) `*this` and `y` contain the same set of points.
bool | contains (const Pointset_Powerset &y) const
| Returns `true` if and only if each disjunct of `y` is contained in a disjunct of `*this`.
bool | strictly_contains (const Pointset_Powerset &y) const
| Returns `true` if and only if each disjunct of `y` is strictly contained in a disjunct of `*this`.
bool | contains_integer_point () const
| Returns `true` if and only if `*this` contains at least one integer point.
Poly_Con_Relation | relation_with (const Constraint &c) const
| Returns the relations holding between the powerset `*this` and the constraint `c`.
Poly_Gen_Relation | relation_with (const Generator &g) const
| Returns the relations holding between the powerset `*this` and the generator `g`.
Poly_Con_Relation | relation_with (const Congruence &cg) const
| Returns the relations holding between the powerset `*this` and the congruence `c`.
memory_size_type | total_memory_in_bytes () const
| Returns a lower bound to the total size in bytes of the memory occupied by `*this`.
memory_size_type | external_memory_in_bytes () const
| Returns a lower bound to the size in bytes of the memory managed by `*this`.
int32_t | hash_code () const
| Returns a 32-bit hash code for `*this`.
bool | OK () const
| Checks if all the invariants are satisfied.
Space Dimension Preserving Member Functions that May Modify the Pointset_Powerset
void | add_disjunct (const PS &ph)
| Adds to `*this` the disjunct `ph`.
void | add_constraint (const Constraint &c)
| Intersects `*this` with constraint `c`.
void | refine_with_constraint (const Constraint &c)
| Use the constraint `c` to refine `*this`.
bool | add_constraint_and_minimize (const Constraint &c)
| Intersects `*this` with the constraint `c`, minimizing the result.
void | add_constraints (const Constraint_System &cs)
| Intersects `*this` with the constraints in `cs`.
void | refine_with_constraints (const Constraint_System &cs)
| Use the constraints in `cs` to refine `*this`.
bool | add_constraints_and_minimize (const Constraint_System &cs)
| Intersects `*this` with the constraints in `cs`, minimizing the result.
void | add_congruence (const Congruence &c)
| Intersects `*this` with congruence `c`.
void | refine_with_congruence (const Congruence &cg)
| Use the congruence `cg` to refine `*this`.
bool | add_congruence_and_minimize (const Congruence &c)
| Intersects `*this` with the congruence `c`, minimizing the result.
void | add_congruences (const Congruence_System &cgs)
| Intersects `*this` with the congruences in `cgs`.
void | refine_with_congruences (const Congruence_System &cgs)
| Use the congruences in `cgs` to refine `*this`.
bool | add_congruences_and_minimize (const Congruence_System &cs)
| Intersects `*this` with the congruences in `cs`, minimizing the result.
void | unconstrain (Variable var)
| Computes the cylindrification of `*this` with respect to space dimension `var`, assigning the result to `*this`.
void | unconstrain (const Variables_Set &to_be_unconstrained)
| Computes the cylindrification of `*this` with respect to the set of space dimensions `to_be_unconstrained`, assigning the result to `*this`.
void | topological_closure_assign ()
| Assigns to `*this` its topological closure.
void | intersection_assign (const Pointset_Powerset &y)
| Assigns to `*this` the intersection of `*this` and `y`.
bool | intersection_assign_and_minimize (const Pointset_Powerset &y)
| Assigns to `*this` the intersection of `*this` and `y`.
void | difference_assign (const Pointset_Powerset &y)
| Assigns to `*this` an (a smallest) over-approximation as a powerset of the disjunct domain of the set-theoretical difference of `*this` and `y`.
bool | simplify_using_context_assign (const Pointset_Powerset &y)
| Assigns to `*this` a meet-preserving simplification of `*this` with respect to `y`. If `false` is returned, then the intersection is empty.
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, 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`.
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 , where is the relation symbol encoded by `relsym`.
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 , where is the relation symbol encoded by `relsym`.
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 , where is the relation symbol encoded by `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 Pointset_Powerset &y)
| Assigns to `*this` the result of computing the time-elapse between `*this` and `y`.
void | pairwise_reduce ()
| Assign to `*this` the result of (recursively) merging together the pairs of disjuncts whose upper-bound is the same as their set-theoretical union.
template<typename Widening >
void | BGP99_extrapolation_assign (const Pointset_Powerset &y, Widening wf, unsigned max_disjuncts)
| Assigns to `*this` the result of applying the BGP99 extrapolation operator to `*this` and `y`, using the widening function `wf` and the cardinality threshold `max_disjuncts`.
template<typename Cert , typename Widening >
void | BHZ03_widening_assign (const Pointset_Powerset &y, Widening wf)
| Assigns to `*this` the result of computing the BHZ03-widening between `*this` and `y`, using the widening function `wf` certified by the convergence certificate `Cert`.
Member Functions that May Modify the Dimension of the Vector Space
Pointset_Powerset & | operator= (const Pointset_Powerset &y)
| The assignment operator (`*this` and `y` can be dimension-incompatible).
template<typename QH >
Pointset_Powerset & | operator= (const Pointset_Powerset< QH > &y)
| Conversion assignment: the type `QH` of the disjuncts in the source powerset is different from `PS` (`*this` and `y` can be dimension-incompatible).
void | swap (Pointset_Powerset &y)
| Swaps `*this` with `y`.
void | add_space_dimensions_and_embed (dimension_type m)
| Adds `m` new dimensions to the vector space containing `*this` and embeds each disjunct in `*this` in the new space.
void | add_space_dimensions_and_project (dimension_type m)
| Adds `m` new dimensions to the vector space containing `*this` without embedding the disjuncts in `*this` in the new space.
void | concatenate_assign (const Pointset_Powerset &y)
| Assigns to `*this` the concatenation of `*this` and `y`.
void | remove_space_dimensions (const Variables_Set &to_be_removed)
| Removes all the specified space dimensions.
void | remove_higher_space_dimensions (dimension_type new_dimension)
| Removes the higher space dimensions 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`.
## Static Public Member Functions
static dimension_type | max_space_dimension ()
| Returns the maximum space dimension a Pointset_Powerset<PS> can handle.
## Related Functions
(Note that these are not member functions.)
template<typename PH >
Widening_Function< PH > | widen_fun_ref (void(PH::*wm)(const PH &, unsigned *))
| Wraps a widening method into a function object.
template<typename PH , typename CS >
Limited_Widening_Function< PH, CS > | widen_fun_ref (void(PH::*lwm)(const PH &, const CS &, unsigned *), const CS &cs)
| Wraps a limited widening method into a function object.
template<typename PS >
std::pair< PS, Pointset_Powerset < NNC_Polyhedron > > | linear_partition (const PS &p, const PS &q)
| Partitions `q` with respect to `p`.
bool | check_containment (const NNC_Polyhedron &ph, const Pointset_Powerset< NNC_Polyhedron > &ps)
| Returns `true` if and only if the union of the NNC polyhedra in `ps` contains the NNC polyhedron `ph`.
std::pair< Grid, Pointset_Powerset< Grid > > | approximate_partition (const Grid &p, const Grid &q, bool &finite_partition)
| Partitions the grid `q` with respect to grid `p` if and only if such a partition is finite.
bool | check_containment (const Grid &ph, const Pointset_Powerset< Grid > &ps)
| Returns `true` if and only if the union of the grids `ps` contains the grid `g`.
template<typename PS >
bool | check_containment (const PS &ph, const Pointset_Powerset< PS > &ps)
| Returns `true` if and only if the union of the objects in `ps` contains `ph`.
template<typename PS >
void | swap (Parma_Polyhedra_Library::Pointset_Powerset< PS > &x, Parma_Polyhedra_Library::Pointset_Powerset< PS > &y)
| Specializes `std::swap`.
template<>
bool | check_containment (const C_Polyhedron &ph, const Pointset_Powerset< C_Polyhedron > &ps)

## Detailed Description

### template<typename PS>
class Parma_Polyhedra_Library::Pointset_Powerset< PS >

The powerset construction instantiated on PPL pointset domains.

Warning:
  At present, the supported instantiations for the disjunct domain template `PS` are the simple pointset domains: `C_Polyhedron`, `NNC_Polyhedron`, `Grid`, `Octagonal_Shape<T>`, `BD_Shape<T>`, `Box<T>`.

## Constructor & Destructor Documentation

template<typename PS >

Parma_Polyhedra_Library::Pointset_Powerset< PS >::Pointset_Powerset | ( | dimension_type | num_dimensions = `0`,
|  | Degenerate_Element | kind = `UNIVERSE` |
| ) |  |  | `[inline, explicit]`

Builds a universe (top) or empty (bottom) Pointset_Powerset.

Parameters:

  | num_dimensions | The number of dimensions of the vector space enclosing the powerset;
  | kind | Specifies whether the universe or the empty powerset has to be built.

template<typename PS >

Parma_Polyhedra_Library::Pointset_Powerset< PS >::Pointset_Powerset | ( | const Pointset_Powerset< PS > & | y,
|  | Complexity_Class | complexity = `ANY_COMPLEXITY` |
| ) |  |  | `[inline]`

Ordinary copy-constructor.

The complexity argument is ignored.

template<typename PS >
template<typename QH >

Parma_Polyhedra_Library::Pointset_Powerset< PS >::Pointset_Powerset | ( | const Pointset_Powerset< QH > & | y,
|  | Complexity_Class | complexity = `ANY_COMPLEXITY` |
| ) |  |  | `[inline, explicit]`

Conversion constructor: the type `QH` of the disjuncts in the source powerset is different from `PS`.

Parameters:

  | y | The powerset to be used to build the new powerset.
  | complexity | The maximal complexity of any algorithms used.

template<typename PS >

Parma_Polyhedra_Library::Pointset_Powerset< PS >::Pointset_Powerset | ( | const C_Polyhedron & | ph,
|  | Complexity_Class | complexity = `ANY_COMPLEXITY` |
| ) |  |  | `[inline, explicit]`

Builds a pointset_powerset out of a closed polyhedron.

Builds a powerset that is either empty (if the polyhedron is found to be empty) or contains a single disjunct approximating the polyhedron; this must only use algorithms that do not exceed the specified complexity. The powerset inherits the space dimension of the polyhedron.

Parameters:

  | ph | The closed polyhedron to be used to build the powerset.
  | complexity | The maximal complexity of any algorithms used.

Exceptions:

  | std::length_error | Thrown if the space dimension of `ph` exceeds the maximum allowed space dimension.

template<typename PS >

Parma_Polyhedra_Library::Pointset_Powerset< PS >::Pointset_Powerset | ( | const NNC_Polyhedron & | ph,
|  | Complexity_Class | complexity = `ANY_COMPLEXITY` |
| ) |  |  | `[inline, explicit]`

Builds a pointset_powerset out of an nnc polyhedron.

Builds a powerset that is either empty (if the polyhedron is found to be empty) or contains a single disjunct approximating the polyhedron; this must only use algorithms that do not exceed the specified complexity. The powerset inherits the space dimension of the polyhedron.

Parameters:

  | ph | The closed polyhedron to be used to build the powerset.
  | complexity | The maximal complexity of any algorithms used.

Exceptions:

  | std::length_error | Thrown if the space dimension of `ph` exceeds the maximum allowed space dimension.

template<typename PS >

Parma_Polyhedra_Library::Pointset_Powerset< PS >::Pointset_Powerset | ( | const Grid & | gr,
|  | Complexity_Class | complexity = `ANY_COMPLEXITY` |
| ) |  |  | `[inline, explicit]`

Builds a pointset_powerset out of a grid.

If the grid is nonempty, builds a powerset containing a single disjunct approximating the grid. Builds the empty powerset otherwise. The powerset inherits the space dimension of the grid.

Parameters:

  | gr | The grid to be used to build the powerset.
  | complexity | This argument is ignored.

Exceptions:

  | std::length_error | Thrown if the space dimension of `gr` exceeds the maximum allowed space dimension.

template<typename PS >
template<typename T >

Parma_Polyhedra_Library::Pointset_Powerset< PS >::Pointset_Powerset | ( | const Octagonal_Shape< T > & | os,
|  | Complexity_Class | complexity = `ANY_COMPLEXITY` |
| ) |  |  | `[inline, explicit]`

Builds a pointset_powerset out of an octagonal shape.

If the octagonal shape is nonempty, builds a powerset containing a single disjunct approximating the octagonal shape. Builds the empty powerset otherwise. The powerset inherits the space dimension of the octagonal shape.

Parameters:

  | os | The octagonal shape to be used to build the powerset.
  | complexity | This argument is ignored.

Exceptions:

  | std::length_error | Thrown if the space dimension of `os` exceeds the maximum allowed space dimension.

template<typename PS >
template<typename T >

Parma_Polyhedra_Library::Pointset_Powerset< PS >::Pointset_Powerset | ( | const BD_Shape< T > & | bds,
|  | Complexity_Class | complexity = `ANY_COMPLEXITY` |
| ) |  |  | `[inline, explicit]`

Builds a pointset_powerset out of a bd shape.

If the bd shape is nonempty, builds a powerset containing a single disjunct approximating the bd shape. Builds the empty powerset otherwise. The powerset inherits the space dimension of the bd shape.

Parameters:

  | bds | The bd shape to be used to build the powerset.
  | complexity | This argument is ignored.

Exceptions:

  | std::length_error | Thrown if the space dimension of `bdss` exceeds the maximum allowed space dimension.

template<typename PS >
template<typename Interval >

Parma_Polyhedra_Library::Pointset_Powerset< PS >::Pointset_Powerset | ( | const Box< Interval > & | box,
|  | Complexity_Class | complexity = `ANY_COMPLEXITY` |
| ) |  |  | `[inline, explicit]`

Builds a pointset_powerset out of a box.

If the box is nonempty, builds a powerset containing a single disjunct approximating the box. Builds the empty powerset otherwise. The powerset inherits the space dimension of the box.

Parameters:

  | box | The box to be used to build the powerset.
  | complexity | This argument is ignored.

Exceptions:

  | std::length_error | Thrown if the space dimension of `box` exceeds the maximum allowed space dimension.

## Member Function Documentation

template<typename PS >

bool Parma_Polyhedra_Library::Pointset_Powerset< PS >::is_disjoint_from | ( | const Pointset_Powerset< PS > & | y | ) | const`[inline]`

Returns `true` if and only if `*this` and `y` are disjoint.

Exceptions:

  | std::invalid_argument | Thrown if `x` and `y` are topology-incompatible or dimension-incompatible.

template<typename PS >

bool Parma_Polyhedra_Library::Pointset_Powerset< PS >::constrains | ( | Variable | var | ) | const`[inline]`

Returns `true` if and only if `var` is constrained in `*this`.

Exceptions:

  | std::invalid_argument | Thrown if `var` is not a space dimension of `*this`.

Note:
  A variable is constrained if there exists a non-redundant disjunct that is constraining the variable: this definition relies on the powerset lattice structure and may be somewhat different from the geometric intuition. For instance, variable is constrained in the powerset

  even though is geometrically equal to the whole vector space.

template<typename PS >

bool Parma_Polyhedra_Library::Pointset_Powerset< PS >::bounds_from_above | ( | const Linear_Expression & | expr | ) | const`[inline]`

Returns `true` if and only if `expr` is bounded from above in `*this`.

Exceptions:

  | std::invalid_argument | Thrown if `expr` and `*this` are dimension-incompatible.

template<typename PS >

bool Parma_Polyhedra_Library::Pointset_Powerset< PS >::bounds_from_below | ( | const Linear_Expression & | expr | ) | const`[inline]`

Returns `true` if and only if `expr` is bounded from below in `*this`.

Exceptions:

  | std::invalid_argument | Thrown if `expr` and `*this` are dimension-incompatible.

template<typename PS >

bool Parma_Polyhedra_Library::Pointset_Powerset< PS >::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.

Parameters:

  | 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.

Exceptions:

  | std::invalid_argument | Thrown if `expr` and `*this` are dimension-incompatible.

If `*this` is empty or `expr` is not bounded from above, `false` is returned and `sup_n`, `sup_d` and `maximum` are left untouched.

template<typename PS >

bool Parma_Polyhedra_Library::Pointset_Powerset< PS >::maximize | ( | const Linear_Expression & | expr,
|  | Coefficient & | sup_n,
|  | Coefficient & | sup_d,
|  | bool & | maximum,
|  | Generator & | g |
| ) |  |  | 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.

Parameters:

  | 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;
  | g | When maximization succeeds, will be assigned the point or closure point where `expr` reaches its supremum value.

Exceptions:

  | std::invalid_argument | Thrown if `expr` and `*this` are dimension-incompatible.

If `*this` is empty or `expr` is not bounded from above, `false` is returned and `sup_n`, `sup_d`, `maximum` and `g` are left untouched.

template<typename PS >

bool Parma_Polyhedra_Library::Pointset_Powerset< PS >::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.

Parameters:

  | 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.

Exceptions:

  | 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.

template<typename PS >

bool Parma_Polyhedra_Library::Pointset_Powerset< PS >::minimize | ( | const Linear_Expression & | expr,
|  | Coefficient & | inf_n,
|  | Coefficient & | inf_d,
|  | bool & | minimum,
|  | Generator & | g |
| ) |  |  | 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.

Parameters:

  | 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;
  | g | When minimization succeeds, will be assigned a point or closure point where `expr` reaches its infimum value.

Exceptions:

  | 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 `g` are left untouched.

template<typename PS >

bool Parma_Polyhedra_Library::Pointset_Powerset< PS >::geometrically_covers | ( | const Pointset_Powerset< PS > & | y | ) | const`[inline]`

Returns `true` if and only if `*this` geometrically covers `y`, i.e., if any point (in some element) of `y` is also a point (of some element) of `*this`.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and `y` are dimension-incompatible.

Warning:
  This may be really expensive!

template<typename PS >

bool Parma_Polyhedra_Library::Pointset_Powerset< PS >::geometrically_equals | ( | const Pointset_Powerset< PS > & | y | ) | const`[inline]`

Returns `true` if and only if `*this` is geometrically equal to `y`, i.e., if (the elements of) `*this` and `y` contain the same set of points.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and `y` are dimension-incompatible.

Warning:
  This may be really expensive!

template<typename PS >

bool Parma_Polyhedra_Library::Pointset_Powerset< PS >::contains | ( | const Pointset_Powerset< PS > & | y | ) | const`[inline]`

Returns `true` if and only if each disjunct of `y` is contained in a disjunct of `*this`.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and `y` are topology-incompatible or dimension-incompatible.

template<typename PS >

bool Parma_Polyhedra_Library::Pointset_Powerset< PS >::strictly_contains | ( | const Pointset_Powerset< PS > & | y | ) | const`[inline]`

Returns `true` if and only if each disjunct of `y` is strictly contained in a disjunct of `*this`.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and `y` are topology-incompatible or dimension-incompatible.

template<typename PS >

Poly_Con_Relation Parma_Polyhedra_Library::Pointset_Powerset< PS >::relation_with | ( | const Constraint & | c | ) | const`[inline]`

Returns the relations holding between the powerset `*this` and the constraint `c`.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and constraint `c` are dimension-incompatible.

template<typename PS >

Poly_Gen_Relation Parma_Polyhedra_Library::Pointset_Powerset< PS >::relation_with | ( | const Generator & | g | ) | const`[inline]`

Returns the relations holding between the powerset `*this` and the generator `g`.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and generator `g` are dimension-incompatible.

template<typename PS >

Poly_Con_Relation Parma_Polyhedra_Library::Pointset_Powerset< PS >::relation_with | ( | const Congruence & | cg | ) | const`[inline]`

Returns the relations holding between the powerset `*this` and the congruence `c`.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and congruence `c` are dimension-incompatible.

template<typename PS >

int32_t Parma_Polyhedra_Library::Pointset_Powerset< PS >::hash_code | ( |  | ) | const`[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()`.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::add_disjunct | ( | const PS & | ph | ) | `[inline]`

Adds to `*this` the disjunct `ph`.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and `ph` are dimension-incompatible.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::add_constraint | ( | const Constraint & | c | ) | `[inline]`

Intersects `*this` with constraint `c`.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and constraint `c` are topology-incompatible or dimension-incompatible.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::refine_with_constraint | ( | const Constraint & | c | ) | `[inline]`

Use the constraint `c` to refine `*this`.

Parameters:

  | c | The constraint to be used for refinement.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and `c` are dimension-incompatible.

template<typename PS >

bool Parma_Polyhedra_Library::Pointset_Powerset< PS >::add_constraint_and_minimize | ( | const Constraint & | c | ) | `[inline]`

Intersects `*this` with the constraint `c`, minimizing the result.

Returns:
  `false` if and only if the result is empty.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and `c` are topology-incompatible or dimension-incompatible.

Deprecated:
  See A Note on the Implementation of the Operators.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::add_constraints | ( | const Constraint_System & | cs | ) | `[inline]`

Intersects `*this` with the constraints in `cs`.

Parameters:

  | cs | The constraints to intersect with.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and `cs` are topology-incompatible or dimension-incompatible.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::refine_with_constraints | ( | const Constraint_System & | cs | ) | `[inline]`

Use the constraints in `cs` to refine `*this`.

Parameters:

  | cs | The constraints to be used for refinement.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and `cs` are dimension-incompatible.

template<typename PS >

bool Parma_Polyhedra_Library::Pointset_Powerset< PS >::add_constraints_and_minimize | ( | const Constraint_System & | cs | ) | `[inline]`

Intersects `*this` with the constraints in `cs`, minimizing the result.

Returns:
  `false` if and only if the result is empty.

Parameters:

  | cs | The constraints to intersect with.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and `cs` are topology-incompatible or dimension-incompatible.

Deprecated:
  See A Note on the Implementation of the Operators.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::add_congruence | ( | const Congruence & | c | ) | `[inline]`

Intersects `*this` with congruence `c`.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and congruence `c` are topology-incompatible or dimension-incompatible.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::refine_with_congruence | ( | const Congruence & | cg | ) | `[inline]`

Use the congruence `cg` to refine `*this`.

Parameters:

  | cg | The congruence to be used for refinement.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and `cg` are dimension-incompatible.

template<typename PS >

bool Parma_Polyhedra_Library::Pointset_Powerset< PS >::add_congruence_and_minimize | ( | const Congruence & | c | ) | `[inline]`

Intersects `*this` with the congruence `c`, minimizing the result.

Returns:
  `false` if and only if the result is empty.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and `c` are topology-incompatible or dimension-incompatible.

Deprecated:
  See A Note on the Implementation of the Operators.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::add_congruences | ( | const Congruence_System & | cgs | ) | `[inline]`

Intersects `*this` with the congruences in `cgs`.

Parameters:

  | cgs | The congruences to intersect with.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and `cgs` are topology-incompatible or dimension-incompatible.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::refine_with_congruences | ( | const Congruence_System & | cgs | ) | `[inline]`

Use the congruences in `cgs` to refine `*this`.

Parameters:

  | cgs | The congruences to be used for refinement.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and `cgs` are dimension-incompatible.

template<typename PS >

bool Parma_Polyhedra_Library::Pointset_Powerset< PS >::add_congruences_and_minimize | ( | const Congruence_System & | cs | ) | `[inline]`

Intersects `*this` with the congruences in `cs`, minimizing the result.

Returns:
  `false` if and only if the result is empty.

Parameters:

  | cs | The congruences to intersect with.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and `cs` are topology-incompatible or dimension-incompatible.

Deprecated:
  See A Note on the Implementation of the Operators.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::unconstrain | ( | Variable | var | ) | `[inline]`

Computes the cylindrification of `*this` with respect to space dimension `var`, assigning the result to `*this`.

Parameters:

  | var | The space dimension that will be unconstrained.

Exceptions:

  | std::invalid_argument | Thrown if `var` is not a space dimension of `*this`.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::unconstrain | ( | const Variables_Set & | to_be_unconstrained | ) | `[inline]`

Computes the cylindrification of `*this` with respect to the set of space dimensions `to_be_unconstrained`, assigning the result to `*this`.

Parameters:

  | to_be_unconstrained | The set of space dimension that will be unconstrained.

Exceptions:

  | std::invalid_argument | Thrown if `*this` is dimension-incompatible with one of the Variable objects contained in `to_be_removed`.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::intersection_assign | ( | const Pointset_Powerset< PS > & | y | ) | `[inline]`

Assigns to `*this` the intersection of `*this` and `y`.

The result is obtained by intersecting each disjunct in `*this` with each disjunct in `y` and collecting all these intersections.

template<typename PS >

bool Parma_Polyhedra_Library::Pointset_Powerset< PS >::intersection_assign_and_minimize | ( | const Pointset_Powerset< PS > & | y | ) | `[inline]`

Assigns to `*this` the intersection of `*this` and `y`.

The result is obtained by intersecting each disjunct in `*this` with each disjunct in `y`, minimizing the result and collecting all these intersections.

Returns:
  `false` if and only if the result is empty.

Deprecated:
  See A Note on the Implementation of the Operators.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::difference_assign | ( | const Pointset_Powerset< PS > & | y | ) | `[inline]`

Assigns to `*this` an (a smallest) over-approximation as a powerset of the disjunct domain of the set-theoretical difference of `*this` and `y`.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and `y` are dimension-incompatible.

template<typename PS >

bool Parma_Polyhedra_Library::Pointset_Powerset< PS >::simplify_using_context_assign | ( | const Pointset_Powerset< PS > & | y | ) | `[inline]`

Assigns to `*this` a meet-preserving simplification of `*this` with respect to `y`. If `false` is returned, then the intersection is empty.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and `y` are topology-incompatible or dimension-incompatible.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::affine_image | ( | Variable | var,
|  | const Linear_Expression & | expr,
|  | Coefficient_traits::const_reference | denominator = `Coefficient_one()` |
| ) |  |  | `[inline]`

Assigns to `*this` the affine image of `*this` under the function mapping variable `var` to the affine expression specified by `expr` and `denominator`.

Parameters:

  | 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).

Exceptions:

  | 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`.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::affine_preimage | ( | Variable | var,
|  | const Linear_Expression & | expr,
|  | Coefficient_traits::const_reference | denominator = `Coefficient_one()` |
| ) |  |  | `[inline]`

Assigns to `*this` the affine preimage of `*this` under the function mapping variable `var` to the affine expression specified by `expr` and `denominator`.

Parameters:

  | 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).

Exceptions:

  | 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`.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::generalized_affine_image | ( | Variable | var,
|  | Relation_Symbol | relsym,
|  | const Linear_Expression & | expr,
|  | Coefficient_traits::const_reference | denominator = `Coefficient_one()` |
| ) |  |  | `[inline]`

Assigns to `*this` the image of `*this` with respect to the generalized affine relation , where is the relation symbol encoded by `relsym`.

Parameters:

  | 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).

Exceptions:

  | 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.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::generalized_affine_preimage | ( | Variable | var,
|  | Relation_Symbol | relsym,
|  | const Linear_Expression & | expr,
|  | Coefficient_traits::const_reference | denominator = `Coefficient_one()` |
| ) |  |  | `[inline]`

Assigns to `*this` the preimage of `*this` with respect to the generalized affine relation , where is the relation symbol encoded by `relsym`.

Parameters:

  | 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).

Exceptions:

  | 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.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::generalized_affine_image | ( | const Linear_Expression & | lhs,
|  | Relation_Symbol | relsym,
|  | const Linear_Expression & | rhs |
| ) |  |  | `[inline]`

Assigns to `*this` the image of `*this` with respect to the generalized affine relation , where is the relation symbol encoded by `relsym`.

Parameters:

  | lhs | The left hand side affine expression;
  | relsym | The relation symbol;
  | rhs | The right hand side affine expression.

Exceptions:

  | 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.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::generalized_affine_preimage | ( | const Linear_Expression & | lhs,
|  | Relation_Symbol | relsym,
|  | const Linear_Expression & | rhs |
| ) |  |  | `[inline]`

Assigns to `*this` the preimage of `*this` with respect to the generalized affine relation , where is the relation symbol encoded by `relsym`.

Parameters:

  | lhs | The left hand side affine expression;
  | relsym | The relation symbol;
  | rhs | The right hand side affine expression.

Exceptions:

  | 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.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::bounded_affine_image | ( | Variable | var,
|  | const Linear_Expression & | lb_expr,
|  | const Linear_Expression & | ub_expr,
|  | Coefficient_traits::const_reference | denominator = `Coefficient_one()` |
| ) |  |  | `[inline]`

Assigns to `*this` the image of `*this` with respect to the bounded affine relation .

Parameters:

  | 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).

Exceptions:

  | 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`.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::bounded_affine_preimage | ( | Variable | var,
|  | const Linear_Expression & | lb_expr,
|  | const Linear_Expression & | ub_expr,
|  | Coefficient_traits::const_reference | denominator = `Coefficient_one()` |
| ) |  |  | `[inline]`

Assigns to `*this` the preimage of `*this` with respect to the bounded affine relation .

Parameters:

  | 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).

Exceptions:

  | 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`.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::time_elapse_assign | ( | const Pointset_Powerset< PS > & | y | ) | `[inline]`

Assigns to `*this` the result of computing the time-elapse between `*this` and `y`.

The result is obtained by computing the pairwise time elapse of each disjunct in `*this` with each disjunct in `y`.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::pairwise_reduce | ( |  | ) | `[inline]`

Assign to `*this` the result of (recursively) merging together the pairs of disjuncts whose upper-bound is the same as their set-theoretical union.

On exit, for all the pairs , of different disjuncts in `*this`, we have .

template<typename PS >
template<typename Widening >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::BGP99_extrapolation_assign | ( | const Pointset_Powerset< PS > & | y,
|  | Widening | wf,
|  | unsigned | max_disjuncts |
| ) |  |  | `[inline]`

Assigns to `*this` the result of applying the BGP99 extrapolation operator to `*this` and `y`, using the widening function `wf` and the cardinality threshold `max_disjuncts`.

Parameters:

  | y | A powerset that must definitely entail `*this`;
  | wf | The widening function to be used on polyhedra objects. It is obtained from the corresponding widening method by using the helper function Parma_Polyhedra_Library::widen_fun_ref. Legal values are, e.g., `widen_fun_ref(&Polyhedron::H79_widening_assign)` and `widen_fun_ref(&Polyhedron::limited_H79_extrapolation_assign, cs)`;
  | max_disjuncts | The maximum number of disjuncts occurring in the powerset `*this` before starting the computation. If this number is exceeded, some of the disjuncts in `*this` are collapsed (i.e., joined together).

Exceptions:

  | std::invalid_argument | Thrown if `*this` and `y` are dimension-incompatible.

For a description of the extrapolation operator, see [BGP99] and [BHZ03b].

template<typename PS >
template<typename Cert , typename Widening >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::BHZ03_widening_assign | ( | const Pointset_Powerset< PS > & | y,
|  | Widening | wf |
| ) |  |  | `[inline]`

Assigns to `*this` the result of computing the BHZ03-widening between `*this` and `y`, using the widening function `wf` certified by the convergence certificate `Cert`.

Parameters:

  | y | The finite powerset computed in the previous iteration step. It must definitely entail `*this`;
  | wf | The widening function to be used on disjuncts. It is obtained from the corresponding widening method by using the helper function widen_fun_ref. Legal values are, e.g., `widen_fun_ref(&Polyhedron::H79_widening_assign)` and `widen_fun_ref(&Polyhedron::limited_H79_extrapolation_assign, cs)`.

Exceptions:

  | std::invalid_argument | Thrown if `*this` and `y` are dimension-incompatible.

Warning:
  In order to obtain a proper widening operator, the template parameter `Cert` should be a finite convergence certificate for the base-level widening function `wf`; otherwise, an extrapolation operator is obtained. For a description of the methods that should be provided by `Cert`, see BHRZ03_Certificate or H79_Certificate.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::concatenate_assign | ( | const Pointset_Powerset< PS > & | y | ) | `[inline]`

Assigns to `*this` the concatenation of `*this` and `y`.

The result is obtained by computing the pairwise concatenation of each disjunct in `*this` with each disjunct in `y`.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::remove_space_dimensions | ( | const Variables_Set & | to_be_removed | ) | `[inline]`

Removes all the specified space dimensions.

Parameters:

  | to_be_removed | The set of Variable objects corresponding to the space dimensions to be removed.

Exceptions:

  | std::invalid_argument | Thrown if `*this` is dimension-incompatible with one of the Variable objects contained in `to_be_removed`.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::remove_higher_space_dimensions | ( | dimension_type | new_dimension | ) | `[inline]`

Removes the higher space dimensions so that the resulting space will have dimension `new_dimension`.

Exceptions:

  | std::invalid_argument | Thrown if `new_dimensions` is greater than the space dimension of `*this`.

template<typename PS >
template<typename Partial_Function >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::map_space_dimensions | ( | const Partial_Function & | pfunc | ) | `[inline]`

Remaps the dimensions of the vector space according to a partial function.

See also Polyhedron::map_space_dimensions.

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::expand_space_dimension | ( | Variable | var,
|  | dimension_type | m |
| ) |  |  | `[inline]`

Creates `m` copies of the space dimension corresponding to `var`.

Parameters:

  | var | The variable corresponding to the space dimension to be replicated;
  | m | The number of replicas to be created.

Exceptions:

  | 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 , , , .

template<typename PS >

void Parma_Polyhedra_Library::Pointset_Powerset< PS >::fold_space_dimensions | ( | const Variables_Set & | to_be_folded,
|  | Variable | var |
| ) |  |  | `[inline]`

Folds the space dimensions in `to_be_folded` into `var`.

Parameters:

  | 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.

Exceptions:

  | 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`.

If `*this` has space dimension , with , `var` has space dimension , `to_be_folded` is a set of variables whose maximum space dimension is also less than or equal to , and `var` is not a member of `to_be_folded`, then the space dimensions corresponding to variables in `to_be_folded` are folded into the -th space dimension.

## Friends And Related Function Documentation

template<typename PH >

Widening_Function< PH > widen_fun_ref | ( | void(PH::*)(const PH &, unsigned *) | wm | ) | `[related]`

Wraps a widening method into a function object.

Parameters:

  | wm | The widening method.

template<typename PH , typename CS >

Limited_Widening_Function< PH, CS > widen_fun_ref | ( | void(PH::*)(const PH &, const CS &, unsigned *) | lwm,
|  | const CS & | cs |
| ) |  |  | `[related]`

Wraps a limited widening method into a function object.

Parameters:

  | lwm | The limited widening method.
  | cs | The constraint system limiting the widening.

template<typename PS >

std::pair< PS, Pointset_Powerset< NNC_Polyhedron > > linear_partition | ( | const PS & | p,
|  | const PS & | q |
| ) |  |  | `[related]`

Partitions `q` with respect to `p`.

Let `p` and `q` be two polyhedra. The function returns an object `r` of type `std::pair<PS, Pointset_Powerset<NNC_Polyhedron> >` such that

- `r.first` is the intersection of `p` and `q`;
- `r.second` has the property that all its elements are pairwise disjoint and disjoint from `p`;
- the set-theoretical union of `r.first` with all the elements of `r.second` gives `q` (i.e., `r` is the representation of a partition of `q`).

template<typename PS >

std::pair< Grid, Pointset_Powerset< Grid > > approximate_partition | ( | const Grid & | p,
|  | const Grid & | q,
|  | bool & | finite_partition |
| ) |  |  | `[related]`

Partitions the grid `q` with respect to grid `p` if and only if such a partition is finite.

Let `p` and `q` be two grids. The function returns an object `r` of type `std::pair<PS, Pointset_Powerset<Grid> >` such that

- `r.first` is the intersection of `p` and `q`;
- If there is a finite partition of `q` wrt `p` the Boolean `finite_partition` is set to true and `r.second` has the property that all its elements are pairwise disjoint and disjoint from `p` and the set-theoretical union of `r.first` with all the elements of `r.second` gives `q` (i.e., `r` is the representation of a partition of `q`).
- Otherwise the Boolean `finite_partition` is set to false and the singleton set that contains `q` is stored in `r.second`r.

template<typename PS >

bool check_containment | ( | const PS & | ph,
|  | const Pointset_Powerset< PS > & | ps |
| ) |  |  | `[related]`

Returns `true` if and only if the union of the objects in `ps` contains `ph`.

Note:
  It is assumed that the template parameter PS can be converted without precision loss into an NNC_Polyhedron; otherwise, an incorrect result might be obtained.

template<typename PS >

void swap | ( | Parma_Polyhedra_Library::Pointset_Powerset< PS > & | x,
|  | Parma_Polyhedra_Library::Pointset_Powerset< PS > & | y |
| ) |  |  | `[related]`

Specializes `std::swap`.

bool check_containment | ( | const C_Polyhedron & | ph,
|  | const Pointset_Powerset< C_Polyhedron > & | ps |
| ) |  |  | `[related]`

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

- ppl.hh