#include <Partially_Reduced_Product.defs.hh>
Public Member Functions | |
Constraints_Reduction () | |
Default constructor. | |
void | product_reduce (D1 &d1, D2 &d2) |
~Constraints_Reduction () | |
Destructor. |
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.
Parma_Polyhedra_Library::Constraints_Reduction< D1, D2 >::Constraints_Reduction | ( | ) | [inline] |
Parma_Polyhedra_Library::Constraints_Reduction< D1, D2 >::~Constraints_Reduction | ( | ) | [inline] |
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
.
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 }