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

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

`#include <ppl.hh>`

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

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 `PSET`.
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 PSET 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 PSET &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`.
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`.
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`.
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`.
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 &vars)
| Computes the cylindrification of `*this` with respect to the set of space dimensions `vars`, assigning the result to `*this`.
void | drop_some_non_integer_points (Complexity_Class complexity=ANY_COMPLEXITY)
| Possibly tightens `*this` by dropping some points with non-integer coordinates.
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`.
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`.
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 | wrap_assign (const Variables_Set &vars, Bounded_Integer_Type_Width w, Bounded_Integer_Type_Representation r, Bounded_Integer_Type_Overflow o, const Constraint_System *pcs=0, unsigned complexity_threshold=16, bool wrap_individually=true)
| Wraps the specified dimensions of the vector space.
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 `PSET` (`*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 &vars)
| 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 &vars, Variable dest)
| Folds the space dimensions in `vars` into `dest`.

## Static Public Member Functions

static dimension_type | max_space_dimension ()
| Returns the maximum space dimension a Pointset_Powerset<PSET> can handle.

## Related Functions

(Note that these are not member functions.)
template<typename PSET >
Widening_Function< PSET > | widen_fun_ref (void(PSET::*wm)(const PSET &, unsigned *))
| Wraps a widening method into a function object.
template<typename PSET , typename CSYS >
Limited_Widening_Function < PSET, CSYS > | widen_fun_ref (void(PSET::*lwm)(const PSET &, const CSYS &, unsigned *), const CSYS &cs)
| Wraps a limited widening method into a function object.
template<typename PSET >
std::pair< PSET, Pointset_Powerset < NNC_Polyhedron > > | linear_partition (const PSET &p, const PSET &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 PSET >
bool | check_containment (const PSET &ph, const Pointset_Powerset< PSET > &ps)
| Returns `true` if and only if the union of the objects in `ps` contains `ph`.
template<typename PSET >
void | swap (Parma_Polyhedra_Library::Pointset_Powerset< PSET > &x, Parma_Polyhedra_Library::Pointset_Powerset< PSET > &y)
| Specializes `std::swap`.
template<>
bool | check_containment (const C_Polyhedron &ph, const Pointset_Powerset< C_Polyhedron > &ps)

## Detailed Description

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

The powerset construction instantiated on PPL pointset domains.

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

## Constructor & Destructor Documentation

template<typename PSET >

Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

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

Ordinary copy constructor.

The complexity argument is ignored.

template<typename PSET >
template<typename QH >

Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 `PSET`.

Parameters:

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

template<typename PSET >

Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >
template<typename T >

Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >
template<typename T >

Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >
template<typename Interval >

Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

bool Parma_Polyhedra_Library::Pointset_Powerset< PSET >::is_disjoint_from | ( | const Pointset_Powerset< PSET > & | 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 PSET >

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

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

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

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

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

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

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

bool Parma_Polyhedra_Library::Pointset_Powerset< PSET >::geometrically_covers | ( | const Pointset_Powerset< PSET > & | 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 PSET >

bool Parma_Polyhedra_Library::Pointset_Powerset< PSET >::geometrically_equals | ( | const Pointset_Powerset< PSET > & | 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 PSET >

bool Parma_Polyhedra_Library::Pointset_Powerset< PSET >::contains | ( | const Pointset_Powerset< PSET > & | 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 PSET >

bool Parma_Polyhedra_Library::Pointset_Powerset< PSET >::strictly_contains | ( | const Pointset_Powerset< PSET > & | 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 PSET >

Poly_Con_Relation Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

Poly_Gen_Relation Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

Poly_Con_Relation Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

int32_t Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

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

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

Exceptions:

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

template<typename PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

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

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

Parameters:

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

template<typename PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::drop_some_non_integer_points | ( | Complexity_Class | complexity = `ANY_COMPLEXITY` | ) | `[inline]`

Possibly tightens `*this` by dropping some points with non-integer coordinates.

Parameters:

  | complexity | The maximal complexity of any algorithms used.

Note:
  Currently there is no optimality guarantee, not even if `complexity` is `ANY_COMPLEXITY`.

template<typename PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::drop_some_non_integer_points | ( | const Variables_Set & | vars,
|  | Complexity_Class | complexity = `ANY_COMPLEXITY` |
| ) |  |  | `[inline]`

Possibly tightens `*this` by dropping some points with non-integer coordinates for the space dimensions corresponding to `vars`.

Parameters:

  | vars | Points with non-integer coordinates for these variables/space-dimensions can be discarded.
  | complexity | The maximal complexity of any algorithms used.

Note:
  Currently there is no optimality guarantee, not even if `complexity` is `ANY_COMPLEXITY`.

template<typename PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::intersection_assign | ( | const Pointset_Powerset< PSET > & | 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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::difference_assign | ( | const Pointset_Powerset< PSET > & | 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 PSET >

bool Parma_Polyhedra_Library::Pointset_Powerset< PSET >::simplify_using_context_assign | ( | const Pointset_Powerset< PSET > & | 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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::time_elapse_assign | ( | const Pointset_Powerset< PSET > & | 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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::wrap_assign | ( | const Variables_Set & | vars,
|  | Bounded_Integer_Type_Width | w,
|  | Bounded_Integer_Type_Representation | r,
|  | Bounded_Integer_Type_Overflow | o,
|  | const Constraint_System * | pcs = `0`,
|  | unsigned | complexity_threshold = `16`,
|  | bool | wrap_individually = `true` |
| ) |  |  | `[inline]`

Wraps the specified dimensions of the vector space.

Parameters:

  | vars | The set of Variable objects corresponding to the space dimensions to be wrapped.
  | w | The width of the bounded integer type corresponding to all the dimensions to be wrapped.
  | r | The representation of the bounded integer type corresponding to all the dimensions to be wrapped.
  | o | The overflow behavior of the bounded integer type corresponding to all the dimensions to be wrapped.

  pcs

  Possibly null pointer to a constraint system whose variables are contained in `vars`. If `*pcs` depends on variables not in `vars`, the behavior is undefined. When non-null, the pointed-to constraint system is assumed to represent the conditional or looping construct guard with respect to which wrapping is performed. Since wrapping requires the computation of upper bounds and due to non-distributivity of constraint refinement over upper bounds, passing a constraint system in this way can be more precise than refining the result of the wrapping operation with the constraints in `*pcs`.

  | complexity_threshold | A precision parameter of the wrapping operator: higher values result in possibly improved precision.
  | wrap_individually | `true` if the dimensions should be wrapped individually (something that results in much greater efficiency to the detriment of precision).

Exceptions:

  | std::invalid_argument | Thrown if `*pcs` is dimension-incompatible with `vars`, or if `*this` is dimension-incompatible `vars` or with `*pcs`.

template<typename PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >
template<typename Widening >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::BGP99_extrapolation_assign | ( | const Pointset_Powerset< PSET > & | 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 PSET >
template<typename Cert , typename Widening >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::BHZ03_widening_assign | ( | const Pointset_Powerset< PSET > & | 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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::concatenate_assign | ( | const Pointset_Powerset< PSET > & | 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 PSET >

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

Removes all the specified space dimensions.

Parameters:

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

template<typename PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >
template<typename Partial_Function >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::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 PSET >

void Parma_Polyhedra_Library::Pointset_Powerset< PSET >::fold_space_dimensions | ( | const Variables_Set & | vars,
|  | Variable | dest |
| ) |  |  | `[inline]`

Folds the space dimensions in `vars` into `dest`.

Parameters:

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

Exceptions:

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

## Friends And Related Function Documentation

template<typename PSET >

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

Wraps a widening method into a function object.

Parameters:

  | wm | The widening method.

template<typename PSET , typename CSYS >

Limited_Widening_Function< PSET, CSYS > widen_fun_ref | ( | void(PSET::*)(const PSET &, const CSYS &, unsigned *) | lwm,
|  | const CSYS & | 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 PSET >

std::pair< PSET, Pointset_Powerset< NNC_Polyhedron > > linear_partition | ( | const PSET & | p,
|  | const PSET & | 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<PSET, 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 PSET >

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

bool check_containment | ( | const PSET & | ph,
|  | const Pointset_Powerset< PSET > & | 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 PSET can be converted without precision loss into an NNC_Polyhedron; otherwise, an incorrect result might be obtained.

template<typename PSET >

void swap | ( | Parma_Polyhedra_Library::Pointset_Powerset< PSET > & | x,
|  | Parma_Polyhedra_Library::Pointset_Powerset< PSET > & | 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