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

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

#include <Partially_Reduced_Product.defs.hh>

List of all members.

Public Member Functions

 Smash_Reduction ()
 Default constructor.
void product_reduce (D1 &d1, D2 &d2)
 The smash reduction operator for propagating emptiness between the domain elements d1 and d2.
 ~Smash_Reduction ()
 Destructor.

Detailed Description

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

This class provides the reduction method for the Smash_Product domain.

The reduction classes are used to instantiate the Partially_Reduced_Product domain. This class propagates emptiness between its components.

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


Constructor & Destructor Documentation

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

Default constructor.

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

00761                                          {
00762 }

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

Destructor.

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

00766                                           {
00767 }


Member Function Documentation

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

The smash reduction operator for propagating emptiness between the domain elements d1 and d2.

If either of the the domain elements d1 or d2 is empty then the other is also set empty.

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

Definition at line 454 of file Partially_Reduced_Product.templates.hh.

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

Referenced by Parma_Polyhedra_Library::Congruences_Reduction< D1, D2 >::product_reduce(), and Parma_Polyhedra_Library::Constraints_Reduction< D1, D2 >::product_reduce().

00454                                                            {
00455   if (d2.is_empty()) {
00456     if (!d1.is_empty()) {
00457       D1 new_d1(d1.space_dimension(), EMPTY);
00458       std::swap(d1, new_d1);
00459     }
00460   }
00461   else if (d1.is_empty()) {
00462     D2 new_d2(d2.space_dimension(), EMPTY);
00463     std::swap(d2, new_d2);
00464   }
00465 }


The documentation for this class was generated from the following files:
Generated on Sun Feb 27 16:20:29 2011 for PPL by  doxygen 1.6.3