PPL: Parma_Polyhedra_Library::Determinate< PH > Class Template Reference

Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members | Related Pages

# Parma_Polyhedra_Library::Determinate< PH > Class Template Reference

Wraps a PPL class into a determinate constraint system interface. More...

List of all members.

## Public Member Functions
Constructors and Destructor
| Determinate (dimension_type num_dimensions=0, bool universe=true)
| Builds either the top or the bottom of the determinate constraint system defined on the vector space having `num_dimensions` dimensions.
| Determinate (const PH &p)
| Injection operator: builds the determinate constraint system element corresponding to the base-level element `p`.
| Determinate (const ConSys &cs)
| Injection operator: builds the determinate constraint system element corresponding to the base-level element represented by `cs`.
| Determinate (const Determinate &y)
| Copy constructor.
| ~Determinate ()
| Destructor.
Member Functions that Do Not Modify the Domain Element
dimension_type | space_dimension () const
| Returns the dimension of the vector space enclosing `*this`.
const ConSys & | constraints () const
| Returns the system of constraints.
const ConSys & | minimized_constraints () const
| Returns the system of constraints, with no redundant constraint.
const PH & | element () const
| Returns a const reference to the embedded element.
PH & | element ()
| Returns a reference to the embedded element.
bool | is_top () const
| Returns `true` if and only if `*this` is the top of the determinate constraint system (i.e., the whole vector space).
bool | is_bottom () const
| Returns `true` if and only if `*this` is the bottom of the determinate constraint system (i.e., the emptyset).
bool | definitely_entails (const Determinate &y) const
| Returns `true` if and only if `*this` entails `y` (i.e., `*this` is contained in `y`).
bool | is_definitely_equivalent_to (const Determinate &y) const
| Returns `true` if and only if `*this` and `y` are equivalent.
bool | OK () const
| Checks if all the invariants are satisfied.
Space-Dimension Preserving Member Functions that May Modify the Domain Element
void | upper_bound_assign (const Determinate &y)
| Assigns to `*this` the upper bound of `*this` and `y`.
void | meet_assign (const Determinate &y)
| Assigns to `*this` the meet of `*this` and `y`.
void | add_constraint (const Constraint &c)
| Assigns to `*this` the meet of `*this` and the element represented by constraint `c`.
void | add_constraints (ConSys &cs)
| Assigns to `*this` the meet of `*this` and the element represented by the constraints in `cs`.
Member Functions that May Modify the Dimension of the Vector Space
Determinate & | operator= (const Determinate &y)
| Assignment operator.
void | swap (Determinate &y)
| Swaps `*this` with `y`.
void | add_dimensions_and_embed (dimension_type m)
| Adds `m` new dimensions and embeds the old domain element in the new vector space.
void | add_dimensions_and_project (dimension_type m)
| Adds `m` new dimensions to the domain element and does not embed it in the new vector space.
void | concatenate_assign (const Determinate &y)
| Assigns to `*this` the concatenation of `*this` and `y`, taken in this order.
void | remove_dimensions (const Variables_Set &to_be_removed)
| Removes all the specified dimensions.
void | remove_higher_dimensions (dimension_type new_dimension)
| Removes the higher dimensions so that the resulting space will have dimension `new_dimension`.
template<typename PartialFunction> void | map_dimensions (const PartialFunction &pfunc)
| Remaps the dimensions of the vector space according to a partial function.
## Friends
bool | operator== (const Determinate< PH > &x, const Determinate< PH > &y)
| Returns `true` if and only if `x` and `y` are the same domain element.
bool | operator!= (const Determinate< PH > &x, const Determinate< PH > &y)
| Returns `true` if and only if `x` and `y` are different domain elements.
## Related Functions
(Note that these are not member functions.)
std::ostream & | operator<< (std::ostream &, const Determinate< PH > &)
| Output operator.
void | swap (Parma_Polyhedra_Library::Determinate< PH > &x, Parma_Polyhedra_Library::Determinate< PH > &y)
| Specializes `std::swap`.

## Detailed Description

### template<typename PH>
class Parma_Polyhedra_Library::Determinate< PH >

Wraps a PPL class into a determinate constraint system interface.

## Constructor & Destructor Documentation

template<typename PH>
Parma_Polyhedra_Library::Determinate< PH >::Determinate | ( | dimension_type | num_dimensions = `0`,
|  | bool | universe = `true`
| ) | `[explicit]`

| Builds either the top or the bottom of the determinate constraint system defined on the vector space having `num_dimensions` dimensions. The top element, corresponding to the whole vector space, is built if `universe` is `true`; otherwise the bottom element, corresponding to the emptyset, is built. By default, the top of a zero-dimension vector space is built.

## Member Function Documentation

template<typename PH>
void Parma_Polyhedra_Library::Determinate< PH >::add_constraint | ( | const Constraint & | c | ) |

  | Assigns to `*this` the meet of `*this` and the element represented by constraint `c`. Exceptions:
  | std::invalid_argument | Thrown if `*this` and constraint `c` are topology-incompatible or dimension-incompatible.

template<typename PH>
void Parma_Polyhedra_Library::Determinate< PH >::add_constraints | ( | ConSys & | cs | ) |

  | Assigns to `*this` the meet of `*this` and the element represented by the constraints in `cs`. Parameters:
  | cs | The constraints to intersect with. This parameter is not declared `const` because it can be modified.
  Exceptions:
  | std::invalid_argument | Thrown if `*this` and `cs` are topology-incompatible or dimension-incompatible.

template<typename PH>
void Parma_Polyhedra_Library::Determinate< PH >::remove_dimensions | ( | const Variables_Set & | to_be_removed | ) |

  | Removes all the specified dimensions. Parameters:
  | to_be_removed | The set of Variable objects corresponding to the 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 PH>
void Parma_Polyhedra_Library::Determinate< PH >::remove_higher_dimensions | ( | dimension_type | new_dimension | ) |

  | Removes the higher 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 PH>
template<typename PartialFunction>
void Parma_Polyhedra_Library::Determinate< PH >::map_dimensions | ( | const PartialFunction & | pfunc | ) |

| Remaps the dimensions of the vector space according to a partial function. See Polyhedron::map_dimensions.

## Friends And Related Function Documentation

template<typename PH>
bool operator== | ( | const Determinate< PH > & | x,
|  | const Determinate< PH > & | y
| ) | `[friend]`

  | Returns `true` if and only if `x` and `y` are the same domain element. Exceptions:
  | std::invalid_argument | Thrown if `x` and `y` are topology-incompatible or dimension-incompatible.

template<typename PH>
bool operator!= | ( | const Determinate< PH > & | x,
|  | const Determinate< PH > & | y
| ) | `[friend]`

  | Returns `true` if and only if `x` and `y` are different domain elements. Exceptions:
  | std::invalid_argument | Thrown if `x` and `y` are topology-incompatible or dimension-incompatible.