PPL  1.2
Parma_Polyhedra_Library::Smash_Reduction< D1, D2 > Class Template Reference

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

#include <Partially_Reduced_Product_defs.hh>

Public Member Functions

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

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 107 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 771 of file Partially_Reduced_Product_inlines.hh.

771  {
772 }
template<typename D1 , typename D2 >
Parma_Polyhedra_Library::Smash_Reduction< D1, D2 >::~Smash_Reduction ( )
inline

Destructor.

Definition at line 776 of file Partially_Reduced_Product_inlines.hh.

776  {
777 }

Member Function Documentation

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

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
d1A pointset domain element;
d2A pointset domain element;

Definition at line 506 of file Partially_Reduced_Product_templates.hh.

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

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

506  {
507  using std::swap;
508  if (d2.is_empty()) {
509  if (!d1.is_empty()) {
510  D1 new_d1(d1.space_dimension(), EMPTY);
511  swap(d1, new_d1);
512  }
513  }
514  else if (d1.is_empty()) {
515  D2 new_d2(d2.space_dimension(), EMPTY);
516  swap(d2, new_d2);
517  }
518 }
The empty element, i.e., the empty set.
void swap(CO_Tree &x, CO_Tree &y)

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