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)
 ~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 92 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 447 of file Partially_Reduced_Product.templates.hh.

00447                                          {
00448 }

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

Destructor.

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

00466                                           {
00467 }


Member Function Documentation

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

brief 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 451 of file Partially_Reduced_Product.templates.hh.

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

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


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