# Parma_Polyhedra_Library::Congruences_Reduction< D1, D2 > Class Template Reference
[C++ Language Interface]

This class provides the reduction method for the Congruences_Product domain. More...

`#include <ppl.hh>`

List of all members.

## Public Member Functions

| Congruences_Reduction ()
| Default constructor.
void | product_reduce (D1 &d1, D2 &d2)
| The congruences reduction operator for detect emptiness or any equalities implied by each of the congruences defining one of the components and the bounds of the other component. It is assumed that the components are already constraints reduced.
| ~Congruences_Reduction ()
| Destructor.

## Detailed Description

### template<typename D1, typename D2>
class Parma_Polyhedra_Library::Congruences_Reduction< D1, D2 >

This class provides the reduction method for the Congruences_Product domain.

The reduction classes are used to instantiate the Partially_Reduced_Product domain.

This class uses the minimized congruences defining each of the components. For each of the congruences, it checks if the other component intersects none, one or more than one hyperplane defined by the congruence and adds equalities or emptiness as appropriate; in more detail: Letting the components be d1 and d2, then, for each congruence cg representing d1:

- if more than one hyperplane defined by cg intersects d2, then d1 and d2 are unchanged;
- if exactly one hyperplane intersects d2, then d1 and d2 are refined with the corresponding equality ;
- otherwise, d1 and d2 are set to empty. Unless d1 and d2 are already empty, the process is repeated where the roles of d1 and d2 are reversed. If d1 or d2 is empty, then the emptiness is propagated.

## Member Function Documentation

template<typename D1 , typename D2 >

void Parma_Polyhedra_Library::Congruences_Reduction< D1, D2 >::product_reduce | ( | D1 & | d1,
|  | D2 & | d2 |
| ) |  |  | `[inline]`

The congruences reduction operator for detect emptiness or any equalities implied by each of the congruences defining one of the components and the bounds of the other component. It is assumed that the components are already constraints reduced.

The minimized congruence system defining the domain element `d1` is used to check if `d2` intersects none, one or more than one of the hyperplanes defined by the congruences: if it intersects none, then product is set empty; if it intersects one, then the equality defining this hyperplane is added to both components; otherwise, the product is unchanged. In each case, the donor domain must provide a congruence system in minimal form.

Parameters:

  | d1 | A pointset domain element;
  | d2 | A pointset domain element;

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

- ppl.hh