
Module: ppl/ppl Branch: floating_point Commit: e2e00d72c5631721e7ffc88251c5c597718d9632 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=e2e00d72c5631...
Author: Fabio Bossi bossi@cs.unipr.it Date: Tue Sep 1 09:43:30 2009 +0200
Corrected the interface of method linearize.
---
src/Constant_Floating_Point_Expression.defs.hh | 8 +++++--- src/Constant_Floating_Point_Expression.inlines.hh | 6 ++++-- src/Floating_Point_Expression.defs.hh | 5 +++-- 3 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/src/Constant_Floating_Point_Expression.defs.hh b/src/Constant_Floating_Point_Expression.defs.hh index bfe4aa6..74bb678 100644 --- a/src/Constant_Floating_Point_Expression.defs.hh +++ b/src/Constant_Floating_Point_Expression.defs.hh @@ -1,4 +1,5 @@ -/* Declarations for the Constant_Floating_Point_Expression class and its constituents. +/* Declarations for the Constant_Floating_Point_Expression class and + its constituents. Copyright (C) 2001-2009 Roberto Bagnara bagnara@cs.unipr.it
This file is part of the Parma Polyhedra Library (PPL). @@ -56,12 +57,13 @@ public:
~Constant_Floating_Point_Expression();
- FP_Linear_Form linearize(FP_Interval_Abstract_Store store); + FP_Linear_Form linearize(const FP_Interval_Abstract_Store& store) const;
private:
+ // FIXME: this is a temporary solution: we should find a way to convert + // a floating point with an arbitrary format to an interval. boundary_type l_bound; - boundary_type u_bound;
}; // class Constant_Floating_Point_Expression diff --git a/src/Constant_Floating_Point_Expression.inlines.hh b/src/Constant_Floating_Point_Expression.inlines.hh index 9bca950..3ddbf40 100644 --- a/src/Constant_Floating_Point_Expression.inlines.hh +++ b/src/Constant_Floating_Point_Expression.inlines.hh @@ -41,8 +41,10 @@ Constant_Floating_Point_Expression<FP_Interval_Type, FP_Format>:: ~Constant_Floating_Point_Expression() {}
template <typename FP_Interval_Type, typename FP_Format> -inline typename Constant_Floating_Point_Expression<FP_Interval_Type, FP_Format>::FP_Linear_Form -Constant_Floating_Point_Expression<FP_Interval_Type, FP_Format>::linearize(FP_Interval_Abstract_Store store) { +inline typename Constant_Floating_Point_Expression<FP_Interval_Type, + FP_Format>::FP_Linear_Form +Constant_Floating_Point_Expression<FP_Interval_Type, FP_Format>::linearize( +const FP_Interval_Abstract_Store& store) const {
FP_Interval_Type result_interval(l_bound); FP_Interval_Type result_upper_bound(u_bound); diff --git a/src/Floating_Point_Expression.defs.hh b/src/Floating_Point_Expression.defs.hh index cebc46d..f702d78 100644 --- a/src/Floating_Point_Expression.defs.hh +++ b/src/Floating_Point_Expression.defs.hh @@ -30,7 +30,7 @@ site: http://www.cs.unipr.it/ppl/ . */
namespace Parma_Polyhedra_Library {
- template <typename FP_Interval_Type, typename FP_Format> +template <typename FP_Interval_Type, typename FP_Format> class Floating_Point_Expression {
public: @@ -45,7 +45,8 @@ public:
virtual ~Floating_Point_Expression();
- virtual FP_Linear_Form linearize(FP_Interval_Abstract_Store store) = 0; + virtual FP_Linear_Form linearize( + const FP_Interval_Abstract_Store& store) const = 0;
}; // class Floating_Point_Expression