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

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

#include <Partially_Reduced_Product.defs.hh>

List of all members.

Public Member Functions

 Constraints_Reduction ()
 Default constructor.
void product_reduce (D1 &d1, D2 &d2)
 ~Constraints_Reduction ()
 Destructor.


Detailed Description

template<typename D1, typename D2>
class Parma_Polyhedra_Library::Constraints_Reduction< D1, D2 >

This class provides the reduction method for the Constraints_Product domain.

The reduction classes are used to instantiate the Partially_Reduced_Product domain. This class adds the constraints defining each of the component domains to the other component.

Definition at line 126 of file Partially_Reduced_Product.defs.hh.


Constructor & Destructor Documentation

template<typename D1, typename D2>
Parma_Polyhedra_Library::Constraints_Reduction< D1, D2 >::Constraints_Reduction (  )  [inline]

Default constructor.

Definition at line 730 of file Partially_Reduced_Product.inlines.hh.

00730                                                      {
00731 }

template<typename D1, typename D2>
Parma_Polyhedra_Library::Constraints_Reduction< D1, D2 >::~Constraints_Reduction (  )  [inline]

Destructor.

Definition at line 753 of file Partially_Reduced_Product.inlines.hh.

00753                                                       {
00754 }


Member Function Documentation

template<typename D1, typename D2>
void Parma_Polyhedra_Library::Constraints_Reduction< D1, D2 >::product_reduce ( D1 &  d1,
D2 &  d2 
) [inline]

brief The constraints reduction operator for sharing constraints between the domains.

The minimized constraint system defining the domain element d1 is added to d2 and the minimized constraint system defining d2 is added to d1. In each case, the donor domain must provide a constraint system in minimal form; this must define a polyhedron in which the donor element is contained. The recipient domain selects a subset of these constraints that it can add to the recipient element. For example: if the domain D1 is the Grid domain and D2 the NNC Polyhedron domain, then only the equality constraints are copied from d1 to d2 and from d2 to d1.

Parameters:
d1 A pointset domain element;
d2 A pointset domain element;

Definition at line 734 of file Partially_Reduced_Product.inlines.hh.

References Parma_Polyhedra_Library::EMPTY, and Parma_Polyhedra_Library::swap().

00734                                                                  {
00735   if (d2.is_empty()) {
00736     if (!d1.is_empty()) {
00737       D1 new_d1(d1.space_dimension(), EMPTY);
00738       std::swap(d1, new_d1);
00739     }
00740   }
00741   else if (d1.is_empty()) {
00742     D2 new_d2(d2.space_dimension(), EMPTY);
00743     std::swap(d2, new_d2);
00744   }
00745   else {
00746     d1.refine_with_constraints(d2.minimized_constraints());
00747     d2.refine_with_constraints(d1.minimized_constraints());
00748   }
00749 }


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

Generated on Sat Oct 11 10:41:14 2008 for PPL by  doxygen 1.5.6