* mln/core/image/complex_neighborhoods.hh: New.
Replace...
* mln/core/image/complex_lower_neighborhood.hh,
* mln/core/image/complex_higher_neighborhood.hh,
* mln/core/image/complex_lower_higher_neighborhood.hh:
...these files.
Remove.
* tests/core/image/complex_image.cc: Adjust.
---
milena/ChangeLog | 13 +++++
.../mln/core/image/complex_higher_neighborhood.hh | 53 --------------------
.../mln/core/image/complex_lower_neighborhood.hh | 53 --------------------
...er_neighborhood.hh => complex_neighborhoods.hh} | 38 ++++++++++++--
milena/tests/core/image/complex_image.cc | 10 ++--
5 files changed, 49 insertions(+), 118 deletions(-)
delete mode 100644 milena/mln/core/image/complex_higher_neighborhood.hh
delete mode 100644 milena/mln/core/image/complex_lower_neighborhood.hh
rename milena/mln/core/image/{complex_lower_higher_neighborhood.hh =>
complex_neighborhoods.hh} (60%)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index aa31232..28c9b28 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,18 @@
2008-10-17 Roland Levillain <roland(a)lrde.epita.fr>
+ Factor neighborhoods of complex images.
+
+ * mln/core/image/complex_neighborhoods.hh: New.
+ Replace...
+ * mln/core/image/complex_lower_neighborhood.hh,
+ * mln/core/image/complex_higher_neighborhood.hh,
+ * mln/core/image/complex_lower_higher_neighborhood.hh:
+ ...these files.
+ Remove.
+ * tests/core/image/complex_image.cc: Adjust.
+
+2008-10-17 Roland Levillain <roland(a)lrde.epita.fr>
+
Fix and factor windows of complex images.
* mln/core/image/complex_windows.hh: New.
diff --git a/milena/mln/core/image/complex_higher_neighborhood.hh
b/milena/mln/core/image/complex_higher_neighborhood.hh
deleted file mode 100644
index d68051a..0000000
--- a/milena/mln/core/image/complex_higher_neighborhood.hh
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (C) 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
-// of the GNU General Public License version 2 as published by the
-// Free Software Foundation.
-//
-// This library 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 this library; see the file COPYING. If not, write to
-// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02111-1307, USA.
-//
-// As a special exception, you may use this file as part of a free
-// software library 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.
-
-#ifndef MLN_CORE_IMAGE_COMPLEX_HIGHER_NEIGHBORHOOD_HH
-# define MLN_CORE_IMAGE_COMPLEX_HIGHER_NEIGHBORHOOD_HH
-
-/// \file mln/core/image/complex_higher_neighborhood.hh
-/// \brief A neighborhood centered on a n-face of complex returning its
-/// adjacent (n+1)-faces.
-
-# include <mln/core/internal/complex_neighborhood_base.hh>
-# include <mln/topo/adj_higher_face_iter.hh>
-
-
-namespace mln
-{
-
- template <unsigned D, typename G>
- struct complex_higher_neighborhood
- : internal::complex_neighborhood_base< D, G,
- topo::adj_higher_face_fwd_iter<D>,
- topo::adj_higher_face_bkd_iter<D>,
- complex_higher_neighborhood<D, G> >
- {
- };
-
-} // end of namespace mln
-
-#endif // ! MLN_CORE_IMAGE_COMPLEX_HIGHER_NEIGHBORHOOD_HH
diff --git a/milena/mln/core/image/complex_lower_neighborhood.hh
b/milena/mln/core/image/complex_lower_neighborhood.hh
deleted file mode 100644
index c7fc882..0000000
--- a/milena/mln/core/image/complex_lower_neighborhood.hh
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (C) 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
-// of the GNU General Public License version 2 as published by the
-// Free Software Foundation.
-//
-// This library 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 this library; see the file COPYING. If not, write to
-// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02111-1307, USA.
-//
-// As a special exception, you may use this file as part of a free
-// software library 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.
-
-#ifndef MLN_CORE_IMAGE_COMPLEX_LOWER_NEIGHBORHOOD_HH
-# define MLN_CORE_IMAGE_COMPLEX_LOWER_NEIGHBORHOOD_HH
-
-/// \file mln/core/image/complex_lower_neighborhood.hh
-/// \brief A neighborhood centered on a n-face of complex returning its
-/// adjacent (n-1)-faces.
-
-# include <mln/core/internal/complex_neighborhood_base.hh>
-# include <mln/topo/adj_lower_face_iter.hh>
-
-
-namespace mln
-{
-
- template <unsigned D, typename G>
- struct complex_lower_neighborhood
- : internal::complex_neighborhood_base< D, G,
- topo::adj_lower_face_fwd_iter<D>,
- topo::adj_lower_face_bkd_iter<D>,
- complex_lower_neighborhood<D, G> >
- {
- };
-
-} // end of namespace mln
-
-#endif // ! MLN_CORE_IMAGE_COMPLEX_LOWER_NEIGHBORHOOD_HH
diff --git a/milena/mln/core/image/complex_lower_higher_neighborhood.hh
b/milena/mln/core/image/complex_neighborhoods.hh
similarity index 60%
rename from milena/mln/core/image/complex_lower_higher_neighborhood.hh
rename to milena/mln/core/image/complex_neighborhoods.hh
index 593982d..174f263 100644
--- a/milena/mln/core/image/complex_lower_higher_neighborhood.hh
+++ b/milena/mln/core/image/complex_neighborhoods.hh
@@ -25,20 +25,46 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_CORE_IMAGE_COMPLEX_LOWER_HIGHER_NEIGHBORHOOD_HH
-# define MLN_CORE_IMAGE_COMPLEX_LOWER_HIGHER_NEIGHBORHOOD_HH
+#ifndef MLN_CORE_IMAGE_COMPLEX_NEIGHBORHOODS_HH
+# define MLN_CORE_IMAGE_COMPLEX_NEIGHBORHOODS_HH
-/// \file mln/core/image/complex_lower_higher_neighborhood.hh
-/// \brief A neighborhood centered on a n-face of complex returning its
-/// adjacent (n-1)-faces and (n+1)-faces.
+/// \file mln/core/image/complex_neighborhoods.hh
+/// \brief Definitions of some neighborhoods of complex images.
# include <mln/core/internal/complex_neighborhood_base.hh>
+
+# include <mln/topo/adj_lower_face_iter.hh>
+# include <mln/topo/adj_higher_face_iter.hh>
# include <mln/topo/adj_lower_higher_face_iter.hh>
namespace mln
{
+ /// \brief Neighborhood centered on an n-face of complex returning
+ /// its adjacent (n-1)-faces.
+ template <unsigned D, typename G>
+ struct complex_lower_neighborhood
+ : internal::complex_neighborhood_base< D, G,
+ topo::adj_lower_face_fwd_iter<D>,
+ topo::adj_lower_face_bkd_iter<D>,
+ complex_lower_neighborhood<D, G> >
+ {
+ };
+
+ /// \brief Neighborhood centered on an n-face of complex returning
+ /// its adjacent (n+1)-faces.
+ template <unsigned D, typename G>
+ struct complex_higher_neighborhood
+ : internal::complex_neighborhood_base< D, G,
+ topo::adj_higher_face_fwd_iter<D>,
+ topo::adj_higher_face_bkd_iter<D>,
+ complex_higher_neighborhood<D, G> >
+ {
+ };
+
+ /// \brief Neighborhood centered on an n-face of complex returning
+ /// its adjacent (n-1)-faces and (n+1)-faces.
template <unsigned D, typename G>
struct complex_lower_higher_neighborhood
: internal::complex_neighborhood_base<
@@ -52,4 +78,4 @@ namespace mln
} // end of namespace mln
-#endif // ! MLN_CORE_IMAGE_COMPLEX_LOWER_HIGHER_NEIGHBORHOOD_HH
+#endif // ! MLN_CORE_IMAGE_COMPLEX_NEIGHBORHOODS_HH
diff --git a/milena/tests/core/image/complex_image.cc
b/milena/tests/core/image/complex_image.cc
index 4b81713..a2252ad 100644
--- a/milena/tests/core/image/complex_image.cc
+++ b/milena/tests/core/image/complex_image.cc
@@ -37,9 +37,7 @@
#include <mln/core/image/complex_image.hh>
// FIXME: Include these elsewhere? (In complex_image.hh?)
-#include <mln/core/image/complex_lower_neighborhood.hh>
-#include <mln/core/image/complex_higher_neighborhood.hh>
-#include <mln/core/image/complex_lower_higher_neighborhood.hh>
+#include <mln/core/image/complex_neighborhoods.hh>
#include <mln/core/image/complex_neighborhood_piter.hh>
/* FIXME: Split this test (and maybe factor common parts, like the
@@ -215,9 +213,9 @@ int main()
- iterators on N-faces with N in a subset of [0, D];
- etc. */
- // ---------------------------------------- //
- // Iterators on windows and neighborhoods. //
- // ---------------------------------------- //
+ // ---------------------------- //
+ // Iterators on neighborhoods. //
+ // ---------------------------- //
// FIXME: Factor: these three test cases only differ by their
// neighborhoods.
--
1.6.0.1