[PPL-devel] [GIT] ppl/ppl(floating_point): Removed dummy linearization operators.

Fabio Bossi bossi at cs.unipr.it
Wed Sep 2 16:31:47 CEST 2009


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

Author: Fabio Bossi <bossi at cs.unipr.it>
Date:   Wed Sep  2 16:33:29 2009 +0200

Removed dummy linearization operators.
Implemented the linearization operator for
Opposite_Floating_Point_Expression.

---

 src/Division_Floating_Point_Expression.inlines.hh  |   10 ----------
 src/Makefile.am                                    |    5 ++++-
 ...iplication_Floating_Point_Expression.inlines.hh |   12 ------------
 src/Opposite_Floating_Point_Expression.defs.hh     |    2 +-
 src/Opposite_Floating_Point_Expression.inlines.hh  |    2 +-
 5 files changed, 6 insertions(+), 25 deletions(-)

diff --git a/src/Division_Floating_Point_Expression.inlines.hh b/src/Division_Floating_Point_Expression.inlines.hh
index 0b92afb..0d0c96b 100644
--- a/src/Division_Floating_Point_Expression.inlines.hh
+++ b/src/Division_Floating_Point_Expression.inlines.hh
@@ -54,16 +54,6 @@ Division_Floating_Point_Expression<FP_Interval_Type, FP_Format>
   std::swap(second_operand, y.second_operand);
 }
 
-  // FIXME: add function body
-template <typename FP_Interval_Type, typename FP_Format>
-inline
-typename Division_Floating_Point_Expression<FP_Interval_Type, FP_Format>
-::FP_Linear_Form Division_Floating_Point_Expression<FP_Interval_Type, FP_Format>
-::linearize(const FP_Interval_Abstract_Store& store) const {
-  FP_Linear_Form result = FP_Linear_Form();
-  return result;
-}
-
 } // namespace Parma_Polyhedra_Library
 
 namespace std {
diff --git a/src/Makefile.am b/src/Makefile.am
index 90a3c86..a12639d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -358,7 +358,10 @@ Sum_Floating_Point_Expression.templates.hh \
 Difference_Floating_Point_Expression.types.hh \
 Difference_Floating_Point_Expression.defs.hh \
 Difference_Floating_Point_Expression.inlines.hh \
-Difference_Floating_Point_Expression.templates.hh
+Difference_Floating_Point_Expression.templates.hh \
+Opposite_Floating_Point_Expression.types.hh \
+Opposite_Floating_Point_Expression.defs.hh \
+Opposite_Floating_Point_Expression.inlines.hh
 #Any_Pointset.types.hh \
 #Any_Pointset.defs.hh \
 #Any_Pointset.inlines.hh \
diff --git a/src/Multiplication_Floating_Point_Expression.inlines.hh b/src/Multiplication_Floating_Point_Expression.inlines.hh
index 1784476..f0206bd 100644
--- a/src/Multiplication_Floating_Point_Expression.inlines.hh
+++ b/src/Multiplication_Floating_Point_Expression.inlines.hh
@@ -56,18 +56,6 @@ Multiplication_Floating_Point_Expression<FP_Interval_Type, FP_Format>
   std::swap(second_operand, y.second_operand);
 }
 
-
-  // FIXME: add function body
-template <typename FP_Interval_Type, typename FP_Format>
-inline
-typename Multiplication_Floating_Point_Expression<FP_Interval_Type,FP_Format>
-::FP_Linear_Form
-Multiplication_Floating_Point_Expression<FP_Interval_Type, FP_Format>
-::linearize(const FP_Interval_Abstract_Store& store) const {
-  FP_Linear_Form result = FP_Linear_Form();
-  return result;
-}
-
 } // namespace Parma_Polyhedra_Library
 
 namespace std {
diff --git a/src/Opposite_Floating_Point_Expression.defs.hh b/src/Opposite_Floating_Point_Expression.defs.hh
index 536f4c3..2a04cac 100644
--- a/src/Opposite_Floating_Point_Expression.defs.hh
+++ b/src/Opposite_Floating_Point_Expression.defs.hh
@@ -43,7 +43,7 @@ namespace Parma_Polyhedra_Library {
 
 template <typename FP_Interval_Type, typename FP_Format>
 class Opposite_Floating_Point_Expression
-: public Floating_Point_Expression<FP_Interval_Type, FP_Format> {
+  : public Floating_Point_Expression<FP_Interval_Type, FP_Format> {
 
 public:
 
diff --git a/src/Opposite_Floating_Point_Expression.inlines.hh b/src/Opposite_Floating_Point_Expression.inlines.hh
index 0e59f37..a99ea05 100644
--- a/src/Opposite_Floating_Point_Expression.inlines.hh
+++ b/src/Opposite_Floating_Point_Expression.inlines.hh
@@ -56,7 +56,7 @@ inline typename Opposite_Floating_Point_Expression<FP_Interval_Type,
                                                    FP_Format>::FP_Linear_Form
 Opposite_Floating_Point_Expression<FP_Interval_Type, FP_Format>
 ::linearize(const FP_Interval_Abstract_Store& store) const {
-  // FIXME: implement this.
+  return -(operand->linearize(store)).
 }
 
 } // namespace Parma_Polyhedra_Library




More information about the PPL-devel mailing list