[PPL-devel] [GIT] ppl/ppl(master): Implemented methods Pointset_Powerset:: drop_some_non_integer_points().

Roberto Bagnara bagnara at cs.unipr.it
Thu Mar 25 04:23:13 CET 2010


Module: ppl/ppl
Branch: master
Commit: b54b2fabc3bea07c599a68f6a8ba8db35476fe06
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=b54b2fabc3bea07c599a68f6a8ba8db35476fe06

Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date:   Thu Mar 25 07:22:25 2010 +0400

Implemented methods Pointset_Powerset::drop_some_non_integer_points().

---

 ...erface_generator_common_procedure_generators.m4 |    4 +-
 src/Pointset_Powerset.defs.hh                      |   33 ++++++++++++++++++++
 src/Pointset_Powerset.templates.hh                 |   25 +++++++++++++++
 3 files changed, 60 insertions(+), 2 deletions(-)

diff --git a/interfaces/ppl_interface_generator_common_procedure_generators.m4 b/interfaces/ppl_interface_generator_common_procedure_generators.m4
index 48cde25..e93d96b 100644
--- a/interfaces/ppl_interface_generator_common_procedure_generators.m4
+++ b/interfaces/ppl_interface_generator_common_procedure_generators.m4
@@ -90,8 +90,8 @@ ppl_ at CLASS@_remove_higher_space_dimensions/2 *nofail +all,
 ppl_ at CLASS@_expand_space_dimension/3 *nofail +all,
 ppl_ at CLASS@_fold_space_dimensions/3  +all,
 ppl_ at CLASS@_map_space_dimensions/2 +all,
-ppl_ at CLASS@_drop_some_non_integer_points/2 +simple -pointset_powerset,
-ppl_ at CLASS@_drop_some_non_integer_points_2/3 +simple -pointset_powerset,
+ppl_ at CLASS@_drop_some_non_integer_points/2 +simple,
+ppl_ at CLASS@_drop_some_non_integer_points_2/3 +simple,
 ppl_ at CLASS@_ascii_dump/1 +all,
 ppl_ at CLASS@_ at MEMBYTES@/2 +all,
 dnl
diff --git a/src/Pointset_Powerset.defs.hh b/src/Pointset_Powerset.defs.hh
index 6e6e362..849e971 100644
--- a/src/Pointset_Powerset.defs.hh
+++ b/src/Pointset_Powerset.defs.hh
@@ -681,6 +681,39 @@ public:
   */
   void unconstrain(const Variables_Set& vars);
 
+  /*! \brief
+    Possibly tightens \p *this by dropping some points with non-integer
+    coordinates.
+
+    \param complexity
+    The maximal complexity of any algorithms used.
+
+    \note
+    Currently there is no optimality guarantee, not even if
+    \p complexity is <CODE>ANY_COMPLEXITY</CODE>.
+  */
+   void drop_some_non_integer_points(Complexity_Class complexity
+                                    = ANY_COMPLEXITY);
+
+  /*! \brief
+    Possibly tightens \p *this by dropping some points with non-integer
+    coordinates for the space dimensions corresponding to \p vars.
+
+    \param vars
+    Points with non-integer coordinates for these variables/space-dimensions
+    can be discarded.
+
+    \param complexity
+    The maximal complexity of any algorithms used.
+
+    \note
+    Currently there is no optimality guarantee, not even if
+    \p complexity is <CODE>ANY_COMPLEXITY</CODE>.
+  */
+  void drop_some_non_integer_points(const Variables_Set& vars,
+                                    Complexity_Class complexity
+                                    = ANY_COMPLEXITY);
+
   //! Assigns to \p *this its topological closure.
   void topological_closure_assign();
 
diff --git a/src/Pointset_Powerset.templates.hh b/src/Pointset_Powerset.templates.hh
index 8e53200..d759e7b 100644
--- a/src/Pointset_Powerset.templates.hh
+++ b/src/Pointset_Powerset.templates.hh
@@ -625,6 +625,31 @@ Pointset_Powerset<PSET>::is_disjoint_from(const Pointset_Powerset& y) const {
 
 template <typename PSET>
 void
+Pointset_Powerset<PSET>
+::drop_some_non_integer_points(const Variables_Set& vars,
+			       Complexity_Class complexity) {
+  Pointset_Powerset& x = *this;
+  for (Sequence_iterator si = x.sequence.begin(),
+         s_end = x.sequence.end(); si != s_end; ++si)
+    si->pointset().drop_some_non_integer_points(vars, complexity);
+  x.reduced = false;
+  PPL_ASSERT_HEAVY(x.OK());
+}
+
+template <typename PSET>
+void
+Pointset_Powerset<PSET>
+::drop_some_non_integer_points(Complexity_Class complexity) {
+  Pointset_Powerset& x = *this;
+  for (Sequence_iterator si = x.sequence.begin(),
+         s_end = x.sequence.end(); si != s_end; ++si)
+    si->pointset().drop_some_non_integer_points(complexity);
+  x.reduced = false;
+  PPL_ASSERT_HEAVY(x.OK());
+}
+
+template <typename PSET>
+void
 Pointset_Powerset<PSET>::topological_closure_assign() {
   Pointset_Powerset& x = *this;
   for (Sequence_iterator si = x.sequence.begin(),




More information about the PPL-devel mailing list