Olena-patches
Threads by month
- ----- 2025 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- 9625 discussions
https://svn.lrde.epita.fr/svn/oln/trunk/milena/sandbox
Index: ChangeLog
from Ugo Jardonnet <jardonnet(a)lrde.epita.fr>
Add few results about final_qk.
bunch of results : _1 and _2 means using stddev 1 or 2 times.
* jardonnet/test/final: New.
* jardonnet/test/final/final_qk_1.ppm: New.
* jardonnet/test/final/no_final.ppm: New.
* jardonnet/test/final/final_qk_2.ppm: New.
* jardonnet/test/final/final_qk2_1.ppm: New.
* jardonnet/test/final/final_qk2_2.ppm: New.
* jardonnet/registration/final_qk.hh: Update, inverse translation.
* jardonnet/registration/icp.hh: Update, cleanup.
final_qk.hh | 2 ++
icp.hh | 12 ++----------
2 files changed, 4 insertions(+), 10 deletions(-)
Index: jardonnet/test/final/final_qk_1.ppm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: jardonnet/test/final/final_qk_1.ppm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Index: jardonnet/test/final/no_final.ppm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: jardonnet/test/final/no_final.ppm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Index: jardonnet/test/final/final_qk_2.ppm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: jardonnet/test/final/final_qk_2.ppm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Index: jardonnet/test/final/final_qk2_1.ppm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: jardonnet/test/final/final_qk2_1.ppm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Index: jardonnet/test/final/final_qk2_2.ppm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: jardonnet/test/final/final_qk2_2.ppm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Index: jardonnet/registration/final_qk.hh
--- jardonnet/registration/final_qk.hh (revision 1958)
+++ jardonnet/registration/final_qk.hh (working copy)
@@ -59,6 +59,8 @@
quat7<P::dim> qk = match(newc, mu_newc, newc, map, newc.npoints());
+ qk._qT = - qk._qT; // FIXME : why?
+
return qk;
}
Index: jardonnet/registration/icp.hh
--- jardonnet/registration/icp.hh (revision 1958)
+++ jardonnet/registration/icp.hh (working copy)
@@ -192,20 +192,12 @@
mln_precondition(cloud.npoints() != 0);
// Shuffle cloud
- for (size_t i = 0; i < cloud.npoints(); i++)
- {
- size_t r = rand() % cloud.npoints();
- P tmp;
- tmp = cloud[i];
- cloud.hook_()[i] = cloud[r];
- cloud.hook_()[r] = tmp;
- }
+ shuffle(cloud);
//init rigid transform qk
quat7<P::dim> qk;
-
#ifndef NDEBUG // FIXME: theo
image2d<value::rgb8> tmp(500,800);
level::fill(tmp, literal::black);
@@ -244,7 +236,7 @@
if (tmp.has(qp))
tmp(qp) = c;
}
- if (e == 0)
+ //if (e == 0)
io::ppm::save(tmp, "tmp.ppm");
}
#endif
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena/sandbox
Index: ChangeLog
from Ugo Jardonnet <jardonnet(a)lrde.epita.fr>
Add functions on box : enlarge and bigger.
* jardonnet/registration/tools.hh (enlarge,bigger): Add.
* jardonnet/test/icp.cc: Update: use enlarge and bigger.
registration/tools.hh | 26 +++++++++++++++-----------
test/icp.cc | 12 +++++-------
2 files changed, 20 insertions(+), 18 deletions(-)
Index: jardonnet/registration/tools.hh
--- jardonnet/registration/tools.hh (revision 1957)
+++ jardonnet/registration/tools.hh (working copy)
@@ -147,15 +147,17 @@
template <typename P>
inline
- const box_<P>& //dif
+ box_<P> //dif
enlarge(const box_<P>& box, unsigned b)
{
+ box_<P> nbox(box);
+
for (unsigned i = 0; i < P::dim; ++i)
{
- box.pmin()[i] -= b;
- box.pmax()[i] += b;
+ nbox.pmin()[i] -= b;
+ nbox.pmax()[i] += b;
}
- return box;
+ return nbox;
}
template <typename P>
@@ -163,8 +165,11 @@
{
P pmin,pmax;
- pmin = min(a.pmin(), b.pmin());
- pmax = max(a.pmax(), b.pmax());
+ for (unsigned i = 0; i < P::dim; i++)
+ {
+ pmin[i] = (a.pmin()[i] < b.pmin()[i]) ? a.pmin()[i] : b.pmin()[i];
+ pmax[i] = (a.pmax()[i] > b.pmax()[i]) ? a.pmax()[i] : b.pmax()[i];
+ }
return box_<P>(pmin, pmax);
}
@@ -221,7 +226,7 @@
// to_pointNd
- //FIXME: Should we really provide this
+ //FIXME: Should be call projection
//point3d -> point2d
template <typename T>
inline
@@ -230,6 +235,7 @@
{
return point_<grid::square, T>(p[0], p[1]);
}
+
//point2d -> point2d
template <typename T>
inline
@@ -287,10 +293,8 @@
mln_piter(image3d<T>) p(img3d.domain());
for_all(p)
- {
- if (p[2] == 0)
img3d(p) = exact(img)(point2d(p[0],p[1]));
- }
+
return img3d;
}
@@ -299,6 +303,7 @@
namespace algebra
{
+ // transpose
template<unsigned n, unsigned m, typename T>
mat<m,n,T>
trans(const mat<n,m,T>& matrice)
@@ -311,7 +316,6 @@
}
// trace
-
template<unsigned n, typename T> inline
float tr(const mat<n,n,T>& m)
{
Index: jardonnet/test/icp.cc
--- jardonnet/test/icp.cc (revision 1957)
+++ jardonnet/test/icp.cc (working copy)
@@ -47,8 +47,11 @@
p_array<mln_point_(I3d)> c = convert::to_p_array(cloud);
p_array<mln_point_(I3d)> x = convert::to_p_array(surface);
+ //working box
+ const box_<mln_point_(I3d)> working_box =
enlarge(bigger(c.bbox(),x.bbox()),100);
+
//Make a lazy_image map via function closest_point
- closest_point<mln_point_(I3d)> fun(x, box_<point3d>(1000,1000,1));
+ closest_point<mln_point_(I3d)> fun(x, working_box);
lazy_image< closest_point<mln_point_(I3d)> > map(fun);
quat7<3> qk = registration::icp(c, map, q, e, x);
@@ -61,12 +64,7 @@
qk.apply_on(c, c, c.npoints());
//init output image
- //FIXME: Should be like
- //mln_concrete(I) output(res.bbox()) = convert::to_image<I>(res) ?
-
-
- const box_<point2d> box2d(400,700);
- image2d<value::rgb8> output(box2d, 1);
+ image2d<value::rgb8> output(convert::to_box2d(working_box), 1);
float stddev, mean;
registration::mean_stddev(c, map, mean, stddev);
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena/sandbox
Index: ChangeLog
from Ugo Jardonnet <jardonnet(a)lrde.epita.fr>
Add a bunch of files for testes.
Home-made:
* jardonnet/test/img: New.
* jardonnet/test/img/c1.pbm: New.
* jardonnet/test/img/c2.pbm: New.
* jardonnet/test/img/c3.pbm: New.
* jardonnet/test/img/c4.pbm: New.
* jardonnet/test/img/x1.pbm: New.
* jardonnet/test/img/x2.pbm: New.
* jardonnet/test/img/x3.pbm: New.
* jardonnet/test/img/x4.pbm: New.
* jardonnet/test/img/01.pbm: New.
* jardonnet/test/img/02.pbm: New.
0 files changed
Index: jardonnet/test/img/c1.pbm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: jardonnet/test/img/c1.pbm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Index: jardonnet/test/img/c2.pbm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: jardonnet/test/img/c2.pbm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Index: jardonnet/test/img/c3.pbm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: jardonnet/test/img/c3.pbm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Index: jardonnet/test/img/c4.pbm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: jardonnet/test/img/c4.pbm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Index: jardonnet/test/img/x1.pbm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: jardonnet/test/img/x1.pbm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Index: jardonnet/test/img/x2.pbm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: jardonnet/test/img/x2.pbm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Index: jardonnet/test/img/x3.pbm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: jardonnet/test/img/x3.pbm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Index: jardonnet/test/img/x4.pbm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: jardonnet/test/img/x4.pbm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Ugo Jardonnet <jardonnet(a)lrde.epita.fr>
Really fix binarization testes.
* tests/binarization/threshold.cc (paste): Destination domain must be
big enough.
* tests/binarization/Makefile.am: Fix.
Makefile.am | 2 +-
threshold.cc | 10 ++++++----
2 files changed, 7 insertions(+), 5 deletions(-)
Index: tests/binarization/threshold.cc
--- tests/binarization/threshold.cc (revision 1955)
+++ tests/binarization/threshold.cc (working copy)
@@ -38,25 +38,27 @@
#include "tests/data.hh"
-int main(int argc, char **)
+int main()
{
using namespace mln;
using value::int_u8;
{
image2d<int_u8> lena;
- io::pgm::load(lena, MLN_IMG_DIR "lena.pgm");
+ io::pgm::load(lena, MLN_IMG_DIR "/lena.pgm");
io::pbm::save(binarization::threshold(lena, 50), "out1.pgm");
}
{
image2d<int_u8> l;
- image2d<int> lena;
- io::pgm::load(l, MLN_IMG_DIR "img/lena.pgm");
+ io::pgm::load(l, MLN_IMG_DIR "/lena.pgm");
+
+ image2d<int> lena(l.domain(), 0);
level::paste(l, lena);
io::pbm::save(binarization::threshold(lena, 50), "out2.pgm");
}
+
}
Index: tests/binarization/Makefile.am
--- tests/binarization/Makefile.am (revision 1955)
+++ tests/binarization/Makefile.am (working copy)
@@ -3,7 +3,7 @@
include $(top_srcdir)/milena/tests/tests.mk
check_PROGRAMS = \
- thresholding
+ threshold
threshold_SOURCES = threshold.cc
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Ugo Jardonnet <jardonnet(a)lrde.epita.fr>
Fix threshold testes.
* mln/binarization/threshold.hh: Make args more explicit.
* tests/binarization/thresholding.cc: Rename as ...
* tests/binarization/threshold.cc: ... this.
* tests/binarization/Makefile.am: Update makefile rule.
mln/binarization/threshold.hh | 6 ++-
tests/binarization/Makefile.am | 2 -
tests/binarization/threshold.cc | 62
++++++++++++++++++++++++++++++++++++++++
3 files changed, 67 insertions(+), 3 deletions(-)
Index: mln/binarization/threshold.hh
--- mln/binarization/threshold.hh (revision 1954)
+++ mln/binarization/threshold.hh (working copy)
@@ -63,7 +63,7 @@
template <typename I>
inline
mln_concrete_ch_value(I, bool)
- threshold(const Image<I>& input, const mln_value(I) value)
+ threshold(const Image<I>& input, const mln_value(I) threshold_value)
{
trace::entering("binarization::threshold");
@@ -73,7 +73,9 @@
mln_concrete_ch_value(I, bool) output(exact(input).domain());
- fun::v2b::threshold< mln_value(I) > f(value);
+ // FIXME : threshold value should be a percentage.
+ fun::v2b::threshold< mln_value(I) > f(threshold_value);
+
output = binarization::binarization(exact(input), f);
trace::exiting("binarization::threshold");
Index: tests/binarization/Makefile.am
--- tests/binarization/Makefile.am (revision 1954)
+++ tests/binarization/Makefile.am (working copy)
@@ -5,6 +5,6 @@
check_PROGRAMS = \
thresholding
-thresholding_SOURCES = thresholding.cc
+threshold_SOURCES = threshold.cc
TESTS = $(check_PROGRAMS)
Index: tests/binarization/threshold.cc
--- tests/binarization/threshold.cc (revision 0)
+++ tests/binarization/threshold.cc (revision 0)
@@ -0,0 +1,62 @@
+// 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
+// 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.
+
+/// \file tests/binarization/thresholding.cc
+/// \brief Test on mln::binarization::threshold.
+
+#include <mln/core/image2d.hh>
+#include <mln/binarization/threshold.hh>
+#include <mln/level/all.hh>
+
+#include <mln/io/pgm/load.hh>
+#include <mln/io/ppm/load.hh>
+#include <mln/io/pbm/save.hh>
+
+#include "tests/data.hh"
+
+int main(int argc, char **)
+{
+ using namespace mln;
+ using value::int_u8;
+
+ {
+ image2d<int_u8> lena;
+ io::pgm::load(lena, MLN_IMG_DIR "lena.pgm");
+
+ io::pbm::save(binarization::threshold(lena, 50), "out1.pgm");
+ }
+
+ {
+ image2d<int_u8> l;
+ image2d<int> lena;
+ io::pgm::load(l, MLN_IMG_DIR "img/lena.pgm");
+
+ level::paste(l, lena);
+
+ io::pbm::save(binarization::threshold(lena, 50), "out2.pgm");
+ }
+}
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
If I'm not mistaken, all tests should compile now, except these two ones:
tests/value/graylevel.cc
tests/value/graylevel_f.cc
for some obscure ambiguous name resolution.
Though most of them now compile, many tests fail, for various reasons
(changes in interfaces/expected results, SEGVs, etc.). Any help to fix
these tests is welcome!
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Have most of the test suite compile again.
* mln/draw/graph.hh: Catch up with the interface of
mln::p_graph<P>.
* mln/metal/math/pow.hh (mln::metal::math::impl::pow_int_)
* mln/value/float01_.hh (mln::trait::value_< mln::value::float01_<n> >)
* mln/value/int_s.hh (mln::trait::value_< mln::value::int_s<n> >)
* mln/value/int_u.hh (mln::trait::value_< mln::value::int_u<n> >):
Give a name to the enum to pacify the compiler.
* mln/value/graylevel.hh (mln::value::graylevel<n>::graylevel):
Explicitly call the ctor of the first super class, as recommended
by g++ 4.0.1.
* mln/value/internal/integer.hh:
s|mln/value/internal/scalar.hh|mln/value/concept/scalar.hh|
* mln/metal/math/sqrt.hh (mln::metal::math::impl::sqrt<N>): Fix
the number of template parameters.
* mln/canvas/all.hh:
s|mln/canvas/champfer.hh|mln/canvas/chamfer.hh|.
* mln/canvas/browsing/all.hh:
s|dir_ricard51.hh|dir_struct_elt_incr_update.hh|.
* mln/win/line.hh (mln::win::line<M, i C>::psite): New typedef.
* mln/labeling/all.hh: No longer include the (missing) header
mln/labeling/estimate.hh.
* tests/level/sort_points.cc: Remove this outdated test.
* tests/level/Makefile.am (check_PROGRAMS): Remove sort_points.
(sort_points_SOURCES): Remove.
* tests/subsampling/type.cc: Move...
* sandbox/jardonnet/test/type.cc: ...here.
This test depends on files located in sandbox/jardonnet/.
* tests/subsampling/Makefile.am (check_PROGRAMS, type_SOURCES)
(TESTS): Remove.
* tests/level/naive/Makefile.am (median_CXXFLAGS): Set to
(TESTS_CXXFLAGS_SPEED), to speed up test execution.
* tests/literal/medium_gray.cc: Add missing header inclusions.
* tests/value/quat.cc: Likewise.
Catch up with the new location of quat (algebra::, instead of
value::).
* tests/algebra/mat.cc: Likewise.
* tests/value/Makefile.am (check_PROGRAMS): Remove macros.
(macros_SOURCES): Remove.
(EXTRA_DIST): New.
Set to macros.hh.
* tests/binarization/thresholding.cc: s/thresholding/threshold/.
Don't use hard-coded paths for images.
* tests/display/Makefile.am (TESTS): Disable tests show and
save_and_show.
mln/canvas/all.hh | 2 +-
mln/canvas/browsing/all.hh | 2 +-
mln/draw/graph.hh | 8 ++++----
mln/labeling/all.hh | 1 -
mln/metal/math/pow.hh | 4 ++--
mln/metal/math/sqrt.hh | 4 ++--
mln/value/float01_.hh | 2 +-
mln/value/graylevel.hh | 3 ++-
mln/value/int_s.hh | 2 +-
mln/value/int_u.hh | 2 +-
mln/value/internal/integer.hh | 2 +-
mln/win/line.hh | 3 +++
tests/algebra/mat.cc | 2 +-
tests/binarization/thresholding.cc | 23 ++++++++++-------------
tests/display/Makefile.am | 6 +++++-
tests/level/Makefile.am | 2 --
tests/level/naive/Makefile.am | 2 +-
tests/literal/medium_gray.cc | 2 ++
tests/subsampling/Makefile.am | 7 -------
tests/value/Makefile.am | 5 +++--
tests/value/quat.cc | 11 +++++++----
21 files changed, 48 insertions(+), 47 deletions(-)
Index: mln/draw/graph.hh
--- mln/draw/graph.hh (revision 1952)
+++ mln/draw/graph.hh (working copy)
@@ -95,16 +95,16 @@
// Draw the background.
level::fill(ima, 0);
// Draw the lines (edges).
- for (size_t l = 0; l < pg.nlines(); ++l)
+ for (size_t l = 0; l < pg.nedges(); ++l)
line (exact(ima),
// FIXME: Too low-level. See similar remarks
// in mln/core/graph_image.hh
- pg.gr_.node_data(pg.gr_.edge(l).n1()),
- pg.gr_.node_data(pg.gr_.edge(l).n2()),
+ pg.gr_->node_data(pg.gr_->edge(l).n1()),
+ pg.gr_->node_data(pg.gr_->edge(l).n2()),
link_v);
// Draw the points (nodes).
for (size_t p = 0; p < pg.npoints(); ++p)
- exact(ima)(pg.gr_.node_data(p)) = node_v;
+ exact(ima)(pg.gr_->node_data(p)) = node_v;
}
template <typename I, typename P, typename V>
Index: mln/metal/math/pow.hh
--- mln/metal/math/pow.hh (revision 1952)
+++ mln/metal/math/pow.hh (working copy)
@@ -59,13 +59,13 @@
template <int x, int n>
struct pow_int_
{
- enum { value = x * pow_int_<x, n-1>::value };
+ enum res_ { value = x * pow_int_<x, n-1>::value };
};
template <int x>
struct pow_int_< x, 0 >
{
- enum { value = 1 };
+ enum res_ { value = 1 };
};
template <>
Index: mln/value/float01_.hh
--- mln/value/float01_.hh (revision 1952)
+++ mln/value/float01_.hh (working copy)
@@ -62,7 +62,7 @@
template <unsigned n>
struct value_< mln::value::float01_<n> >
{
- enum {
+ enum constants_ {
nbits = n,
card = mln_value_card_from_(nbits)
};
Index: mln/value/int_s.hh
--- mln/value/int_s.hh (revision 1952)
+++ mln/value/int_s.hh (working copy)
@@ -75,7 +75,7 @@
typedef mln::value::int_s<n> self_;
public:
- enum {
+ enum constants_ {
nbits = n,
card = mln_value_card_from_(n) - 1
};
Index: mln/value/int_u.hh
--- mln/value/int_u.hh (revision 1952)
+++ mln/value/int_u.hh (working copy)
@@ -81,7 +81,7 @@
typedef typename mln::value::internal::encoding_unsigned_<n>::ret enc_;
public:
- enum {
+ enum constants_ {
nbits = n,
card = mln_value_card_from_(n)
};
Index: mln/value/graylevel.hh
--- mln/value/graylevel.hh (revision 1952)
+++ mln/value/graylevel.hh (working copy)
@@ -460,7 +460,8 @@
template <unsigned n>
inline
- graylevel<n>::graylevel(const graylevel<n>& rhs)
+ graylevel<n>::graylevel(const graylevel<n>& rhs) :
+ Integer< graylevel<n> >()
{
this->v_ = rhs.v_;
}
Index: mln/value/internal/integer.hh
--- mln/value/internal/integer.hh (revision 1952)
+++ mln/value/internal/integer.hh (working copy)
@@ -33,7 +33,7 @@
* \brief Define a generic class for integer values.
*/
-# include <mln/value/internal/scalar.hh>
+# include <mln/value/concept/scalar.hh>
namespace mln
{
Index: mln/metal/math/sqrt.hh
--- mln/metal/math/sqrt.hh (revision 1952)
+++ mln/metal/math/sqrt.hh (working copy)
@@ -46,7 +46,7 @@
namespace math
{
- // sqrt_int<x, n>
+ // sqrt_int<x>
namespace impl
{
@@ -92,7 +92,7 @@
// sqrt<N>
- template <typename X, typename N>
+ template <typename N>
struct sqrt;
template <int n>
Index: mln/canvas/all.hh
--- mln/canvas/all.hh (revision 1952)
+++ mln/canvas/all.hh (working copy)
@@ -48,7 +48,7 @@
# include <mln/canvas/browsing/all.hh>
# include <mln/canvas/morpho/all.hh>
-# include <mln/canvas/champfer.hh>
+# include <mln/canvas/chamfer.hh>
# include <mln/canvas/labeling.hh>
#endif // ! MLN_CANVAS_ALL_HH
Index: mln/canvas/browsing/all.hh
--- mln/canvas/browsing/all.hh (revision 1952)
+++ mln/canvas/browsing/all.hh (working copy)
@@ -46,7 +46,7 @@
}
# include <mln/canvas/browsing/directional.hh>
-# include <mln/canvas/browsing/dir_ricard51.hh>
+# include <mln/canvas/browsing/dir_struct_elt_incr_update.hh>
# include <mln/canvas/browsing/fwd.hh>
# include <mln/canvas/browsing/snake_fwd.hh>
Index: mln/win/line.hh
--- mln/win/line.hh (revision 1952)
+++ mln/win/line.hh (working copy)
@@ -63,6 +63,9 @@
/// Point associated type.
typedef point_<M, int> point;
+ /// Psite associated type.
+ typedef point psite;
+
/// Dpoint associated type.
typedef dpoint_<M, int> dpoint;
Index: mln/labeling/all.hh
--- mln/labeling/all.hh (revision 1952)
+++ mln/labeling/all.hh (working copy)
@@ -54,7 +54,6 @@
# include <mln/labeling/background.hh>
# include <mln/labeling/blobs.hh>
-# include <mln/labeling/estimate.hh>
# include <mln/labeling/flat_zones.hh>
# include <mln/labeling/foreground.hh>
# include <mln/labeling/level.hh>
Index: tests/level/Makefile.am
--- tests/level/Makefile.am (revision 1952)
+++ tests/level/Makefile.am (working copy)
@@ -20,7 +20,6 @@
memset_ \
paste \
saturate \
- sort_points \
sort_psites \
sort_psites_full \
stretch \
@@ -42,7 +41,6 @@
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
Index: tests/subsampling/Makefile.am
--- tests/subsampling/Makefile.am (revision 1952)
+++ tests/subsampling/Makefile.am (working copy)
@@ -1,10 +1,3 @@
## Process this file through Automake to create Makefile.in -*- Makefile -*-
include $(top_srcdir)/milena/tests/tests.mk
-
-check_PROGRAMS = \
- type
-
-type_SOURCES = type.cc
-
-TESTS = $(check_PROGRAMS)
Index: tests/level/naive/Makefile.am
--- tests/level/naive/Makefile.am (revision 1952)
+++ tests/level/naive/Makefile.am (working copy)
@@ -15,6 +15,6 @@
# For the moment, we just have the second test. We run it during
# target `check', but we shall move it to target `check-full' as soon
# as a smaller and faster test is written.
-median_CXXFLAGS = $(LONG_TESTS_CXXFLAGS)
+median_CXXFLAGS = $(TESTS_CXXFLAGS_SPEED)
TESTS = $(check_PROGRAMS)
Index: tests/literal/medium_gray.cc
--- tests/literal/medium_gray.cc (revision 1952)
+++ tests/literal/medium_gray.cc (working copy)
@@ -32,6 +32,8 @@
#include <mln/literal/grays.hh>
#include <mln/value/graylevel.hh>
+#include <mln/value/gl8.hh>
+#include <mln/value/gl16.hh>
int main()
Index: tests/value/quat.cc
--- tests/value/quat.cc (revision 1952)
+++ tests/value/quat.cc (working copy)
@@ -32,16 +32,19 @@
#include <iostream>
-#include <mln/value/quat.hh>
+#include <mln/core/contract.hh>
+
+#include <mln/algebra/quat.hh>
+#include <mln/norm/l2.hh>
int main()
{
using namespace mln;
- value::quat q1(3.f, 4.f, 1.6f, 0.5f);
- value::quat q2(1.2, make::vec(3, 6, 4));
- value::quat q3(make::vec(1.3, 3., -6., 4.));
+ algebra::quat q1(3.f, 4.f, 1.6f, 0.5f);
+ algebra::quat q2(1.2, make::vec(3, 6, 4));
+ algebra::quat q3(make::vec(1.3, 3., -6., 4.));
std::cout << q1 << std::endl;
std::cout << q2 << std::endl;
Index: tests/algebra/mat.cc
--- tests/algebra/mat.cc (revision 1952)
+++ tests/algebra/mat.cc (working copy)
@@ -43,7 +43,7 @@
using namespace mln;
algebra::mat<1,3,float> m1(all_to(4.));
- algebra::mat<2,2,float> m2 = metal::mat<2,2,float>::Id;
+ algebra::mat<2,2,float> m2 = algebra::mat<2,2,float>::Id;
h_mat<1,float> hm1(m2);
h_mat<2,float> hm2;
Index: tests/value/Makefile.am
--- tests/value/Makefile.am (revision 1952)
+++ tests/value/Makefile.am (working copy)
@@ -23,7 +23,6 @@
int_u8 \
interop \
label \
- macros \
quat \
rgb8 \
scalar \
@@ -48,7 +47,6 @@
int_s16_SOURCES = int_s16.cc
int_u8_SOURCES = int_u8.cc
label_SOURCES = label.cc
-macros_SOURCES = macros.cc
quat_SOURCES = quat.cc
rgb8_SOURCES = rgb8.cc
scalar_SOURCES = scalar.cc
@@ -63,3 +61,6 @@
TESTS = $(check_PROGRAMS)
# FIXME: Enable when make check_full works.
# TESTS_FULL = $(check_full_PROGRAMS)
+
+# FIXME: What's the purpose of this file?
+EXTRA_DIST = macros.hh
Index: tests/binarization/thresholding.cc
--- tests/binarization/thresholding.cc (revision 1952)
+++ tests/binarization/thresholding.cc (working copy)
@@ -25,23 +25,18 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/binarization/thresholding.cc
- *
- * \brief Test on mln::binarization::thresholding
- */
-
-// FIXME for make check
-
+/// \file tests/binarization/thresholding.cc
+/// \brief Test on mln::binarization::threshold.
#include <mln/core/image2d.hh>
-#include <mln/binarization/thresholding.hh>
+#include <mln/binarization/threshold.hh>
#include <mln/level/all.hh>
#include <mln/io/pgm/load.hh>
#include <mln/io/ppm/load.hh>
#include <mln/io/pbm/save.hh>
-//#include "tests/data.hh"
+#include "tests/data.hh"
int main(int argc, char **)
{
@@ -50,17 +45,19 @@
{
image2d<int_u8> lena;
- io::pgm::load(lena, "../../img/lena.pgm");
- io::pbm::save(binarization::thresholding(lena, argc), "out1.pgm");
+ io::pgm::load(lena, MLN_IMG_DIR "lena.pgm");
+ // FIXME: argc? Weird.
+ io::pbm::save(binarization::threshold(lena, argc), "out1.pgm");
}
{
image2d<int_u8> l;
image2d<int> lena;
- io::pgm::load(l, "../../img/lena.pgm");
+ io::pgm::load(l, MLN_IMG_DIR "img/lena.pgm");
level::paste(l, lena);
- io::pbm::save(binarization::thresholding(lena, argc), "out2.pgm");
+ // FIXME: argc? Weird.
+ io::pbm::save(binarization::threshold(lena, argc), "out2.pgm");
}
}
Index: tests/display/Makefile.am
--- tests/display/Makefile.am (revision 1952)
+++ tests/display/Makefile.am (working copy)
@@ -11,4 +11,8 @@
save_and_show_SOURCES = save_and_show.cc
color_pretty_SOURCES = color_pretty.cc
-TESTS = $(check_PROGRAMS)
+# FIXME: Don't execute `save' and `save_and_show' by default! These
+# tests require a running X11 server (as well as a `pkill' binary...).
+# Perform the necessary checks at configure time first.
+#TESTS = $(check_PROGRAMS)
+TESTS = color_pretty
1
0
URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena/sandbox
ChangeLog:
2008-05-15 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
* geraud/fllt.cc: Merge upper and lower level set in fllt.
---
fllt.cc | 355 +++++++++++++++++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 294 insertions(+), 61 deletions(-)
Index: trunk/milena/sandbox/geraud/fllt.cc
===================================================================
--- trunk/milena/sandbox/geraud/fllt.cc (revision 1951)
+++ trunk/milena/sandbox/geraud/fllt.cc (revision 1952)
@@ -34,6 +34,7 @@
#include <mln/core/image_if_value.hh>
#include <mln/core/sub_image.hh>
#include <mln/core/p_queue_fast.hh>
+#include <mln/core/cast_image.hh>
#include <mln/value/int_u8.hh>
#include <mln/value/rgb8.hh>
@@ -57,6 +58,7 @@
#include <mln/util/tree.hh>
#include <mln/util/branch_iter_ind.hh>
+#include <mln/util/branch_iter.hh>
#include <sstream>
@@ -73,6 +75,7 @@
# define fllt_node_ptr(P, V) mln::util::tree_node< fllt_node_elt<P, V>* >
# define fllt_branch(P, V) mln::util::branch< fllt_node_elt<P, V> >
# define fllt_branch_iter_ind(P, V) mln::util::branch_iter_ind< fllt_node_elt<P, V> >
+# define fllt_branch_iter(P, V) mln::util::branch_iter< fllt_node_elt<P, V> >
//Fwd declarations.
@@ -90,8 +93,25 @@
bool brighter;
unsigned npoints;
bool tagged;
+ bool set_id;
- fllt_node_elt() : npoints(0), tagged(false) {}
+ fllt_node_elt(bool set_id) : npoints(0), tagged(false), set_id(set_id) {}
+ };
+
+
+ template <typename C>
+ class stl_iterator
+ {
+ public:
+ stl_iterator(C& c) : container_(c) {}
+ void start(){ it_ = container_.begin(); }
+ void next() { it_++; }
+ bool is_valid() const{ return it_ != container_.end(); }
+ typename C::value_type& operator*() { return *it_; }
+
+ private:
+ C& container_;
+ typename C::iterator it_;
};
template <typename N_t, typename G, typename Set>
@@ -163,20 +183,23 @@
void save_u(const image2d<value::int_u8>& u,
const image2d<int>& is,
box2d R_box,
- int in_R)
+ int in_R,
+ int in_N)
{
static int id = 0;
std::stringstream filename;
filename << "fllt_trace_" << std::setw(5) << std::setfill('0')
<< std::right << id++ << ".ppm";
- image2d<value::int_u8> out = clone(u);
+ image2d<value::int_u8> out = clone(cast_image<value::int_u8>(is));
mln_assertion(R_box.npoints() > 0);
mln_piter_(box2d) p(R_box);
for_all(p)
if (is(p) == in_R)
out(p) = 255;
+ else if (is(p) == in_N)
+ out(p) = 127;
// else if (is(p) == in_N)
// out(p) = literal::green;
@@ -219,11 +242,12 @@
void blob(const I& is,
p_array<mln_point(I)>* N[256],
unsigned in_N,
+ const box2d& N_box,
fllt_node(mln_point(I), V)* current_cc)
{
typedef p_array<mln_point(I)> arr_t;
-// std::cout << ">>>>>>>enter blob." << std::endl;
+// std::cout << ">>>>>>>enter blob. " << current_cc << std::endl;
bool flower = true;
unsigned ncc = 0;
static image2d<unsigned> is_labeled(is.domain());
@@ -241,6 +265,35 @@
p_queue_fast<P> qu;
p_array<P>& holes = current_cc->elt().holes;
+ mln_piter(I) p(N_box);
+ for_all(p)
+ if (is(p) == in_N)
+ break;
+
+ mln_assertion(is(p) == in_N);
+ if (is_labeled(p) != label)
+ {
+ if (flower == false)
+ holes.append(p);
+ else
+ flower = false;
+ qu.push(p);
+ is_labeled(p) = label;
+ do
+ {
+ cur = qu.front();
+ qu.pop();
+ for_all(n) if (is.has(n))
+ if (is(n) == in_N && is_labeled(n) != label)
+ {
+ qu.push(n);
+ is_labeled(n) = label;
+ }
+ }
+ while (! qu.is_empty());
+ }
+
+
for (unsigned i = 0; i < 256; ++i)
{
@@ -308,12 +361,17 @@
if (!smallest_shapes(a)->parent())
if (smallest_shapes(a)->elt().value == g)
{
+ fllt_node(P, V)* to_delete = smallest_shapes(a);
+
mln_piter(arr_t) p(smallest_shapes(a)->elt().points);
// Todo optimization here.
for_all(p)
smallest_shapes(p) = 0;
- delete smallest_shapes(a);
+ while(!to_delete->children().empty())
+ current_cc->add_child(*to_delete->children().begin());
+ delete to_delete;
+
smallest_shapes(a) = current_cc;
current_cc->elt().points.append(a);
}
@@ -329,6 +387,8 @@
struct lower
{
typedef upper<V> opposite;
+ // If compare(u,v) u root <- v <- u
+ // else root <- u <- v
static bool
compare(const V& u, const V& v)
{
@@ -343,6 +403,7 @@
}
static const bool parent_is_brighter = true;
+ static const bool id = false;
static const neighb2d& bdr_nbh() { return c8(); }
static const neighb2d& reg_nbh() { return c4(); }
@@ -355,6 +416,8 @@
{
typedef lower<V> opposite;
+ // If compare(u,v) u root <- v <- u
+ // else root <- u <- v
static bool
compare(const V& u, const V& v)
{ return u > v; }
@@ -365,6 +428,8 @@
{ return labeling::regional_maxima(input, nbh, nlabels); }
static const bool parent_is_brighter = false;
+ static const bool id = true;
+
static const neighb2d& bdr_nbh() { return c4(); }
static const neighb2d& reg_nbh() { return c8(); }
};
@@ -410,6 +475,7 @@
N[i] = new arr_t();
accu::bbox<P> N_box;
+ bool touch_border_of_image = false;
unsigned n_step_1 = 0, n_step_3 = 0, n_comps = 0, n_holes = 0;
// Step 1.
@@ -425,8 +491,9 @@
++n_step_1;
x0 = p;
g = input(x0);
- current_cc = new node_type();
+ current_cc = new node_type(Set::id);
current_cc->elt().value = g;
+ touch_border_of_image = false;
}
@@ -454,7 +521,7 @@
// Step 3.
step_3:
{
-// save_u(u, deja_vu, N_box, in_R);
+// save_u(u, deja_vu, N_box, in_R, in_N);
++n_step_3;
mln_piter(arr_t) a(*A);
@@ -476,6 +543,8 @@
N[u(x)]->append(x);
N_box.take(x);
}
+ else
+ touch_border_of_image = true;
deja_vu(x) = in_N;
}
}
@@ -494,13 +563,19 @@
g = gN;
++n_comps;
- blob(deja_vu, N, in_N, current_cc);
+
+ if (touch_border_of_image)
+ blob(deja_vu, N, in_N, N_box.to_result().to_larger(1), current_cc);
+ else
+ blob(deja_vu, N, in_N, N_box, current_cc);
+
+ n_holes += current_cc->elt().holes.npoints();
+
node_type* child = current_cc;
- current_cc = new node_type();
+ current_cc = new node_type(Set::id);
current_cc->elt().value = g;
child->set_parent(current_cc);
- n_holes += current_cc->elt().holes.npoints();
arr_t* tmp = A;
A = N[g];
@@ -539,9 +614,61 @@
return *new tree_type(current_cc);
}
+ // F is the set in which we get the node.
+ template <typename P, typename V, typename F>
+ fllt_node(P, V)*
+ find_hole(fllt_node(P, V)& node,
+ const P p,
+ const image2d<fllt_node(P, V)*>& other_reg)
+ {
+ fllt_node(P, V)* s = other_reg(p);
+ mln_assertion(s);
+ while (s->parent() && F::compare(s->parent()->elt().value, node.elt().value))
+ {
+ mln_assertion(s);
+ s = s->parent();
+ mln_assertion(s);
+ }
+// std::cout << " [Find the hole] of " << p
+// << " from " << &node
+// << " return " << s
+// << std::endl;
+ return s;
+ }
+
+ template <typename P, typename V>
+ bool shape_is_included(fllt_branch_iter_ind(P, V) A,
+ fllt_branch_iter_ind(P, V) B)
+ {
+ // TODO: optimize : take the smalest shape first.
+ typedef p_array<P> arr_t;
+
+ for_all(A)
+ {
+ bool found = false;
+ mln_piter(arr_t) pA((*A).elt().points);
+ for_all(pA)
+ for_all(B)
+ {
+ found = false;
+ mln_piter(arr_t) pB((*B).elt().points);
+ for_all(pB)
+ if (pA == pB)
+ {
+ found = true;
+ break;
+ }
+ if (found)
+ break;
+ }
+ if (!found)
+ return false;
+ }
+ return true;
+ }
template <typename I>
- fllt_tree_ptr(mln_point(I), mln_value(I))
+ fllt_tree(mln_point(I), mln_value(I))
merge_trees(fllt_tree(mln_point(I), mln_value(I))& lower_tree,
fllt_tree(mln_point(I), mln_value(I))& upper_tree,
const image2d<fllt_node(mln_point(I), mln_value(I))*>& low_reg,
@@ -553,32 +680,104 @@
typedef mln_point(I) P;
typedef mln_value(I) V;
- typedef fllt_node_ptr(P, V) node_ptr_type;
- typedef fllt_tree_ptr(P, V) tree_ptr_type;
+ typedef fllt_node(P, V) node_type;
+ typedef fllt_tree(P, V) tree_type;
typedef p_array<P> arr_t;
- fllt_node_ptr(P, V)* root = new node_ptr_type();
- fllt_node_ptr(P, V)* n = root;
- root->elt() = &(lower_tree.root()->elt());
+ std::vector<node_type*> to_fill;
-// fllt_branch_iter_ind(P, V) p(lower_tree.main_branch());
-// for_all(p)
-// {
-// if (p->elt().tagged)
-// continue;
+ fllt_branch_iter_ind(P, V) node_(lower_tree.main_branch());
+ for_all(node_)
+ {
+ node_type& node = *node_;
+ if (node.elt().set_id != lower<V>::id)
+ continue;
-// p->elt().tagged = true;
-// fllt_node_ptr(P, V)* node = new node_ptr_type();
-// node->elt() = &(p->elt());
+ // std::cout << "Fill " << &node << std::endl;
-// mln_piter(arr_t) hole(p->elt().holes);
-// for_all(hole)
-// {
+ mln_piter(arr_t) hole_p(node.elt().holes);
+ for_all(hole_p)
+ {
+ fllt_node(P, V)* hole;
+ hole = find_hole<P,V,upper<V> >(node, P(hole_p), upp_reg);
-// }
-// }
+ bool child_has_bigger_hole = false;
+ typename fllt_node(P, V)::children_t::iterator it;
+ for (it = node.children().begin(); it != node.children().end() && !child_has_bigger_hole; it++)
+ {
+ // Browse the holes of each child.
+ mln_piter(arr_t) q((*it)->elt().holes);
+ for_all(q)
+ {
+ fllt_node(P, V)* child_hole = find_hole<P,V,upper<V> >((**it), point2d(q), upp_reg);
+ // std::cout << "hole : " << hole << " " << hole->elt().points << " " << std::endl;
+ // std::cout << "child hole : " << child_hole << " " << child_hole->elt().points << std::endl;
+ if (shape_is_included(fllt_branch_iter_ind(P, V)(fllt_branch(P, V)(upper_tree, *hole)),
+ fllt_branch_iter_ind(P, V)(fllt_branch(P, V)(upper_tree, *child_hole))))
+ {
+ child_has_bigger_hole = true;
+ break;
+ }
+ } // end of browsing child's holes.
+ } // end of browsing childs.
+ if (!child_has_bigger_hole)
+ {
+ // // std::cout << "move " << hole << " as child of " << &node << std::endl;
+ node.add_child(hole);
+ to_fill.push_back(hole);
+ }
+ } // end of browsing holes of node.
+ node.elt().holes.clear();
+ } // end of browsing lower_tree.
+
+ for(typename std::vector<node_type*>::iterator node_ = to_fill.begin();
+ node_ != to_fill.end();
+ node_++)
+ {
+ node_type& node = **node_;
+
+ fllt_branch_iter_ind(P, V) node_(fllt_branch(P, V)(upper_tree, node));
+ for_all(node_)
+ {
+ node_type& node = *node_;
+ if (node.elt().set_id != upper<V>::id)
+ continue;
- return tree_ptr_type(root);
+ mln_piter(arr_t) hole_p(node.elt().holes);
+ for_all(hole_p)
+ {
+ fllt_node(P, V)* hole;
+ hole = find_hole<P,V,lower<V> >(node, P(hole_p), low_reg);
+
+ bool child_has_bigger_hole = false;
+ typename fllt_node(P, V)::children_t::iterator it;
+ for (it = node.children().begin(); it != node.children().end() && !child_has_bigger_hole; it++)
+ {
+ // Browse the holes of each child.
+ mln_piter(arr_t) q((*it)->elt().holes);
+ for_all(q)
+ {
+ fllt_node(P, V)* child_hole = find_hole<P,V,lower<V> >((**it), point2d(q), low_reg);
+ //if (hole->elt().points <= child_hole->elt().points)
+ if (shape_is_included(fllt_branch_iter_ind(P, V)(fllt_branch(P, V)(lower_tree, *hole)),
+ fllt_branch_iter_ind(P, V)(fllt_branch(P, V)(lower_tree, *child_hole))))
+ {
+ child_has_bigger_hole = true;
+ break;
+ }
+ } // end of browsing child's holes.
+ } // end of browsing childs.
+
+ if (!child_has_bigger_hole)
+ node.add_child(hole);
+
+ } // end of browsing holes of node.
+ node.elt().holes.clear();
+ } // end of browsing lower_tree.
+
+ }
+
+ return lower_tree;
}
template <typename I>
@@ -595,19 +794,18 @@
image2d<fllt_node(P, V)*> low_reg(input.domain());
image2d<fllt_node(P, V)*> upp_reg(input.domain());
- std::cout << "1/ Compute the lower level set." << std::endl;
+ std::cout << "1/ Compute the lower level set.----------------------------------------" << std::endl;
lower_tree = level_set<I, lower<V> >(input, low_reg);
-// draw_tree(input, lower_tree);
+ draw_tree(input, lower_tree);
- std::cout << "2/ Compute the upper level set." << std::endl;
+ std::cout << "2/ Compute the upper level set.----------------------------------------" << std::endl;
upper_tree = level_set<I, upper<V> >(input, upp_reg);
// draw_tree(input, upper_tree);
- fllt_tree_ptr(P, V) result_tree = merge_trees(lower_tree, upper_tree, low_reg, upp_reg, input);
-
-// draw_tree(lena, tree);
+ std::cout << "3/ Merge.---------------------------------------------------------------" << std::endl;
+ fllt_tree(P, V) result_tree = merge_trees(lower_tree, upper_tree, low_reg, upp_reg, input);
-// return fllt_tree(lower_tree);
+ return result_tree;
}
template <typename P, typename V>
@@ -615,6 +813,8 @@
draw_tree(const image2d<V>& ima,
fllt_tree(P, V)& tree)
{
+ p_array<P> tmp;
+
fllt_branch_iter_ind(P, V) p(tree.main_branch());
for_all(p)
{
@@ -623,13 +823,22 @@
std::cout << " |" << std::endl;
std::cout << "region : " << &*p
<< " value = " << (*p).elt().value << std::endl
+ << " from " << ((*p).elt().set_id == lower<V>::id ? "lower" : "upper") << " level set." << std::endl
<< " npoints = " << (*p).elt().npoints << std::endl
<< " holes = " << (*p).elt().holes << std::endl;
std::cout << std::endl;
+ tmp.append((*p).elt().points);
+
+ fllt_branch_iter_ind(P, V) n(fllt_branch(P, V)(tree, *p));
+ for_all(n)
+ tmp.append((*n).elt().points);
+
if ((*p).elt().points.npoints() > 0)
- debug::println(ima | (*p).elt().points);
+ debug::println(ima | tmp);
+ tmp.clear();
+
std::cout << std::endl;
}
}
@@ -647,42 +856,66 @@
typedef fllt_tree(point2d, int_u8) tree_type;
- if (argc != 2)
- {
- std::cerr << "usage: " << argv[0] << " filename" << std::endl;
- return 1;
- }
- image2d<int_u8> lena;
- io::pgm::load(lena, argv[1]);
+
+// if (argc != 2)
+// {
+// std::cerr << "usage: " << argv[0] << " filename" << std::endl;
+// return 1;
+// }
+
+// image2d<int_u8> lena;
+// io::pgm::load(lena, argv[1]);
// int vs[8][9] = { {0,0,0,0,0,0,0,0,0},
// {0,0,0,0,0,0,0,0,0},
// {0,1,1,1,1,1,1,1,0},
// {0,1,0,0,1,3,3,1,0},
-// {0,1,0,0,1,3,3,1,0},
+// {0,1,0,0,1,3,4,1,0},
// {0,1,0,0,1,3,3,1,0},
// {0,1,1,1,1,1,1,1,0},
// {0,0,0,0,0,0,0,0,0} };
-// image2d<int> lena_(make::image2d(vs));
-// image2d<int_u8> lena(lena_.domain());
-// level::fill(lena, lena_);
+// int vs[8][9] = { {2,2,2,2,2,2,2,2,2},
+// {2,2,2,2,2,2,2,2,2},
+// {2,1,1,1,1,1,1,1,2},
+// {2,1,2,2,1,0,0,1,2},
+// {2,1,2,2,1,0,0,1,2},
+// {2,1,2,2,1,0,0,1,2},
+// {2,1,1,1,1,1,1,1,2},
+// {2,2,2,2,2,2,2,2,2} };
+
+
+// int vs[8][9] = { {2,2,2,2,2,2,2,2,2},
+// {2,2,2,2,2,2,2,2,2},
+// {2,1,1,1,1,1,1,1,2},
+// {2,1,2,2,1,0,0,1,2},
+// {2,1,2,2,1,0,4,1,2},
+// {2,1,2,2,1,0,0,1,2},
+// {2,1,1,1,1,1,1,1,2},
+// {2,2,2,2,2,2,2,2,2} };
+
+ int vs[10][13] = { {1,1,1,1, 1,1,1,1, 1,1,1,1,1},
+ {1,2,2,2,2,2,2,2,2,2,2,2,1},
+ {1,2,2,2,2,2,2,2,2,2,2,2,1},
+ {1,2,2,2,3,3,3,3,3,3,3,2,1},
+ {1,2,2,2,3,3,3,2,2,2,3,2,1},
+ {1,2,2,2,3,4,3,2,4,4,3,2,1},
+
+ {1,2,2,2,3,3,3,2,2,2,3,2,1},
+ {1,2,2,2,3,3,3,3,3,3,3,2,1},
+ {1,2,2,2,2,2,2,2,2,2,2,2,1},
+ {1,1,1,1,1,1,1,1,1,1,1,1,1}};
+
+
+ image2d<int> lena_(make::image2d(vs));
+ image2d<int_u8> lena(lena_.domain());
+ level::fill(lena, lena_);
tree_type tree = my::fllt(lena);
+ draw_tree(lena, tree);
+
io::pgm::save(lena, "./out.pgm");
}
-
-// 16891 99970
-// ./a.out ../../img/lena.pgm 1.17s user 0.06s system 93% cpu 1.318 total
-// matt @ ..k/lrde/oln/trunk/milena/sandbox/geraud $ time ./a.out ../../img/lena.pgm 12:50:12
-// 16891 99970
-// ./a.out ../../img/lena.pgm 1.22s user 0.02s system 87% cpu 1.413 total
-// matt @ ..k/lrde/oln/trunk/milena/sandbox/geraud $ time ./a.out ../../img/lena.pgm 12:50:16
-// 16891 99970
-// ./a.out ../../img/lena.pgm 1.14s user 0.09s system 92% cpu 1.336 total
-// matt @ ..k/lrde/oln/trunk/milena/sandbox/geraud $ time ./a.out ../../img/lena.pgm 12:50:18
-// 16891 99970
-// ./a.out ../../img/lena.pgm 1.20s user 0.04s system 92% cpu 1.329 total
1
0
15 May '08
https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Update site set concepts and generic box.
* mln/trait/site_set/print.hh (ostr): Add default.
* mln/core/macros.hh (mln_site, mln_site_): New.
* mln/core/internal/point_set_base.hh
(mesh, dpoint): Remove.
(point): Rename as...
(site): ...this.
Update.
* mln/core/box.hh: Likewise.
(trait::site_set_): New.
* mln/core/concept/box.hh (point): Rename as...
(site): ...this.
* mln/core/concept/point_set.hh: Likewise.
Remove npoints and bbox from comments.
(point_set): Add props check in ctor.
(operator==, operator <=): Remove test over npoints.
(operator <): Rely on != instead of npoints.
* mln/core/concept/doc/box.hh (point): Rename as...
(site): ...this.
* mln/core/concept/doc/point_set.hh: Likewise.
(bbox, npoints): Remove.
* tests/core/box2d.cc: Add print props test.
* mln/core/pset_array.hh,
* mln/core/p_priority_queue_fast.hh,
* mln/core/p_priority_queue_fast_with_array.hh,
* mln/core/p_queue_fast.hh,
* mln/core/p_image2d.hh,
* mln/core/p_line_graph.hh,
* mln/core/p_queue.hh,
* mln/core/p_graph.hh,
* mln/core/p_priority_queue.hh,
* mln/core/p_set.hh,
* mln/core/line2d.hh,
* mln/core/p_bgraph.hh,
* mln/core/p_run.hh,
* mln/core/pset_if.hh,
* mln/core/p_array.hh,
* mln/core/p_runs.hh (point_set_base_): Rename as...
(site_set_base_): ...this.
* mln/metal/not_equal.hh: New.
* mln/metal/all.hh: Include not_equal.
mln/core/box.hh | 41 +++++++++-----
mln/core/concept/box.hh | 35 ++++++------
mln/core/concept/doc/box.hh | 9 +--
mln/core/concept/doc/point_set.hh | 24 ++------
mln/core/concept/point_set.hh | 75 ++++++++++-----------------
mln/core/internal/point_set_base.hh | 24 +++-----
mln/core/line2d.hh | 2
mln/core/macros.hh | 12 +++-
mln/core/p_array.hh | 2
mln/core/p_bgraph.hh | 2
mln/core/p_graph.hh | 2
mln/core/p_image2d.hh | 2
mln/core/p_line_graph.hh | 2
mln/core/p_priority_queue.hh | 2
mln/core/p_priority_queue_fast.hh | 2
mln/core/p_priority_queue_fast_with_array.hh | 2
mln/core/p_queue.hh | 2
mln/core/p_queue_fast.hh | 2
mln/core/p_run.hh | 2
mln/core/p_runs.hh | 2
mln/core/p_set.hh | 2
mln/core/pset_array.hh | 2
mln/core/pset_if.hh | 4 -
mln/metal/all.hh | 1
mln/metal/not_equal.hh | 63 ++++++++++++++++++++++
mln/trait/site_set/print.hh | 4 -
tests/core/box2d.cc | 2
27 files changed, 192 insertions(+), 132 deletions(-)
Index: tests/core/box2d.cc
--- tests/core/box2d.cc (revision 1950)
+++ tests/core/box2d.cc (working copy)
@@ -43,4 +43,6 @@
box2d b_(2, 3);
mln_assertion(b == b_);
+
+ // trait::site_set::print(b);
}
Index: mln/trait/site_set/print.hh
--- mln/trait/site_set/print.hh (revision 1950)
+++ mln/trait/site_set/print.hh (working copy)
@@ -53,10 +53,10 @@
{
template <typename S>
- void print(std::ostream& ostr);
+ void print(std::ostream& ostr = std::cout);
template <typename S>
- void print(const Site_Set<S>& ima, std::ostream& ostr);
+ void print(const Site_Set<S>& ima, std::ostream& ostr = std::cout);
# ifndef MLN_INCLUDE_ONLY
Index: mln/core/macros.hh
--- mln/core/macros.hh (revision 1950)
+++ mln/core/macros.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory (LRDE)
+// 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
@@ -242,6 +243,15 @@
/// \}
+// s
+
+/// Shortcuts to access the site type associated to T.
+/// \{
+# define mln_site(T) typename T::site
+# define mln_site_(T) T::site
+/// \}
+
+
// v
/// Shortcuts to access the value type associated to T.
Index: mln/core/pset_array.hh
--- mln/core/pset_array.hh (revision 1950)
+++ mln/core/pset_array.hh (working copy)
@@ -67,7 +67,7 @@
*/
template <typename Pset>
class pset_array:
- public internal::point_set_base_<pset_array_psite<Pset>, pset_array<Pset> >
+ public internal::site_set_base_<pset_array_psite<Pset>, pset_array<Pset> >
{
public:
Index: mln/core/internal/point_set_base.hh
--- mln/core/internal/point_set_base.hh (revision 1950)
+++ mln/core/internal/point_set_base.hh (working copy)
@@ -30,7 +30,7 @@
/*! \file mln/core/internal/point_set_base.hh
*
- * \brief Definition of a base class for point set classes.
+ * \brief Definition of a base class for site set classes.
*/
# include <mln/core/concept/point_set.hh>
@@ -43,26 +43,20 @@
namespace internal
{
- /*! \internal A base class for point set classes.
- * \p P is a point site type.
+ /*! \internal A base class for site set classes.
+ * \p P is a psite type.
*/
template <typename P, typename E>
- struct point_set_base_ : public Site_Set<E>
+ struct site_set_base_ : public Site_Set<E>
{
- /// Point_Site associated type.
+ /// PSite associated type.
typedef P psite;
- /// Mesh associated type.
- typedef mln_mesh(P) mesh;
-
- /// Point associated type.
- typedef mln_point(P) point;
-
- /// Dpoint associated type.
- typedef mln_dpoint(point) dpoint;
+ /// Site associated type.
+ typedef mln_site(P) site;
protected:
- point_set_base_();
+ site_set_base_();
};
@@ -70,7 +64,7 @@
template <typename S, typename E>
inline
- point_set_base_<S,E>::point_set_base_()
+ site_set_base_<S,E>::site_set_base_()
{
}
Index: mln/core/p_priority_queue_fast.hh
--- mln/core/p_priority_queue_fast.hh (revision 1950)
+++ mln/core/p_priority_queue_fast.hh (working copy)
@@ -63,7 +63,7 @@
* a call to npoints() when this container is multiple.
*/
template <typename P, typename T>
- class p_priority_queue_fast : public internal::point_set_base_< P, p_priority_queue_fast<P, T> >
+ class p_priority_queue_fast : public internal::site_set_base_< P, p_priority_queue_fast<P, T> >
{
public:
Index: mln/core/p_priority_queue_fast_with_array.hh
--- mln/core/p_priority_queue_fast_with_array.hh (revision 1950)
+++ mln/core/p_priority_queue_fast_with_array.hh (working copy)
@@ -63,7 +63,7 @@
* a call to npoints() when this container is multiple.
*/
template <typename P, typename T, unsigned S>
- class p_priority_queue_fast_with_array : public internal::point_set_base_< P, p_priority_queue_fast_with_array<P, T, S> >
+ class p_priority_queue_fast_with_array : public internal::site_set_base_< P, p_priority_queue_fast_with_array<P, T, S> >
{
public:
Index: mln/core/p_queue_fast.hh
--- mln/core/p_queue_fast.hh (revision 1950)
+++ mln/core/p_queue_fast.hh (working copy)
@@ -62,7 +62,7 @@
* a call to npoints() when this container is multiple.
*/
template <typename P>
- class p_queue_fast : public internal::point_set_base_< P, p_queue_fast<P> >
+ class p_queue_fast : public internal::site_set_base_< P, p_queue_fast<P> >
{
public:
Index: mln/core/p_image2d.hh
--- mln/core/p_image2d.hh (revision 1950)
+++ mln/core/p_image2d.hh (working copy)
@@ -55,7 +55,7 @@
template <typename P> struct p_image2d_bkd_piter_;
template <typename P>
- class p_image2d : public internal::point_set_base_<P, p_image2d<P> >
+ class p_image2d : public internal::site_set_base_<P, p_image2d<P> >
{
public:
Index: mln/core/p_line_graph.hh
--- mln/core/p_line_graph.hh (revision 1950)
+++ mln/core/p_line_graph.hh (working copy)
@@ -53,7 +53,7 @@
template<typename P>
struct p_line_graph
- : public internal::point_set_base_< line_graph_psite<P>, p_line_graph<P> >
+ : public internal::site_set_base_< line_graph_psite<P>, p_line_graph<P> >
{
typedef util::graph<P> graph;
Index: mln/core/box.hh
--- mln/core/box.hh (revision 1950)
+++ mln/core/box.hh (working copy)
@@ -42,12 +42,29 @@
namespace mln
{
- // fwd decl
+ // Fwd decls.
+ template <typename P> struct box_;
template <typename P> struct box_fwd_piter_;
template <typename P> struct box_bkd_piter_;
- /*! \brief Generic box class.
+ namespace trait
+ {
+
+ template <typename P>
+ struct site_set_< box_<P> >
+ {
+ typedef trait::site_set::nsites::known nsites;
+ typedef trait::site_set::bbox::straight bbox;
+ typedef trait::site_set::contents::fixed contents;
+ typedef trait::site_set::arity::unique arity;
+ };
+
+ } // end of namespace trait
+
+
+ /*! \brief Generic box class: site set containing points of a
+ * regular grid.
*
* Parameter \c P is the corresponding type of point.
*/
@@ -58,22 +75,16 @@
/// Dimension.
enum { dim = P::dim };
- /// Mesh associated type.
- typedef mln_mesh(P) mesh;
-
- /// Point_Site associated type.
+ /// PSite associated type.
typedef P psite;
- /// Point associated type.
- typedef P point;
-
- /// Dpoint associated type.
- typedef mln_dpoint(P) dpoint;
+ /// Site associated type.
+ typedef P site;
- /// Forward Point_Iterator associated type.
+ /// Forward Site_Iterator associated type.
typedef box_fwd_piter_<P> fwd_piter;
- /// Backward Point_Iterator associated type.
+ /// Backward Site_Iterator associated type.
typedef box_bkd_piter_<P> bkd_piter;
/// Minimum point.
@@ -92,7 +103,7 @@
box_();
/// Constructor of a box going from \p pmin to \p pmax.
- box_(const point& pmin, const point& pmax);
+ box_(const site& pmin, const site& pmax);
/// \{ Constructors with different numbers of arguments
/// (sizes) w.r.t. the dimension.
@@ -173,7 +184,7 @@
template <typename P>
inline
- box_<P>::box_(const point& pmin, const point& pmax)
+ box_<P>::box_(const site& pmin, const site& pmax)
: pmin_(pmin),
pmax_(pmax)
{
Index: mln/core/p_queue.hh
--- mln/core/p_queue.hh (revision 1950)
+++ mln/core/p_queue.hh (working copy)
@@ -63,7 +63,7 @@
* a call to npoints() when this container is multiple.
*/
template <typename P>
- class p_queue : public internal::point_set_base_< P, p_queue<P> >
+ class p_queue : public internal::site_set_base_< P, p_queue<P> >
{
public:
Index: mln/core/p_graph.hh
--- mln/core/p_graph.hh (revision 1950)
+++ mln/core/p_graph.hh (working copy)
@@ -47,7 +47,7 @@
template<typename P>
struct p_graph
- : public internal::point_set_base_< graph_psite<P>, p_graph<P> >
+ : public internal::site_set_base_< graph_psite<P>, p_graph<P> >
{
typedef util::graph<P> graph;
Index: mln/core/p_priority_queue.hh
--- mln/core/p_priority_queue.hh (revision 1950)
+++ mln/core/p_priority_queue.hh (working copy)
@@ -63,7 +63,7 @@
* a call to npoints() when this container is multiple.
*/
template <typename P, typename T>
- class p_priority_queue : public internal::point_set_base_< P, p_priority_queue<P, T> >
+ class p_priority_queue : public internal::site_set_base_< P, p_priority_queue<P, T> >
{
public:
Index: mln/core/p_set.hh
--- mln/core/p_set.hh (revision 1950)
+++ mln/core/p_set.hh (working copy)
@@ -50,7 +50,7 @@
* \todo Test if \p P being a Point_Site is ok.
*/
template <typename P>
- class p_set : public internal::point_set_base_< P, p_set<P> >,
+ class p_set : public internal::site_set_base_< P, p_set<P> >,
private internal::set_of_<P>
{
typedef internal::set_of_<P> super_;
Index: mln/core/line2d.hh
--- mln/core/line2d.hh (revision 1950)
+++ mln/core/line2d.hh (working copy)
@@ -47,7 +47,7 @@
/*! \brief 2D line point set class.
*/
- class line2d : public internal::point_set_base_< point2d, line2d >
+ class line2d : public internal::site_set_base_< point2d, line2d >
{
public:
Index: mln/core/p_bgraph.hh
--- mln/core/p_bgraph.hh (revision 1950)
+++ mln/core/p_bgraph.hh (working copy)
@@ -49,7 +49,7 @@
template<typename P>
struct p_bgraph
- : public internal::point_set_base_< graph_psite<P>, p_bgraph<P> >
+ : public internal::site_set_base_< graph_psite<P>, p_bgraph<P> >
{
typedef util::internal::boost_graph<P, util::empty> graph;
Index: mln/core/p_run.hh
--- mln/core/p_run.hh (revision 1950)
+++ mln/core/p_run.hh (working copy)
@@ -53,7 +53,7 @@
* \todo Test if \p P being a Point_Site is ok.
*/
template <typename P>
- class p_run : public internal::point_set_base_< P, p_run<P> >
+ class p_run : public internal::site_set_base_< P, p_run<P> >
{
public:
Index: mln/core/pset_if.hh
--- mln/core/pset_if.hh (revision 1950)
+++ mln/core/pset_if.hh (working copy)
@@ -65,10 +65,10 @@
* from point to Boolean.
*/
template <typename S, typename F>
- class pset_if : public internal::point_set_base_< mln_psite(S), pset_if<S,F> >
+ class pset_if : public internal::site_set_base_< mln_psite(S), pset_if<S,F> >
{
typedef pset_if<S,F> self_;
- typedef internal::point_set_base_<mln_psite(S), self_> super_;
+ typedef internal::site_set_base_<mln_psite(S), self_> super_;
public:
typedef mln_psite(super_) psite;
Index: mln/core/p_array.hh
--- mln/core/p_array.hh (revision 1950)
+++ mln/core/p_array.hh (working copy)
@@ -57,7 +57,7 @@
* \todo Make it work with P being a Point_Site.
*/
template <typename P>
- class p_array : public internal::point_set_base_< P, p_array<P> >
+ class p_array : public internal::site_set_base_< P, p_array<P> >
{
public:
/// The associated psite type.
Index: mln/core/concept/box.hh
--- mln/core/concept/box.hh (revision 1950)
+++ mln/core/concept/box.hh (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -29,6 +29,7 @@
# define MLN_CORE_CONCEPT_BOX_HH
/*! \file mln/core/concept/box.hh
+ *
* \brief Definition of the concept of mln::Box.
*/
@@ -40,8 +41,8 @@
/*! \brief Base class for implementation classes of boxes.
*
- * Boxes are particular point sets useful to bound any set of
- * points.
+ * Boxes are particular site sets useful to bound any set of
+ * sites defined on a regular grid.
*
* \see mln::doc::Box for a complete documentation of this class
* contents.
@@ -50,35 +51,35 @@
struct Box : public Site_Set<E>
{
/*
- const point& pmin() const;
- const point& pmax() const;
+ const site& pmin() const;
+ const site& pmax() const;
*/
/*! \brief Give the length of the \p i-th side of the box.
*
- * \pre i < point::dim
+ * \pre i < site::dim
*
* \warning This method is final for all box classes.
*/
unsigned len(unsigned i) const;
- /*! \brief Give the bounding box of this point set.
+ /*! \brief Give the bounding box of this site set.
*
- * Return the bounding box of this point set, so that is itself.
+ * Return the bounding box of this site set, so that is itself.
* This method is declared by the mln::Site_Set concept.
*
* \warning This method is final for all box classes.
*/
const E& bbox() const;
- /*! \brief Give the number of points of this box.
+ /*! \brief Give the number of sites of this box.
*
- * Return the number of points of this box. This method is
+ * Return the number of sites of this box. This method is
* declared by the mln::Site_Set concept.
*
* \warning This method is final for all box classes.
*/
- std::size_t npoints() const;
+ std::size_t nsites() const;
protected:
Box();
@@ -144,20 +145,20 @@
inline
Box<E>::Box()
{
- typedef mln_point(E) point;
- point (E::*m1)() const = & E::pmin;
+ typedef mln_site(E) site;
+ site (E::*m1)() const = & E::pmin;
m1 = 0;
- point (E::*m2)() const = & E::pmax;
+ site (E::*m2)() const = & E::pmax;
m2 = 0;
}
template <typename E>
inline
std::size_t
- Box<E>::npoints() const
+ Box<E>::nsites() const
{
std::size_t count = 1;
- typedef mln_point(E) P; // helps g++-3.3.5
+ typedef mln_site(E) P; // helps g++-3.3.5
for (unsigned i = 0; i < P::dim; ++i)
count *= exact(this)->len(i);
return count;
@@ -183,7 +184,7 @@
// FIXME: Same grid!
const Bl& lhs = exact(lhs_);
const Br& rhs = exact(rhs_);
- typedef mln_point(Bl) P;
+ typedef mln_site(Bl) P;
for (unsigned i = 0; i < P::dim; ++i)
if (lhs.pmin()[i] < rhs.pmin()[i] ||
lhs.pmax()[i] > rhs.pmax()[i])
Index: mln/core/concept/point_set.hh
--- mln/core/concept/point_set.hh (revision 1950)
+++ mln/core/concept/point_set.hh (working copy)
@@ -32,14 +32,13 @@
*
* \brief Definition of the concept of mln::Site_Set.
*
- * \todo Think about adding an 'insert' method (not so easy because of
- * pset_if...)
- *
* \todo Move out the ops.
*/
# include <mln/core/concept/point_site.hh>
# include <mln/core/concept/point_iterator.hh>
+# include <mln/trait/site_sets.hh>
+# include <mln/metal/not_equal.hh>
namespace mln
@@ -57,7 +56,7 @@
};
- /*! \brief Base class for implementation classes of point sets.
+ /*! \brief Base class for implementation classes of site sets.
*
* \see mln::doc::Site_Set for a complete documentation of this
* class contents.
@@ -68,19 +67,13 @@
typedef Site_Set<void> category;
/*
- typedef mesh;
-
- typedef point;
+ typedef site;
typedef psite;
typedef fwd_piter;
typedef bkd_piter;
bool has(const psite& p) const;
- std::size_t npoints() const;
-
- // FIXME: No longer required (at least, not this way).
- const box_<point>& bbox() const;
*/
protected:
@@ -88,10 +81,10 @@
};
- /*! \brief Equality test between point sets \p lhs and \p rhs.
+ /*! \brief Equality test between site sets \p lhs and \p rhs.
*
- * \param[in] lhs A point set.
- * \param[in] rhs Another point set.
+ * \param[in] lhs A site set.
+ * \param[in] rhs Another site set.
*
* \relates mln::Site_Set
*/
@@ -100,10 +93,10 @@
- /*! \brief Inclusion test between point sets \p lhs and \p rhs.
+ /*! \brief Inclusion test between site sets \p lhs and \p rhs.
*
- * \param[in] lhs A point set (included?).
- * \param[in] rhs Another point set (includer?).
+ * \param[in] lhs A site set (included?).
+ * \param[in] rhs Another site set (includer?).
*
* \relates mln::Site_Set
*/
@@ -112,11 +105,11 @@
- /*! \brief Strict inclusion test between point sets \p lhs and \p
+ /*! \brief Strict inclusion test between site sets \p lhs and \p
* rhs.
*
- * \param[in] lhs A point set (strictly included?).
- * \param[in] rhs Another point set (includer?).
+ * \param[in] lhs A site set (strictly included?).
+ * \param[in] rhs Another site set (includer?).
*
* \relates mln::Site_Set
*/
@@ -125,18 +118,18 @@
- /*! \brief Print a point set \p pset into the output stream \p
+ /*! \brief Print a site set \p set into the output stream \p
* ostr.
*
* \param[in,out] ostr An output stream.
- * \param[in] pset A point set.
+ * \param[in] set A site set.
*
* \return The modified output stream \p ostr.
*
* \relates mln::Site_Set
*/
template <typename S>
- std::ostream& operator<<(std::ostream& ostr, const Site_Set<S>& pset);
+ std::ostream& operator<<(std::ostream& ostr, const Site_Set<S>& set);
@@ -149,21 +142,21 @@
inline
Site_Set<E>::Site_Set()
{
- typedef mln_mesh(E) mesh;
+ // Check properties.
+ mlc_not_equal( mln_trait_site_set_nsites(E), mln::trait::undef )::check();
+ mlc_not_equal( mln_trait_site_set_bbox(E), mln::trait::undef )::check();
+ mlc_not_equal( mln_trait_site_set_contents(E), mln::trait::undef )::check();
+ mlc_not_equal( mln_trait_site_set_arity(E), mln::trait::undef )::check();
- typedef mln_point(E) point;
+ // Check associated types.
+ typedef mln_site(E) site;
typedef mln_psite(E) psite;
-
typedef mln_fwd_piter(E) fwd_piter;
typedef mln_bkd_piter(E) bkd_piter;
- bool (E::*m1)(const psite& p) const = & E::has;
- m1 = 0;
- // FIXME: No longer required (at least, not this way).
-// const box_<point>& (E::*m2)() const = & E::bbox;
-// m2 = 0;
- std::size_t (E::*m3)() const = & E::npoints;
- m3 = 0;
+ // Check methods.
+ bool (E::*m)(const psite& p) const = & E::has;
+ m = 0;
}
@@ -178,10 +171,6 @@
const Sl& lhs = exact(lhs_);
const Sr& rhs = exact(rhs_);
- // easy test:
- if (lhs.npoints() != rhs.npoints())
- return false;
-
// exhaustive test:
mln_fwd_piter(Sl) pl(lhs);
mln_fwd_piter(Sr) pr(rhs);
@@ -205,10 +194,6 @@
const Sl& lhs = exact(lhs_);
const Sr& rhs = exact(rhs_);
- // easy test:
- if (lhs.npoints() > rhs.npoints())
- return false;
-
// exhaustive test:
mln_piter(Sl) pl(lhs);
for_all(pl)
@@ -226,17 +211,17 @@
// FIXME: Same grid!
const Sl& lhs = exact(lhs_);
const Sr& rhs = exact(rhs_);
- return lhs <= rhs && lhs.npoints() != rhs.npoints();
+ return lhs <= rhs && lhs != rhs;
}
template <typename S>
inline
- std::ostream& operator<<(std::ostream& ostr, const Site_Set<S>& pset_)
+ std::ostream& operator<<(std::ostream& ostr, const Site_Set<S>& set_)
{
- const S& pset = exact(pset_);
+ const S& set = exact(set_);
ostr << '{';
- mln_piter(S) p(pset);
+ mln_piter(S) p(set);
for_all(p)
ostr << p;
return ostr << '}';
Index: mln/core/concept/doc/box.hh
--- mln/core/concept/doc/box.hh (revision 1950)
+++ mln/core/concept/doc/box.hh (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -26,6 +26,7 @@
// Public License.
/*! \file mln/core/concept/doc/box.hh
+ *
* \brief This file documents the concept of mln::Box.
*/
@@ -47,7 +48,7 @@
* For instance, with mln::box2d, this minimum is the top left
* point of the box.
*/
- const point& pmin() const;
+ const site& pmin() const;
/*! \brief Give the box "maximum" point.
*
@@ -55,7 +56,7 @@
* For instance, with mln::box2d, this maximum is the bottom
* right point of the box.
*/
- const point& pmax() const;
+ const site& pmax() const;
/*! \brief Return the bounding box of this point set.
*
@@ -73,7 +74,7 @@
*
* \warning This method is final for all box classes.
*/
- std::size_t npoints() const;
+ std::size_t nsites() const;
};
} // end of namespace mln::doc
Index: mln/core/concept/doc/point_set.hh
--- mln/core/concept/doc/point_set.hh (revision 1950)
+++ mln/core/concept/doc/point_set.hh (working copy)
@@ -42,36 +42,28 @@
template <typename E>
struct Site_Set : public Object<E>
{
- /*! \brief Point associated type.
+ /*! \brief Site associated type.
*/
- typedef void point;
+ typedef void site;
- /*! \brief Point_Site associated type.
+ /*! \brief PSite associated type.
*/
typedef void psite;
- /*! \brief Forward Point_Iterator associated type.
+ /*! \brief Forward Site_Iterator associated type.
*/
typedef void fwd_piter;
- /*! \brief Backward Point_Iterator associated type.
+ /*! \brief Backward Site_Iterator associated type.
*/
typedef void bkd_piter;
- /*! \brief Test if \p p belongs to this point set.
+ /*! \brief Test if \p p belongs to this site set.
*
- * \param[in] p A point site.
- * \return True if \p p is an element of the point set.
+ * \param[in] p A psite.
+ * \return True if \p p is an element of the site set.
*/
bool has(const psite& p) const;
-
- /*! \brief Give the bounding box of this point set.
- */
- const box_<point>& bbox() const;
-
- /*! \brief Give the number of points of this point set.
- */
- std::size_t npoints() const;
};
} // end of namespace mln::doc
Index: mln/core/p_runs.hh
--- mln/core/p_runs.hh (revision 1950)
+++ mln/core/p_runs.hh (working copy)
@@ -57,7 +57,7 @@
* Parameter \c P is the type of the image point.
*/
template <typename P>
- class p_runs_ : public internal::point_set_base_< runs_psite<P>, p_runs_<P> >
+ class p_runs_ : public internal::site_set_base_< runs_psite<P>, p_runs_<P> >
{
public:
Index: mln/metal/not_equal.hh
--- mln/metal/not_equal.hh (revision 0)
+++ mln/metal/not_equal.hh (revision 0)
@@ -0,0 +1,63 @@
+// Copyright (C) 2008 EPITA Research and Development Laboratory
+//
+// 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_METAL_NOT_EQUAL_HH
+# define MLN_METAL_NOT_EQUAL_HH
+
+/*!
+ * \file mln/metal/not_equal.hh
+ *
+ * \brief FIXME.
+ */
+
+# include <mln/metal/bool.hh>
+
+
+# define mlc_not_equal(T1, T2) mln::metal::not_equal< T1, T2 >
+
+
+namespace mln
+{
+
+ namespace metal
+ {
+
+ template <typename T1, typename T2>
+ struct not_equal : true_
+ {};
+
+ template <typename T>
+ struct not_equal< T, T > : false_
+ {};
+
+
+ } // end of namespace mln::metal
+
+} // end of namespace mln
+
+
+#endif // ! MLN_METAL_NOT_EQUAL_HH
Index: mln/metal/all.hh
--- mln/metal/all.hh (revision 1950)
+++ mln/metal/all.hh (working copy)
@@ -56,6 +56,7 @@
# include <mln/metal/bexpr.hh>
# include <mln/metal/bool.hh>
# include <mln/metal/equal.hh>
+# include <mln/metal/not_equal.hh>
# include <mln/metal/if.hh>
# include <mln/metal/converts_to.hh>
1
0
https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Rename Point_Set as Site_Set.
* .,
* tools,
* tests,
* tests/trait,
* tests/trait/image,
* tests/trait/value,
* tests/trait/op,
* tests/subsampling,
* tests/debug,
* tests/histo,
* tests/core,
* tests/literal,
* tests/neighb,
* tests/draw,
* tests/metal,
* tests/metal/math,
* tests/level,
* tests/level/approx,
* tests/level/naive,
* tests/arith,
* tests/linear,
* tests/linear/local,
* tests/accu,
* tests/value,
* tests/value/builtin,
* tests/border,
* tests/test,
* tests/convert,
* tests/estim,
* tests/pw,
* tests/geom,
* tests/fun/x2x,
* tests/fun/vv2v,
* tests/fun/v2v,
* tests/binarization,
* tests/set,
* tests/win,
* tests/algebra,
* tests/morpho,
* tests/display,
* tests/io/pgm,
* tests/io/fits,
* tests/io/ppm,
* tests/io/pbm,
* tests/logical,
* tests/canvas,
* tests/canvas/browsing,
* tests/norm,
* tests/util,
* tests/labeling,
* mln/core/internal/point_set_base.hh,
* mln/core/internal/image_base.hh,
* mln/core/sub_image.hh,
* mln/core/p_array_piter.hh,
* mln/core/p_image2d.hh,
* mln/core/pset_if.hh,
* mln/core/concept/box.hh,
* mln/core/concept/point_set.hh,
* mln/core/concept/doc/image.hh,
* mln/core/concept/doc/box.hh: Ignore .deps.
* mln/core/concept/doc/point_set.hh,
* mln/neighb/image.hh,
* mln/value/stack.hh,
* mln/test/predicate.hh,
* mln/convert/to_image.hh,
* mln/convert/to_std_set.hh,
* mln/convert/to_window.hh,
* mln/convert/to_p_set.hh,
* mln/convert/to_p_array.hh,
* mln/pw/image.hh,
* mln/geom/pmin_pmax.hh,
* mln/geom/bbox.hh,
* mln/set/inter.hh,
* mln/set/is_subset_of.hh,
* mln/set/diff.hh,
* mln/set/uni.hh,
* mln/set/sym_diff.hh (Point_Set): Rename as...
(Site_Set): ...this.
* mln/trait/site_set: New directory.
* mln/trait/site_set/props.hh: New.
* mln/trait/site_set/print.hh: New.
* mln/trait/site_sets.hh: New.
convert/to_image.hh | 4 -
convert/to_p_array.hh | 4 -
convert/to_p_set.hh | 4 -
convert/to_std_set.hh | 4 -
convert/to_window.hh | 4 -
core/concept/box.hh | 6 +-
core/concept/doc/box.hh | 6 +-
core/concept/doc/image.hh | 2
core/concept/doc/point_set.hh | 8 +--
core/concept/point_set.hh | 42 +++++++++---------
core/internal/image_base.hh | 2
core/internal/point_set_base.hh | 2
core/p_array_piter.hh | 8 +--
core/p_image2d.hh | 8 +--
core/pset_if.hh | 4 -
core/sub_image.hh | 8 +--
geom/bbox.hh | 6 +-
geom/pmin_pmax.hh | 10 ++--
neighb/image.hh | 2
pw/image.hh | 8 +--
set/diff.hh | 8 +--
set/inter.hh | 6 +-
set/is_subset_of.hh | 6 +-
set/sym_diff.hh | 6 +-
set/uni.hh | 6 +-
test/predicate.hh | 6 +-
trait/site_set/print.hh | 93 ++++++++++++++++++++++++++++++++++++++++
trait/site_set/props.hh | 93 ++++++++++++++++++++++++++++++++++++++++
trait/site_sets.hh | 75 ++++++++++++++++++++++++++++++++
value/stack.hh | 2
30 files changed, 352 insertions(+), 91 deletions(-)
Index: mln/trait/site_set/props.hh
--- mln/trait/site_set/props.hh (revision 0)
+++ mln/trait/site_set/props.hh (revision 0)
@@ -0,0 +1,93 @@
+// Copyright (C) 2008 EPITA Research and Development Laboratory
+//
+// 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_TRAIT_SITE_SET_PROPS_HH
+# define MLN_TRAIT_SITE_SET_PROPS_HH
+
+/*! \file mln/trait/site_set/props.hh
+ *
+ * \brief Properties of site set classes.
+ */
+
+# include <string>
+# include <mln/trait/undef.hh>
+
+
+namespace mln
+{
+
+ namespace trait
+ {
+
+ namespace site_set
+ {
+
+ struct nsites
+ {
+ struct any {};
+ struct unknown : any { std::string name() const { return "nsites::unknown"; } };
+ struct known : any { std::string name() const { return "nsites::known"; } };
+ };
+
+ struct bbox
+ {
+ struct any {};
+ struct unknown : any { std::string name() const { return "bbox::unknown"; } };
+ struct known : any {};
+ struct lazy : known { std::string name() const { return "bbox::lazy"; } };
+ struct straight : known { std::string name() const { return "bbox::straight"; } };
+ };
+
+ struct contents
+ {
+ struct any {};
+ struct fixed : any { std::string name() const { return "contents::fixed"; } };
+ struct dynamic : any {};
+ struct growing : dynamic { std::string name() const { return "contents::growing"; } };
+ struct free : dynamic { std::string name() const { return "contents::dynamic"; } };
+ };
+
+ struct arity
+ {
+ struct any {};
+ struct unique : any { std::string name() const { return "arity::unique"; } };
+ struct multiple : any { std::string name() const { return "arity::multiple"; } };
+ };
+
+
+ // FIXME: support = psite::support
+
+
+ } // end of namespace mln::trait::site_set
+
+ } // end of namespace mln::trait
+
+
+} // end of namespace mln
+
+
+#endif // ! MLN_TRAIT_SITE_SET_PROPS_HH
Index: mln/trait/site_set/print.hh
--- mln/trait/site_set/print.hh (revision 0)
+++ mln/trait/site_set/print.hh (revision 0)
@@ -0,0 +1,93 @@
+// Copyright (C) 2008 EPITA Research and Development Laboratory
+//
+// 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_TRAIT_SITE_SET_PRINT_HH
+# define MLN_TRAIT_SITE_SET_PRINT_HH
+
+/*! \file mln/trait/site_set/print.hh
+ *
+ * \brief Print the collection of traits for a site set type.
+ */
+
+# include <iostream>
+# include <mln/trait/site_sets.hh>
+# include <mln/metal/is_a.hh>
+
+
+
+namespace mln
+{
+
+ // Fwd decl.
+ template <typename E> struct Site_Set;
+
+
+ namespace trait
+ {
+
+ namespace site_set
+ {
+
+ template <typename S>
+ void print(std::ostream& ostr);
+
+ template <typename S>
+ void print(const Site_Set<S>& ima, std::ostream& ostr);
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ template <typename S>
+ inline
+ void print(std::ostream& ostr)
+ {
+ mlc_is_a(S, Site_Set)::check();
+ typedef mln::trait::site_set_<S> the;
+ ostr << "{ "
+ << typename the::nsites() .name() << ", "
+ << typename the::bbox() .name() << ", "
+ << typename the::contents().name() << ", "
+ << typename the::arity() .name() << " }" << std::endl;
+ }
+
+ template <typename S>
+ inline
+ void print(const Site_Set<S>&, std::ostream& ostr)
+ {
+ print<S>(ostr);
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::trait::site_set
+
+ } // end of namespace mln::trait
+
+} // end of namespace mln
+
+
+#endif // ! MLN_TRAIT_SITE_SET_PRINT_HH
Index: mln/trait/site_sets.hh
--- mln/trait/site_sets.hh (revision 0)
+++ mln/trait/site_sets.hh (revision 0)
@@ -0,0 +1,75 @@
+// Copyright (C) 2008 EPITA Research and Development Laboratory
+//
+// 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_TRAIT_SITE_SETS_HH
+# define MLN_TRAIT_SITE_SETS_HH
+
+/*! \file mln/trait/site_sets.hh
+ *
+ * \brief Some base trait types for site sets.
+ */
+
+# include <mln/trait/undef.hh>
+# include <mln/trait/site_set/props.hh>
+
+
+# define mln_trait_site_set_nsites(S) typename mln::trait::site_set_< S >::nsites
+# define mln_trait_site_set_bbox(S) typename mln::trait::site_set_< S >::bbox
+# define mln_trait_site_set_contents(S) typename mln::trait::site_set_< S >::contents
+# define mln_trait_site_set_arity(S) typename mln::trait::site_set_< S >::arity
+
+
+
+namespace mln
+{
+
+ namespace trait
+ {
+
+ template <typename I>
+ struct undefined_site_set_
+ {
+ typedef undef nsites; // Known or unknown.
+ typedef undef bbox; // Unknown, lazy, or straight.
+ typedef undef contents; // Fixed, growing, or free.
+ typedef undef arity; // Unique or multiple.
+ };
+
+ template <typename I>
+ struct site_set_ : undefined_site_set_<I>
+ {
+ };
+
+ } // end of namespace mln::trait
+
+} // end of namespace mln
+
+
+# include <mln/trait/site_set/print.hh>
+
+
+#endif // ! MLN_TRAIT_SITE_SETS_HH
Index: mln/core/internal/point_set_base.hh
--- mln/core/internal/point_set_base.hh (revision 1949)
+++ mln/core/internal/point_set_base.hh (working copy)
@@ -47,7 +47,7 @@
* \p P is a point site type.
*/
template <typename P, typename E>
- struct point_set_base_ : public Point_Set<E>
+ struct point_set_base_ : public Site_Set<E>
{
/// Point_Site associated type.
typedef P psite;
Index: mln/core/internal/image_base.hh
--- mln/core/internal/image_base.hh (revision 1949)
+++ mln/core/internal/image_base.hh (working copy)
@@ -97,7 +97,7 @@
public image_checked_<E>
{
- /// Point_Set associated type.
+ /// Site_Set associated type.
typedef S pset;
Index: mln/core/sub_image.hh
--- mln/core/sub_image.hh (revision 1949)
+++ mln/core/sub_image.hh (working copy)
@@ -120,10 +120,10 @@
template <typename I, typename S>
- sub_image<const I, S> operator|(const Image<I>& ima, const Point_Set<S>& pset);
+ sub_image<const I, S> operator|(const Image<I>& ima, const Site_Set<S>& pset);
template <typename I, typename S>
- sub_image<I, S> operator|(Image<I>& ima, const Point_Set<S>& pset);
+ sub_image<I, S> operator|(Image<I>& ima, const Site_Set<S>& pset);
@@ -211,7 +211,7 @@
template <typename I, typename S>
inline
sub_image<const I, S>
- operator|(const Image<I>& ima, const Point_Set<S>& pset)
+ operator|(const Image<I>& ima, const Site_Set<S>& pset)
{
sub_image<const I, S> tmp(exact(ima), exact(pset));
return tmp;
@@ -220,7 +220,7 @@
template <typename I, typename S>
inline
sub_image<I, S>
- operator|(Image<I>& ima, const Point_Set<S>& pset)
+ operator|(Image<I>& ima, const Site_Set<S>& pset)
{
sub_image<I, S> tmp(exact(ima), exact(pset));
return tmp;
Index: mln/core/p_array_piter.hh
--- mln/core/p_array_piter.hh (revision 1949)
+++ mln/core/p_array_piter.hh (working copy)
@@ -55,7 +55,7 @@
/// Coordinate associated type.
template <typename S>
- p_array_fwd_piter_(const Point_Set<S>& s);
+ p_array_fwd_piter_(const Site_Set<S>& s);
/// Reference of the corresponding psite.
const psite& to_psite() const;
@@ -108,7 +108,7 @@
/// Coordinate associated type.
template <typename S>
- p_array_bkd_piter_(const Point_Set<S>& s);
+ p_array_bkd_piter_(const Site_Set<S>& s);
/// Reference of the corresponding psite.
const psite& to_psite() const;
@@ -157,7 +157,7 @@
template <typename P>
template <typename S>
inline
- p_array_fwd_piter_<P>::p_array_fwd_piter_(const Point_Set<S>& s)
+ p_array_fwd_piter_<P>::p_array_fwd_piter_(const Site_Set<S>& s)
: vect_(exact(s).vect())
{
invalidate();
@@ -241,7 +241,7 @@
template <typename P>
template <typename S>
inline
- p_array_bkd_piter_<P>::p_array_bkd_piter_(const Point_Set<S>& s)
+ p_array_bkd_piter_<P>::p_array_bkd_piter_(const Site_Set<S>& s)
: vect_(exact(s).vect())
{
invalidate();
Index: mln/core/p_image2d.hh
--- mln/core/p_image2d.hh (revision 1949)
+++ mln/core/p_image2d.hh (working copy)
@@ -74,12 +74,12 @@
/// Insert a point \p p.
p_image2d<P>& insert(const P p);
template <typename S>
- p_image2d<P>& insert(const Point_Set<S>& set);
+ p_image2d<P>& insert(const Site_Set<S>& set);
/// Remove a point \p p.
p_image2d<P>& remove(const P p);
template <typename S>
- p_image2d<P>& remove(const Point_Set<S>& set);
+ p_image2d<P>& remove(const Site_Set<S>& set);
/// Give the number of points.
unsigned npoints() const;
@@ -144,7 +144,7 @@
template <typename P>
template <typename S>
p_image2d<P>&
- p_image2d<P>::insert(const Point_Set<S>& set_)
+ p_image2d<P>::insert(const Site_Set<S>& set_)
{
const S& set = exact(set_);
mln_fwd_piter(S) p(set);
@@ -178,7 +178,7 @@
template <typename P>
template <typename S>
p_image2d<P>&
- p_image2d<P>::remove(const Point_Set<S>& set_)
+ p_image2d<P>::remove(const Site_Set<S>& set_)
{
const S& set = exact(set_);
if (this->is_empty())
Index: mln/core/pset_if.hh
--- mln/core/pset_if.hh (revision 1949)
+++ mln/core/pset_if.hh (working copy)
@@ -55,7 +55,7 @@
*/
template <typename S, typename F>
pset_if<S, F>
- operator | (const Point_Set<S>& pset, const Function_p2b<F>& f);
+ operator | (const Site_Set<S>& pset, const Function_p2b<F>& f);
@@ -119,7 +119,7 @@
template <typename S, typename F>
inline
pset_if<S, F>
- operator | (const Point_Set<S>& pset, const Function_p2b<F>& f)
+ operator | (const Site_Set<S>& pset, const Function_p2b<F>& f)
{
pset_if<S, F> tmp(exact(pset), exact(f));
return tmp;
Index: mln/core/concept/box.hh
--- mln/core/concept/box.hh (revision 1949)
+++ mln/core/concept/box.hh (working copy)
@@ -47,7 +47,7 @@
* contents.
*/
template <typename E>
- struct Box : public Point_Set<E>
+ struct Box : public Site_Set<E>
{
/*
const point& pmin() const;
@@ -65,7 +65,7 @@
/*! \brief Give the bounding box of this point set.
*
* Return the bounding box of this point set, so that is itself.
- * This method is declared by the mln::Point_Set concept.
+ * This method is declared by the mln::Site_Set concept.
*
* \warning This method is final for all box classes.
*/
@@ -74,7 +74,7 @@
/*! \brief Give the number of points of this box.
*
* Return the number of points of this box. This method is
- * declared by the mln::Point_Set concept.
+ * declared by the mln::Site_Set concept.
*
* \warning This method is final for all box classes.
*/
Index: mln/core/concept/point_set.hh
--- mln/core/concept/point_set.hh (revision 1949)
+++ mln/core/concept/point_set.hh (working copy)
@@ -30,7 +30,7 @@
/*! \file mln/core/concept/point_set.hh
*
- * \brief Definition of the concept of mln::Point_Set.
+ * \brief Definition of the concept of mln::Site_Set.
*
* \todo Think about adding an 'insert' method (not so easy because of
* pset_if...)
@@ -46,12 +46,12 @@
{
// Fwd decl.
- template <typename E> struct Point_Set;
+ template <typename E> struct Site_Set;
- /// Point_Set category flag type.
+ /// Site_Set category flag type.
template <>
- struct Point_Set<void>
+ struct Site_Set<void>
{
typedef Object<void> super;
};
@@ -59,13 +59,13 @@
/*! \brief Base class for implementation classes of point sets.
*
- * \see mln::doc::Point_Set for a complete documentation of this
+ * \see mln::doc::Site_Set for a complete documentation of this
* class contents.
*/
template <typename E>
- struct Point_Set : public Object<E>
+ struct Site_Set : public Object<E>
{
- typedef Point_Set<void> category;
+ typedef Site_Set<void> category;
/*
typedef mesh;
@@ -84,7 +84,7 @@
*/
protected:
- Point_Set();
+ Site_Set();
};
@@ -93,10 +93,10 @@
* \param[in] lhs A point set.
* \param[in] rhs Another point set.
*
- * \relates mln::Point_Set
+ * \relates mln::Site_Set
*/
template <typename Sl, typename Sr>
- bool operator==(const Point_Set<Sl>& lhs, const Point_Set<Sr>& rhs);
+ bool operator==(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs);
@@ -105,10 +105,10 @@
* \param[in] lhs A point set (included?).
* \param[in] rhs Another point set (includer?).
*
- * \relates mln::Point_Set
+ * \relates mln::Site_Set
*/
template <typename Sl, typename Sr>
- bool operator<=(const Point_Set<Sl>& lhs, const Point_Set<Sr>& rhs);
+ bool operator<=(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs);
@@ -118,10 +118,10 @@
* \param[in] lhs A point set (strictly included?).
* \param[in] rhs Another point set (includer?).
*
- * \relates mln::Point_Set
+ * \relates mln::Site_Set
*/
template <typename Sl, typename Sr>
- bool operator<(const Point_Set<Sl>& lhs, const Point_Set<Sr>& rhs);
+ bool operator<(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs);
@@ -133,10 +133,10 @@
*
* \return The modified output stream \p ostr.
*
- * \relates mln::Point_Set
+ * \relates mln::Site_Set
*/
template <typename S>
- std::ostream& operator<<(std::ostream& ostr, const Point_Set<S>& pset);
+ std::ostream& operator<<(std::ostream& ostr, const Site_Set<S>& pset);
@@ -147,7 +147,7 @@
template <typename E>
inline
- Point_Set<E>::Point_Set()
+ Site_Set<E>::Site_Set()
{
typedef mln_mesh(E) mesh;
@@ -172,7 +172,7 @@
template <typename Sl, typename Sr>
inline
- bool operator==(const Point_Set<Sl>& lhs_, const Point_Set<Sr>& rhs_)
+ bool operator==(const Site_Set<Sl>& lhs_, const Site_Set<Sr>& rhs_)
{
// FIXME: Same grid!
const Sl& lhs = exact(lhs_);
@@ -199,7 +199,7 @@
template <typename Sl, typename Sr>
inline
- bool operator<=(const Point_Set<Sl>& lhs_, const Point_Set<Sr>& rhs_)
+ bool operator<=(const Site_Set<Sl>& lhs_, const Site_Set<Sr>& rhs_)
{
// FIXME: Same grid!
const Sl& lhs = exact(lhs_);
@@ -221,7 +221,7 @@
template <typename Sl, typename Sr>
inline
- bool operator<(const Point_Set<Sl>& lhs_, const Point_Set<Sr>& rhs_)
+ bool operator<(const Site_Set<Sl>& lhs_, const Site_Set<Sr>& rhs_)
{
// FIXME: Same grid!
const Sl& lhs = exact(lhs_);
@@ -232,7 +232,7 @@
template <typename S>
inline
- std::ostream& operator<<(std::ostream& ostr, const Point_Set<S>& pset_)
+ std::ostream& operator<<(std::ostream& ostr, const Site_Set<S>& pset_)
{
const S& pset = exact(pset_);
ostr << '{';
Index: mln/core/concept/doc/image.hh
--- mln/core/concept/doc/image.hh (revision 1949)
+++ mln/core/concept/doc/image.hh (working copy)
@@ -117,7 +117,7 @@
/*! \brief Point set associated type.
- * \invariant This type has to derive from mln::Point_Set.
+ * \invariant This type has to derive from mln::Site_Set.
*/
typedef void pset;
Index: mln/core/concept/doc/box.hh
--- mln/core/concept/doc/box.hh (revision 1949)
+++ mln/core/concept/doc/box.hh (working copy)
@@ -39,7 +39,7 @@
* \see mln::Box
*/
template <typename E>
- struct Box : public Point_Set<E>
+ struct Box : public Site_Set<E>
{
/*! \brief Give the box "minimum" point.
*
@@ -60,7 +60,7 @@
/*! \brief Return the bounding box of this point set.
*
* Return the bounding box of this point set, so that is itself.
- * This method is declared by the mln::Point_Set concept.
+ * This method is declared by the mln::Site_Set concept.
*
* \warning This method is final for all box classes.
*/
@@ -69,7 +69,7 @@
/*! \brief Return the number of points of this box.
*
* Return the number of points of this box. This method is
- * declared by the mln::Point_Set concept.
+ * declared by the mln::Site_Set concept.
*
* \warning This method is final for all box classes.
*/
Index: mln/core/concept/doc/point_set.hh
--- mln/core/concept/doc/point_set.hh (revision 1949)
+++ mln/core/concept/doc/point_set.hh (working copy)
@@ -26,7 +26,7 @@
// Public License.
/*! \file mln/core/concept/doc/point_set.hh
- * \brief This file documents the concept of mln::Point_Set.
+ * \brief This file documents the concept of mln::Site_Set.
*/
namespace mln
@@ -35,12 +35,12 @@
namespace doc
{
- /*! \brief Documentation class for mln::Point_Set.
+ /*! \brief Documentation class for mln::Site_Set.
*
- * \see mln::Point_Set
+ * \see mln::Site_Set
*/
template <typename E>
- struct Point_Set : public Object<E>
+ struct Site_Set : public Object<E>
{
/*! \brief Point associated type.
*/
Index: mln/neighb/image.hh
--- mln/neighb/image.hh (revision 1949)
+++ mln/neighb/image.hh (working copy)
@@ -98,7 +98,7 @@
/// Point_Site associated type.
typedef mln_psite(I) psite;
- /// Point_Set associated type.
+ /// Site_Set associated type.
typedef mln_pset(I) pset;
/// Neighborhood associated type.
Index: mln/value/stack.hh
--- mln/value/stack.hh (revision 1949)
+++ mln/value/stack.hh (working copy)
@@ -151,7 +151,7 @@
/// Point_Site associated type.
typedef mln_psite(I) psite;
- /// Point_Set associated type.
+ /// Site_Set associated type.
typedef mln_pset(I) pset;
/// Value associated type.
Index: mln/test/predicate.hh
--- mln/test/predicate.hh (revision 1949)
+++ mln/test/predicate.hh (working copy)
@@ -60,7 +60,7 @@
* \param[in] f The predicate.
*/
template <typename S, typename F>
- bool predicate(const Point_Set<S>& pset, const Function_p2b<F>& f);
+ bool predicate(const Site_Set<S>& pset, const Function_p2b<F>& f);
# ifndef MLN_INCLUDE_ONLY
@@ -94,7 +94,7 @@
template <typename S, typename F>
inline
- bool predicate_(const Point_Set<S>& pset, const F& f)
+ bool predicate_(const Site_Set<S>& pset, const F& f)
{
mln_piter(S) p(exact(pset));
for_all(p)
@@ -119,7 +119,7 @@
template <typename S, typename F>
inline
- bool predicate(const Point_Set<S>& pset, const Function_p2b<F>& f)
+ bool predicate(const Site_Set<S>& pset, const Function_p2b<F>& f)
{
return impl::predicate_(exact(pset), exact(f));
}
Index: mln/convert/to_image.hh
--- mln/convert/to_image.hh (revision 1949)
+++ mln/convert/to_image.hh (working copy)
@@ -106,7 +106,7 @@
/// Convert a point set \p pset into a binary image. Width of the
/// converted image will be pset.bbox + 2 * \p border.
template <typename S>
- mln_image_from(S, bool) to_image(const Point_Set<S>& pset, unsigned border = 1);
+ mln_image_from(S, bool) to_image(const Site_Set<S>& pset, unsigned border = 1);
/// Convert a window \p win into a binary image.
template <typename W>
@@ -130,7 +130,7 @@
template <typename S>
inline
- mln_image_from(S, bool) to_image(const Point_Set<S>& pset_, unsigned border)
+ mln_image_from(S, bool) to_image(const Site_Set<S>& pset_, unsigned border)
{
const S& pset = exact(pset_);
mln_image_from(S, bool) ima(pset.bbox().to_larger(border));
Index: mln/convert/to_std_set.hh
--- mln/convert/to_std_set.hh (revision 1949)
+++ mln/convert/to_std_set.hh (working copy)
@@ -52,7 +52,7 @@
/// Convert a point set \p pset into a std::set of points.
template <typename W>
- std::set<mln_point(W)> to_std_set(const Point_Set<W>& setp);
+ std::set<mln_point(W)> to_std_set(const Site_Set<W>& setp);
# ifndef MLN_INCLUDE_ONLY
@@ -71,7 +71,7 @@
template <typename W>
inline
- std::set<mln_point(W)> to_std_set(const Point_Set<W>& setp)
+ std::set<mln_point(W)> to_std_set(const Site_Set<W>& setp)
{
typedef mln_point(W) P;
std::set<P> s;
Index: mln/convert/to_window.hh
--- mln/convert/to_window.hh (revision 1949)
+++ mln/convert/to_window.hh (working copy)
@@ -77,7 +77,7 @@
/// Convert a point set \p pset into a window.
template <typename S>
- window<mln_dpoint(S)> to_window(const Point_Set<S>& pset);
+ window<mln_dpoint(S)> to_window(const Site_Set<S>& pset);
/// Convert an std::set \p s of delta-points into a window.
template <typename D>
@@ -162,7 +162,7 @@
template <typename S>
inline
- window<mln_dpoint(S)> to_window(const Point_Set<S>& pset)
+ window<mln_dpoint(S)> to_window(const Site_Set<S>& pset)
{
return to_window(pw::cst(true) | pset);
}
Index: mln/convert/to_p_set.hh
--- mln/convert/to_p_set.hh (revision 1949)
+++ mln/convert/to_p_set.hh (working copy)
@@ -69,7 +69,7 @@
/// Convert any point set \p ps into a 'mln::p_set' point set.
template <typename S>
- p_set<mln_psite(S)> to_p_set(const Point_Set<S>& ps);
+ p_set<mln_psite(S)> to_p_set(const Site_Set<S>& ps);
# ifndef MLN_INCLUDE_ONLY
@@ -135,7 +135,7 @@
template <typename S>
inline
- p_set<mln_psite(S)> to_p_set(const Point_Set<S>& ps_)
+ p_set<mln_psite(S)> to_p_set(const Site_Set<S>& ps_)
{
const S& ps = exact(ps_);
p_set<mln_psite(S)> tmp;
Index: mln/convert/to_p_array.hh
--- mln/convert/to_p_array.hh (revision 1949)
+++ mln/convert/to_p_array.hh (working copy)
@@ -45,7 +45,7 @@
/// Convert a point set \p pset into a p_array (point set vector).
template <typename S>
- p_array<mln_psite(S)> to_p_array(const Point_Set<S>& pset);
+ p_array<mln_psite(S)> to_p_array(const Site_Set<S>& pset);
/// Convert a window \p win centered at point \p p into a p_array
@@ -60,7 +60,7 @@
template <typename S>
inline
- p_array<mln_psite(S)> to_p_array(const Point_Set<S>& pset_)
+ p_array<mln_psite(S)> to_p_array(const Site_Set<S>& pset_)
{
const S& pset = exact(pset_);
p_array<mln_psite(S)> v;
Index: mln/pw/image.hh
--- mln/pw/image.hh (revision 1949)
+++ mln/pw/image.hh (working copy)
@@ -52,7 +52,7 @@
*/
template <typename F, typename S>
pw::image<F,S>
- operator | (const Function_p2v<F>& f, const Point_Set<S>& ps);
+ operator | (const Function_p2v<F>& f, const Site_Set<S>& ps);
@@ -128,7 +128,7 @@
image();
/// Constructor.
- image(const Function_p2v<F>& f, const Point_Set<S>& ps);
+ image(const Function_p2v<F>& f, const Site_Set<S>& ps);
/// Test if a pixel value is accessible at \p p.
@@ -158,7 +158,7 @@
template <typename F, typename S>
inline
pw::image<F,S>
- operator | (const Function_p2v<F>& f, const Point_Set<S>& ps)
+ operator | (const Function_p2v<F>& f, const Site_Set<S>& ps)
{
pw::image<F,S> tmp(f, ps);
return tmp;
@@ -192,7 +192,7 @@
template <typename F, typename S>
inline
- image<F,S>::image(const Function_p2v<F>& f, const Point_Set<S>& ps)
+ image<F,S>::image(const Function_p2v<F>& f, const Site_Set<S>& ps)
{
this->data_ = new internal::data_< pw::image<F,S> >(exact(f), exact(ps));
}
Index: mln/geom/pmin_pmax.hh
--- mln/geom/pmin_pmax.hh (revision 1949)
+++ mln/geom/pmin_pmax.hh (working copy)
@@ -51,14 +51,14 @@
/// Compute the minimum and maximum points of point set \p s.
template <typename S>
std::pair<mln_point(S), mln_point(S)>
- pmin_pmax(const Point_Set<S>& s);
+ pmin_pmax(const Site_Set<S>& s);
/// Compute the minimum and maximum points, \p pmin and \p max,
/// of point set \p s.
template <typename S>
void
- pmin_pmax(const Point_Set<S>& s, mln_point(S)& pmin, mln_point(S)& pmax);
+ pmin_pmax(const Site_Set<S>& s, mln_point(S)& pmin, mln_point(S)& pmax);
/// Compute the minimum and maximum points when browsing with
@@ -125,7 +125,7 @@
template <typename S>
inline
void
- pmin_pmax_(const Point_Set<S>& s, mln_point(S)& pmin, mln_point(S)& pmax)
+ pmin_pmax_(const Site_Set<S>& s, mln_point(S)& pmin, mln_point(S)& pmax)
{
mln_piter(S) it(exact(s));
pmin_pmax(it, pmin, pmax);
@@ -148,7 +148,7 @@
template <typename S>
inline
void
- pmin_pmax(const Point_Set<S>& s, mln_point(S)& pmin, mln_point(S)& pmax)
+ pmin_pmax(const Site_Set<S>& s, mln_point(S)& pmin, mln_point(S)& pmax)
{
mln_precondition(exact(s).npoints() != 0);
impl::pmin_pmax_(exact(s), pmin, pmax);
@@ -157,7 +157,7 @@
template <typename S>
inline
std::pair<mln_point(S), mln_point(S)>
- pmin_pmax(const Point_Set<S>& s)
+ pmin_pmax(const Site_Set<S>& s)
{
mln_precondition(exact(s).npoints() != 0);
typedef mln_point(S) P;
Index: mln/geom/bbox.hh
--- mln/geom/bbox.hh (revision 1949)
+++ mln/geom/bbox.hh (working copy)
@@ -63,7 +63,7 @@
/// Compute the precise bounding box of a point set \p pset.
template <typename S>
- box_<mln_point(S)> bbox(const Point_Set<S>& pset);
+ box_<mln_point(S)> bbox(const Site_Set<S>& pset);
/// Compute the precise bounding box of an image \p ima.
@@ -102,7 +102,7 @@
template <typename S>
inline
- box_<mln_point(S)> bbox_(const Point_Set<S>& pset_)
+ box_<mln_point(S)> bbox_(const Site_Set<S>& pset_)
{
const S& pset = exact(pset_);
typedef mln_point(S) P;
@@ -122,7 +122,7 @@
template <typename S>
inline
- box_<mln_point(S)> bbox(const Point_Set<S>& pset)
+ box_<mln_point(S)> bbox(const Site_Set<S>& pset)
{
mln_precondition(exact(pset).npoints() != 0);
box_<mln_point(S)> tmp = impl::bbox_(exact(pset));
Index: mln/set/inter.hh
--- mln/set/inter.hh (revision 1949)
+++ mln/set/inter.hh (working copy)
@@ -57,11 +57,11 @@
/*! \brief Intersection between a couple of point sets.
*
- * \relates mln::Point_Set
+ * \relates mln::Site_Set
*/
template <typename Wl, typename Wr>
p_set<mln_point(Wl)>
- inter(const Point_Set<Wl>& lhs, const Point_Set<Wr>& rhs);
+ inter(const Site_Set<Wl>& lhs, const Site_Set<Wr>& rhs);
# ifndef MLN_INCLUDE_ONLY
@@ -87,7 +87,7 @@
template <typename Wl, typename Wr>
inline
p_set<mln_point(Wl)>
- inter(const Point_Set<Wl>& lhs, const Point_Set<Wr>& rhs)
+ inter(const Site_Set<Wl>& lhs, const Site_Set<Wr>& rhs)
{
trace::entering("set::inter");
mln::metal::equal<mln_point(Wl), mln_point(Wr)>::check();
Index: mln/set/is_subset_of.hh
--- mln/set/is_subset_of.hh (revision 1949)
+++ mln/set/is_subset_of.hh (working copy)
@@ -42,17 +42,17 @@
{
/*! \brief Test if a point set is a subset of another point set.
*
- * \relates mln::Point_Set
+ * \relates mln::Site_Set
*/
template <typename Pl, typename Pr>
bool
- is_subset_of(const Point_Set<Pl>& lhs, const Point_Set<Pr>& rhs);
+ is_subset_of(const Site_Set<Pl>& lhs, const Site_Set<Pr>& rhs);
# ifndef MLN_INCLUDE_ONL
template <typename Pl, typename Pr>
bool
- is_subset_of(const Point_Set<Pl>& lhs_, const Point_Set<Pr>& rhs_)
+ is_subset_of(const Site_Set<Pl>& lhs_, const Site_Set<Pr>& rhs_)
{
trace::entering("set::is_subset_of");
Pl lhs = exact(lhs_);
Index: mln/set/diff.hh
--- mln/set/diff.hh (revision 1949)
+++ mln/set/diff.hh (working copy)
@@ -33,7 +33,7 @@
* \brief Set theoretic difference (non-symmetrical) of a couple of
* sets.
*
- * \todo Add a diff(Point_Set& in_place, Function_p2b).
+ * \todo Add a diff(Site_Set& in_place, Function_p2b).
*/
# include <mln/convert/to_std_set.hh>
@@ -59,11 +59,11 @@
/*! \brief Set theoretic difference of \p lhs and \p rhs.
*
- * \relates mln::Point_Set
+ * \relates mln::Site_Set
*/
template <typename Wl, typename Wr>
p_set<mln_point(Wl)>
- diff(const Point_Set<Wl>& lhs, const Point_Set<Wr>& rhs);
+ diff(const Site_Set<Wl>& lhs, const Site_Set<Wr>& rhs);
# ifndef MLN_INCLUDE_ONLY
@@ -90,7 +90,7 @@
template <typename Wl, typename Wr>
inline
p_set<mln_point(Wl)>
- diff(const Point_Set<Wl>& lhs, const Point_Set<Wr>& rhs)
+ diff(const Site_Set<Wl>& lhs, const Site_Set<Wr>& rhs)
{
trace::entering("set::diff");
mln::metal::equal<mln_point(Wl), mln_point(Wr)>::check();
Index: mln/set/uni.hh
--- mln/set/uni.hh (revision 1949)
+++ mln/set/uni.hh (working copy)
@@ -56,11 +56,11 @@
/*! \brief Union of a couple of point sets.
*
- * \relates mln::Point_Set
+ * \relates mln::Site_Set
*/
template <typename Wl, typename Wr>
p_set<mln_point(Wl)>
- uni(const Point_Set<Wl>& lhs, const Point_Set<Wr>& rhs);
+ uni(const Site_Set<Wl>& lhs, const Site_Set<Wr>& rhs);
# ifndef MLN_INCLUDE_ONLY
@@ -87,7 +87,7 @@
template <typename Wl, typename Wr>
inline
p_set<mln_point(Wl)>
- uni(const Point_Set<Wl>& lhs, const Point_Set<Wr>& rhs)
+ uni(const Site_Set<Wl>& lhs, const Site_Set<Wr>& rhs)
{
trace::entering("set::uni");
mln::metal::equal<mln_point(Wl), mln_point(Wr)>::check();
Index: mln/set/sym_diff.hh
--- mln/set/sym_diff.hh (revision 1949)
+++ mln/set/sym_diff.hh (working copy)
@@ -56,11 +56,11 @@
/*! \brief Set theoretic symmetrical difference of \p lhs and \p rhs.
*
- * \relates mln::Point_Set
+ * \relates mln::Site_Set
*/
template <typename Wl, typename Wr>
p_set<mln_point(Wl)>
- sym_diff(const Point_Set<Wl>& lhs, const Point_Set<Wr>& rhs);
+ sym_diff(const Site_Set<Wl>& lhs, const Site_Set<Wr>& rhs);
# ifndef MLN_INCLUDE_ONLY
@@ -86,7 +86,7 @@
template <typename Wl, typename Wr>
inline
p_set<mln_point(Wl)>
- sym_diff(const Point_Set<Wl>& lhs, const Point_Set<Wr>& rhs)
+ sym_diff(const Site_Set<Wl>& lhs, const Site_Set<Wr>& rhs)
{
trace::entering("set::sym_diff");
mln::metal::equal<mln_point(Wl), mln_point(Wr)>::check();
1
0
https://svn.lrde.epita.fr/svn/oln/trunk
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Pass option nostdinc to Automake.
* configure.ac: Do it, to avoid inclusion problems in test
directories hosting binaries with standard header names (e.g.,
``set'' or ``list'').
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: configure.ac
--- configure.ac (revision 1946)
+++ configure.ac (working copy)
@@ -16,7 +16,7 @@
# Automake.
# 1.9.4 because of changelog vs. ChangeLog on Darwin.
-AM_INIT_AUTOMAKE([1.9.4 foreign check-news dist-bzip2 -Wall])
+AM_INIT_AUTOMAKE([1.9.4 foreign check-news dist-bzip2 nostdinc -Wall])
## --------------------- ##
1
0