#179: Float precision issues with epsilon
---------------------+------------------------------------------------------
Reporter: lazzara | Owner: Olena Team
Type: defect | Status: new
Priority: major | Milestone: Olena 1.0
Component: Milena | Version: 1.0
Keywords: |
---------------------+------------------------------------------------------
In level::stretch, we use float variables to do the following:
{{{
float
epsilon = mln_epsilon(float),
M = mln_max(V) + 0.5f - epsilon,
m = 0.0f - 0.5f + epsilon;
}}}
'm' is precise enough since it is a really low value. However, M is not
precise enough since mln_max(V) may be a high value, so we will loose
decimal precision if we store that number as float. As a result, M is
always equal to 'mln_max(V) + 0.5' which introduce a bug in
level::stretch.
This issue can be avoided by using double variables instead, but do we
really want that?
Don't we want to handle that issue in a more generic way?
--
Ticket URL: <https://trac.lrde.org/olena/ticket/179>
Olena <http://olena.lrde.epita.fr>
Olena, a generic and efficient C++ image processing library.
#165: Separate sites sets from their psites?
----------------------+-----------------------------------------------------
Reporter: levill_r | Owner: Olena Team
Type: proposal | Status: new
Priority: major | Milestone: Olena 1.0
Component: Milena | Version: 1.0
Keywords: |
----------------------+-----------------------------------------------------
Many files containing the definitions site sets, located in
source:branches/cleanup-2008/milena/mln/core/site_set/, include the
related psite and piters. Split them into several files? (And add
convenience headers including all of them?)
--
Ticket URL: <https://trac.lrde.org/olena/ticket/165>
Olena <http://olena.lrde.epita.fr>
Olena, a generic and efficient C++ image processing library.
* milena/doc/examples/tuto2_first_image.cc,
* milena/doc/examples/tuto3_rw_image.cc,
* milena/doc/examples/tuto4_genericity_and_algorithms.cc: Add
copyright headers.
---
milena/ChangeLog | 9 ++++++
milena/doc/examples/tuto2_first_image.cc | 27 ++++++++++++++++++++
milena/doc/examples/tuto3_rw_image.cc | 27 ++++++++++++++++++++
.../examples/tuto4_genericity_and_algorithms.cc | 27 ++++++++++++++++++++
4 files changed, 90 insertions(+), 0 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 030398e..40e09ce 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,14 @@
2009-07-13 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+ Add missing headers to doc examples.
+
+ * doc/examples/tuto2_first_image.cc,
+ * doc/examples/tuto3_rw_image.cc,
+ * doc/examples/tuto4_genericity_and_algorithms.cc: Add
+ copyright headers.
+
+2009-07-13 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+
* tests/tools/pretty_check.sh: Correctly grep XFAIL and FAIL tests
output.
diff --git a/milena/doc/examples/tuto2_first_image.cc b/milena/doc/examples/tuto2_first_image.cc
index 7515a8e..7b4cee7 100644
--- a/milena/doc/examples/tuto2_first_image.cc
+++ b/milena/doc/examples/tuto2_first_image.cc
@@ -1,3 +1,30 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to produce
+// an executable, this file does not by itself cause the resulting
+// executable to be covered by the GNU General Public License. This
+// exception does not however invalidate any other reasons why the
+// executable file might be covered by the GNU General Public License.
+
+/// \file
+
#include <mln/core/image/image2d.hh>
#include <mln/make/image.hh>
#include <mln/debug/println.hh>
diff --git a/milena/doc/examples/tuto3_rw_image.cc b/milena/doc/examples/tuto3_rw_image.cc
index 7bc10d8..14ba056 100644
--- a/milena/doc/examples/tuto3_rw_image.cc
+++ b/milena/doc/examples/tuto3_rw_image.cc
@@ -1,3 +1,30 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to produce
+// an executable, this file does not by itself cause the resulting
+// executable to be covered by the GNU General Public License. This
+// exception does not however invalidate any other reasons why the
+// executable file might be covered by the GNU General Public License.
+
+/// \file
+
#include <mln/core/image/image2d.hh>
#include <mln/value/rgb8.hh>
#include <mln/data/fill.hh>
diff --git a/milena/doc/examples/tuto4_genericity_and_algorithms.cc b/milena/doc/examples/tuto4_genericity_and_algorithms.cc
index 2fd1413..b906a60 100644
--- a/milena/doc/examples/tuto4_genericity_and_algorithms.cc
+++ b/milena/doc/examples/tuto4_genericity_and_algorithms.cc
@@ -1,3 +1,30 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to produce
+// an executable, this file does not by itself cause the resulting
+// executable to be covered by the GNU General Public License. This
+// exception does not however invalidate any other reasons why the
+// executable file might be covered by the GNU General Public License.
+
+/// \file
+
#include <mln/core/image/image2d.hh>
#include <mln/core/image/dmorph/image_if.hh>
#include <mln/core/routine/duplicate.hh>
--
1.5.6.5
---
milena/ChangeLog | 5 +++++
milena/tests/tools/pretty_check.sh | 20 ++++++++++----------
2 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 7fe6681..030398e 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,8 @@
+2009-07-13 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+
+ * tests/tools/pretty_check.sh: Correctly grep XFAIL and FAIL tests
+ output.
+
2009-07-13 Roland Levillain <roland(a)lrde.epita.fr>
Do not use Doxygen-style comments within an implementation.
diff --git a/milena/tests/tools/pretty_check.sh b/milena/tests/tools/pretty_check.sh
index a13fc62..9ba1635 100755
--- a/milena/tests/tools/pretty_check.sh
+++ b/milena/tests/tools/pretty_check.sh
@@ -1,18 +1,18 @@
#!/bin/sh
# Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-#
+#
# This file is part of Olena.
-#
+#
# Olena is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, version 2 of the License.
-#
+#
# Olena is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
@@ -90,7 +90,7 @@ fi
if [ -z "$TEST_CXX" ]; then
TEST_CXX="$CXX"
fi
-
+
gcc_wrapper="$PWD/$output_directory/gcc-wrapper.sh"
cleanup_last_results()
@@ -140,7 +140,7 @@ end_tmp_files()
{
local ef="error_entry_html.tmp"
local wf="warning_entry_html.tmp"
- close_dir_entry $ef
+ close_dir_entry $ef
close_dir_entry $wf
echo "</ol><br>" >> $ef
echo "</ol><br>" >> $wf
@@ -178,7 +178,7 @@ open_dir()
</table>
<br>
EOF
-
+
}
close_dir()
@@ -384,7 +384,7 @@ main()
# failed during execution.
if [ "$status" == "FAIL" ] || [ "$status" == "XFAIL" ]; then
- grep -B 2 ": $name\$" $check_log | head -n 1 > "$dir/$name.log"
+ grep -B 1 "X*FAIL: $name\$" $check_log | head -n 1 > "$dir/$name.log"
error_entry $name $bdir error $status
error_node $name $log "./$name" "$dir/$name" $bdir error $status
fi
@@ -417,11 +417,11 @@ main()
fi
done
done
-
+
# Build pretty output.
end_tmp_files
make_output_file
-
+
# Cleanup temporary files.
cleanup_tmp_files
cleanup_gcc_wrapper
--
1.5.6.5