https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Finish the conversion of level::sort_points to level::sort_psites.
* mln/level/sort_points.hh: Remove.
* mln/level/all.hh: s/sort_point.hh/sort_psite.hh/.
* mln/labeling/regional_minima.hh: s/point/psite/.
* mln/labeling/regional_minima.hh
(impl::regional_minima_functor<I_, N_, L_>::regional_minima_functor):
Remove outdated FIXME.
* tests/level/sort_points.cc, tests/level/sort_points_full.cc:
Rename as...
* tests/level/sort_psites.cc, tests/level/sort_psites_full.cc:
...these.
s/sort_points/sort_psites/.
* tests/level/Makefile.am (check_PROGRAMS):
s/sort_points/sort_psites/.
Add sort_psites_full.
(sort_points_SOURCES): Likewise.
Rename as...
(sort_psites_SOURCES): ...this.
(sort_psites_full_SOURCES): New.
mln/labeling/regional_maxima.hh | 5 ++---
mln/labeling/regional_minima.hh | 6 ++----
mln/level/all.hh | 2 +-
tests/level/Makefile.am | 8 ++++++--
tests/level/sort_psites.cc | 12 ++++++------
tests/level/sort_psites_full.cc | 10 +++++-----
6 files changed, 22 insertions(+), 21 deletions(-)
Index: mln/level/all.hh
--- mln/level/all.hh (revision 1778)
+++ mln/level/all.hh (working copy)
@@ -68,7 +68,7 @@
# include <mln/level/naive/all.hh>
# include <mln/level/paste.hh>
# include <mln/level/saturate.hh>
-# include <mln/level/sort_points.hh>
+# include <mln/level/sort_psites.hh>
# include <mln/level/stretch.hh>
# include <mln/level/take.hh>
# include <mln/level/to_enc.hh>
Index: mln/labeling/regional_minima.hh
--- mln/labeling/regional_minima.hh (revision 1778)
+++ mln/labeling/regional_minima.hh (working copy)
@@ -107,8 +107,7 @@
regional_minima_functor(const I_& input, const N_& nbh)
: input(input),
nbh(nbh),
- s(level::sort_psites_increasing(input)), // FIXME:
- // sort_psites_increasing
+ s(level::sort_psites_increasing(input)),
attr(input.domain())
{
}
@@ -122,8 +121,7 @@
template <typename I, typename N, typename L>
mln_ch_value(I, L)
- regional_minima_(const I& input, const N& nbh,
- L& nlabels)
+ regional_minima_(const I& input, const N& nbh, L& nlabels)
{
trace::entering("labeling::impl::generic::regional_minima_");
Index: mln/labeling/regional_maxima.hh
--- mln/labeling/regional_maxima.hh (revision 1778)
+++ mln/labeling/regional_maxima.hh (working copy)
@@ -38,7 +38,7 @@
# include <mln/core/concept/neighborhood.hh>
# include <mln/canvas/labeling.hh>
# include <mln/level/fill.hh>
-# include <mln/level/sort_points.hh>
+# include <mln/level/sort_psites.hh>
namespace mln
@@ -108,8 +108,7 @@
regional_maxima_functor(const I_& input, const N_& nbh)
: input(input),
nbh(nbh),
- s(level::sort_points_decreasing(input)), // FIXME:
- // sort_psites_decreasing
+ s(level::sort_psites_decreasing(input)),
attr(input.domain())
{
}
Index: tests/level/sort_psites.cc
--- tests/level/sort_psites.cc (revision 1777)
+++ tests/level/sort_psites.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,14 +25,14 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/level/sort_points.cc
+/*! \file tests/level/sort_psites.cc
*
- * \brief Tests on mln::level::sort_points.
+ * \brief Tests on mln::level::sort_psites.
*/
#include <mln/core/image2d.hh>
#include <mln/debug/iota.hh>
-#include <mln/level/sort_points.hh>
+#include <mln/level/sort_psites.hh>
#include <mln/core/p_array.hh>
@@ -42,8 +42,8 @@
image2d<int> ima(3, 3);
debug::iota (ima);
- p_array<point2d> array_inc = level::sort_points_increasing(ima);
- p_array<point2d> array_dec = level::sort_points_decreasing(ima);
+ p_array<point2d> array_inc = level::sort_psites_increasing(ima);
+ p_array<point2d> array_dec = level::sort_psites_decreasing(ima);
p_array<point2d> array_inc_ref;
p_array<point2d> array_dec_ref;
Index: tests/level/sort_psites_full.cc
--- tests/level/sort_psites_full.cc (revision 1777)
+++ tests/level/sort_psites_full.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -51,7 +51,7 @@
#include <mln/level/saturate.hh>
#include <mln/level/paste.hh>
-#include <mln/level/sort_points.hh>
+#include <mln/level/sort_psites.hh>
@@ -104,8 +104,8 @@
{
I& input = exact(input_);
- p_array<J> array_inc = level::sort_points_increasing(input);
- p_array<J> array_dec = level::sort_points_decreasing(input);
+ p_array<J> array_inc = level::sort_psites_increasing(input);
+ p_array<J> array_dec = level::sort_psites_decreasing(input);
mln_assertion(array_inc == array_inc_ref);
mln_assertion(array_dec == array_dec_ref);
@@ -306,7 +306,7 @@
int rows = 8;
int cols = 8;
- std::cerr << "Tests level::sort_points:" << std::endl;
+ std::cerr << "Tests level::sort_psites:" << std::endl;
std::cerr << "in int:" << std::endl;
chk<int>(slis, rows, cols);
std::cerr << "in unsigned:" << std::endl;
Index: tests/level/Makefile.am
--- tests/level/Makefile.am (revision 1778)
+++ tests/level/Makefile.am (working copy)
@@ -20,7 +20,8 @@
memset_ \
paste \
saturate \
- sort_points \
+ sort_psites \
+ sort_psites_full \
stretch \
take \
transform
@@ -40,9 +41,12 @@
memset__SOURCES = memset_.cc
paste_SOURCES = paste.cc
saturate_SOURCES = saturate.cc
-sort_points_SOURCES = sort_points.cc
+sort_psites_SOURCES = sort_psites.cc
stretch_SOURCES = stretch.cc
take_SOURCES = take.cc
transform_SOURCES = transform.cc
+# Lengthy tests.
+sort_psites_full_SOURCES = sort_psites_full.cc
+
TESTS = $(check_PROGRAMS)