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
December 2008
- 12 participants
- 201 discussions
---
COPYING | 2 +-
ChangeLog | 4 ++++
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/COPYING b/COPYING
index 890f89a..8f0f085 100644
--- a/COPYING
+++ b/COPYING
@@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1989, 1991, 2006 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
diff --git a/ChangeLog b/ChangeLog
index 5f2cd3b..080f0e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-12-30 Roland Levillain <roland(a)lrde.epita.fr>
+
+ * COPYING: Fix indentation.
+
2008-12-22 Guillaume Lazzara <z(a)lrde.epita.fr>
Fix configure.ac and INSTALL files.
--
1.6.0.4
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Fix warnings due to g++ -Wconversion option.
* mln/core/site_set/box.hh,
* mln/core/site_set/p_line2d.hh,
* mln/core/image/extension_val.hh,
* mln/math/jacobi.hh,
* mln/level/transform.hh,
* mln/data/paste.spe.hh,
* mln/data/fill_with_image.hh,
* mln/data/fill_with_value.spe.hh,
* mln/data/fill.hh,
* mln/data/paste.hh,
* mln/data/fill_with_value.hh,
* mln/linear/gaussian.hh,
* mln/accu/convolve.hh,
* mln/value/ops.hh,
* mln/value/int_u_sat.hh,
* mln/border/mirror.hh,
* mln/convert/to_image.hh,
* mln/geom/essential.hh,
* mln/fun/v2v/inc.hh,
* mln/fun/v2v/cast.hh,
* mln/fun/v2v/linear.hh,
* mln/fun/v2v/dec.hh,
* mln/win/cuboid3d.hh,
* mln/win/cube3d.hh,
* mln/algebra/quat.hh,
* mln/algebra/vec.hh,
* mln/io/pbm/load.hh,
* mln/norm/linfty.hh,
* mln/norm/l1.hh,
* mln/norm/l2.hh,
* mln/canvas/browsing/snake_fwd.hh,
* mln/canvas/browsing/dir_struct_elt_incr_update.hh,
* tests/opt/at.cc,
* tests/level/transform_inplace.cc,
* tests/level/transform.cc,
* tests/level/sort_psites.cc,
* tests/level/Makefile.am,
* tests/data/paste.cc,
* tests/data/fill_with_image.cc,
* tests/linear/convolve.cc,
* tests/linear/convolve_directional.cc,
* tests/linear/gaussian.cc,
* tests/norm/l2.cc,
* tests/norm/common.hh,
* tests/norm/linfty.cc: Fix warning with Wconversion.
Upgrade file doc style.
Layout.
Remove a couple of (full of crap) files.
* mln/geom/resize.hh: Remove.
* mln/geom/all.hh: Update.
* tests/geom/resize.cc: Remove.
* tests/geom/Makefile.am: Update.
* tests/level/sort_psites_full.cc: Remove.
mln/accu/convolve.hh | 6 -
mln/algebra/quat.hh | 25 ++--
mln/algebra/vec.hh | 2
mln/border/mirror.hh | 16 +-
mln/canvas/browsing/dir_struct_elt_incr_update.hh | 8 -
mln/canvas/browsing/snake_fwd.hh | 2
mln/convert/to_image.hh | 8 -
mln/core/image/extension_val.hh | 18 +--
mln/core/site_set/box.hh | 8 -
mln/core/site_set/p_line2d.hh | 20 ++-
mln/data/fill.hh | 12 +-
mln/data/fill_with_image.hh | 15 +-
mln/data/fill_with_value.hh | 2
mln/data/fill_with_value.spe.hh | 9 -
mln/data/paste.hh | 17 +-
mln/data/paste.spe.hh | 11 -
mln/fun/v2v/cast.hh | 14 +-
mln/fun/v2v/dec.hh | 11 -
mln/fun/v2v/inc.hh | 11 -
mln/fun/v2v/linear.hh | 26 +++-
mln/geom/all.hh | 5
mln/geom/essential.hh | 13 +-
mln/io/pbm/load.hh | 2
mln/level/transform.hh | 18 +--
mln/linear/gaussian.hh | 129 +++++++++++-----------
mln/math/jacobi.hh | 51 ++++----
mln/norm/l1.hh | 29 +++-
mln/norm/l2.hh | 29 +++-
mln/norm/linfty.hh | 15 +-
mln/value/int_u_sat.hh | 20 +--
mln/value/ops.hh | 22 ++-
mln/win/cube3d.hh | 18 +--
mln/win/cuboid3d.hh | 21 ++-
tests/data/fill_with_image.cc | 6 -
tests/data/paste.cc | 6 -
tests/geom/Makefile.am | 2
tests/level/Makefile.am | 4
tests/level/sort_psites.cc | 19 +--
tests/level/transform.cc | 16 +-
tests/level/transform_inplace.cc | 61 +++++-----
tests/linear/convolve.cc | 22 +--
tests/linear/convolve_directional.cc | 10 -
tests/linear/gaussian.cc | 10 -
tests/norm/common.hh | 18 ++-
tests/norm/l2.cc | 15 +-
tests/norm/linfty.cc | 14 +-
tests/opt/at.cc | 8 -
47 files changed, 449 insertions(+), 375 deletions(-)
Index: mln/core/site_set/box.hh
--- mln/core/site_set/box.hh (revision 3091)
+++ mln/core/site_set/box.hh (working copy)
@@ -314,8 +314,8 @@
mln_precondition(is_valid());
for (unsigned i = 0; i < P::dim; ++i)
{
- pmin_[i] -= b;
- pmax_[i] += b;
+ pmin_[i] = static_cast<mln_coord(P)>(pmin_[i] - b);
+ pmax_[i] = static_cast<mln_coord(P)>(pmax_[i] + b);
}
mln_postcondition(is_valid());
}
@@ -326,8 +326,8 @@
box<P>::enlarge(unsigned dim, unsigned b)
{
mln_precondition(is_valid());
- pmin_[dim] -= b;
- pmax_[dim] += b;
+ pmin_[dim] = static_cast<mln_coord(P)>(pmin_[dim] - b);
+ pmax_[dim] = static_cast<mln_coord(P)>(pmax_[dim] + b);
mln_postcondition(is_valid());
}
Index: mln/core/site_set/p_line2d.hh
--- mln/core/site_set/p_line2d.hh (revision 3091)
+++ mln/core/site_set/p_line2d.hh (working copy)
@@ -1,4 +1,5 @@
// 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
@@ -35,7 +36,11 @@
# include <mln/core/site_set/p_array.hh>
# include <mln/core/alias/box2d.hh>
-# include <mln/math/all.hh>
+
+# include <mln/math/sign.hh>
+# include <mln/math/abs.hh>
+# include <mln/math/min.hh>
+# include <mln/math/max.hh>
namespace mln
@@ -187,7 +192,8 @@
int e = ddrow - dcol;
for (int i = 0; i < dcol; ++i)
{
- arr_.append(point2d(row, col));
+ arr_.append(point2d(static_cast<def::coord>(row),
+ static_cast<def::coord>(col)));
while (e >= 0)
{
row += srow;
@@ -202,7 +208,8 @@
int e = ddcol - drow;
for (int i = 0; i < drow; ++i)
{
- arr_.append(point2d(row, col));
+ arr_.append(point2d(static_cast<def::coord>(row),
+ static_cast<def::coord>(col)));
while (e >= 0)
{
col += scol;
@@ -213,7 +220,8 @@
}
}
if (! is_end_excluded)
- arr_.append(point2d(row, col));
+ arr_.append(point2d(static_cast<def::coord>(row),
+ static_cast<def::coord>(col)));
// Compute bb_.
point2d end_ = arr_[arr_.nsites() - 1];
@@ -280,8 +288,8 @@
p_line2d::to_vec() const
{
algebra::vec<2, float> res;
- res[0] = end().row() - begin().row();
- res[1] = end().col() - begin().col();
+ res[0] = float(end().row() - begin().row());
+ res[1] = float(end().col() - begin().col());
return res;
}
Index: mln/core/image/extension_val.hh
--- mln/core/image/extension_val.hh (revision 3091)
+++ mln/core/image/extension_val.hh (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,14 +28,12 @@
#ifndef MLN_CORE_IMAGE_EXTENSION_VAL_HH
# define MLN_CORE_IMAGE_EXTENSION_VAL_HH
-/*!
- * \file mln/core/image/extension_val.hh
- *
- * \brief Definition of a morpher that extends the domain of an image.
- *
- * \todo Use the 'instant' mechanism.
- * \todo Use an envelop as lvalue to test extension writing.
- */
+/// \file mln/core/image/extension_val.hh
+///
+/// \brief Definition of a morpher that extends the domain of an image.
+///
+/// \todo Use the 'instant' mechanism.
+/// \todo Use an envelop as lvalue to test extension writing.
# include <mln/core/internal/image_identity.hh>
@@ -267,7 +265,7 @@
void init_(tag::extension_t, V& target, const extension_val<I>& model)
{
mlc_converts_to(mln_value(I), V)::check();
- target = model.extension();
+ target = static_cast<V>(model.extension());
}
# endif // ! MLN_INCLUDE_ONLY
Index: mln/math/jacobi.hh
--- mln/math/jacobi.hh (revision 3091)
+++ mln/math/jacobi.hh (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,12 +28,17 @@
#ifndef MLN_MATH_JACOBI_HH
# define MLN_MATH_JACOBI_HH
+/// \file mln/math/jacobi.hh
+
+# include <cmath>
+
# include <mln/algebra/quat.hh>
# include <mln/algebra/mat.hh>
// from num. rec. in C
// FIXME: what about numrec licence?
+
namespace mln
{
@@ -42,12 +47,14 @@
algebra::quat jacobi(algebra::mat < 4, 4, float >a);
+
# ifndef MLN_INCLUDE_ONLY
// FIXME: nD ?
#define rotateJacobi(a,i,j,k,l) g=a(i,j);h=a(k,l);a(i,j)=g-s*(h+g*tau); \
a(k,l)=h+s*(g-h*tau)
+
algebra::quat jacobi(algebra::mat < 4, 4, float >a)
{
float dd, d[4];
@@ -57,23 +64,23 @@
for (ip = 0; ip < 4; ip++)
{
for (iq = 0; iq < 4; iq++)
- v(ip, iq) = 0.0;
- v(ip, ip) = 1.0;
+ v(ip, iq) = 0.0f;
+ v(ip, ip) = 1.0f;
}
for (ip = 0; ip < 4; ip++)
{
b[ip] = d[ip] = a(ip, ip);
- z[ip] = 0.0;
+ z[ip] = 0.0f;
}
while (1)
{
- sm = 0.0;
+ sm = 0.0f;
for (ip = 0; ip < 3; ip++)
{
for (iq = ip + 1; iq < 4; iq++)
- sm += fabs(a(ip, iq));
+ sm += std::fabs(a(ip, iq));
}
- if (sm < 1e-12)
+ if (sm < 1e-12f)
{ // 1e-12
dd = d[0];
iq = 0;
@@ -90,7 +97,7 @@
if (i < 4)
{
i++;
- tresh = 0.0125 * sm;
+ tresh = 0.0125f * sm;
}
else
tresh = 0.0;
@@ -98,27 +105,26 @@
{
for (iq = ip + 1; iq < 4; iq++)
{
- g = 100.0 * fabs(a(ip, iq));
- if (i > 4 && (float)(fabs(d[ip])+g) ==
- (float)fabs(d[ip])
- && (float)(fabs(d[iq])+g) == (float)fabs(d[iq]))
- a(ip, iq) = 0.0;
- else if (fabs(a(ip, iq)) > tresh)
+ g = 100.0f * std::fabs(a(ip, iq));
+ if (i > 4 && std::fabs(d[ip]) + g == std::fabs(d[ip])
+ && std::fabs(d[iq]) + g == std::fabs(d[iq]))
+ a(ip, iq) = 0.0f;
+ else if (std::fabs(a(ip, iq)) > tresh)
{
h = d[iq] - d[ip];
- if ((float)(fabs(h)+g) == (float)fabs(h)) // unsafe?
+ if (std::fabs(h) + g == std::fabs(h)) // unsafe?
t = (a(ip, iq)) / h;
else
{
- theta = 0.5 * h / (a(ip, iq));
- t = 1.0 / (fabs(theta) + sqrt(1.0 +
+ theta = 0.5f * h / (a(ip, iq));
+ t = 1.0f / (std::fabs(theta) + std::sqrt(1.0f +
theta * theta));
- if (theta < 0.0)
+ if (theta < 0.0f)
t = -t;
}
- c = 1.0 / sqrt(1 + t * t);
+ c = 1.0f / std::sqrt(1 + t * t);
s = t * c;
- tau = s / (1.0 + c);
+ tau = s / (1.0f + c);
h = t * a(ip, iq);
z[ip] -= h;
z[iq] += h;
@@ -140,7 +146,7 @@
{
b[ip] += z[ip];
d[ip] = b[ip];
- z[ip] = 0.0;
+ z[ip] = 0.0f;
}
}
}
@@ -151,5 +157,6 @@
} // end of namespace mln
-#endif /* MLN_MATH_JACOBI_HH */
+
+#endif // ! MLN_MATH_JACOBI_HH
Index: mln/level/transform.hh
--- mln/level/transform.hh (revision 3091)
+++ mln/level/transform.hh (working copy)
@@ -29,14 +29,13 @@
#ifndef MLN_LEVEL_TRANSFORM_HH
# define MLN_LEVEL_TRANSFORM_HH
-/*! \file mln/level/transform.hh
- *
- * \brief Transform the contents of an image into another one.
- *
- * \todo Clean this file + overload with pixel iterators.
- *
- * \todo Re-activate tests and make them static.
- */
+/// \file mln/level/transform.hh
+///
+/// Transform the contents of an image into another one.
+///
+/// \todo Clean this file + overload with pixel iterators.
+///
+/// \todo Re-activate tests and make them static.
# include <mln/core/concept/image.hh>
# include <mln/core/concept/function.hh>
@@ -145,9 +144,6 @@
mln_ch_value(I, mln_result(F)) output;
initialize(output, input);
- mlc_is(mln_trait_image_pw_io(mln_ch_value(I, mln_result(F))),
- trait::image::pw_io::read_write)::check();
-
mln_piter(I) p(input.domain());
for_all(p)
output(p) = f(input(p));
Index: mln/data/paste.spe.hh
--- mln/data/paste.spe.hh (revision 3091)
+++ mln/data/paste.spe.hh (working copy)
@@ -1,4 +1,5 @@
// 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
@@ -28,11 +29,9 @@
#ifndef MLN_DATA_PASTE_SPE_HH
# define MLN_DATA_PASTE_SPE_HH
-/*! \file mln/data/paste.spe.hh
- *
- * \brief Specializations for mln::data::paste.
- *
- */
+/// \file mln/data/paste.spe.hh
+///
+/// Specializations for mln::data::paste.
# ifndef MLN_DATA_PASTE_HH
# error "Forbidden inclusion of *.spe.hh"
@@ -89,7 +88,7 @@
po.start();
for_all(pi)
{
- po.val() = pi.val();
+ po.val() = static_cast<mln_value(J)>(pi.val());
po.next();
}
trace::exiting("data::impl::paste_fast");
Index: mln/data/fill_with_image.hh
--- mln/data/fill_with_image.hh (revision 3091)
+++ mln/data/fill_with_image.hh (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,12 +28,11 @@
#ifndef MLN_DATA_FILL_WITH_IMAGE_HH
# define MLN_DATA_FILL_WITH_IMAGE_HH
-/*! \file mln/data/fill_with_image.hh
- *
- * \brief Fill an image with the values from another image.
- *
- * \todo Specialize with line_piter...
- */
+/// \file mln/data/fill_with_image.hh
+///
+/// Fill an image with the values from another image.
+///
+/// \todo Specialize with line_piter...
# include <mln/core/concept/image.hh>
@@ -107,7 +106,7 @@
mln_piter(I) p(ima.domain());
for_all(p)
- ima(p) = data(p);
+ ima(p) = static_cast<mln_value(I)>(data(p));
trace::exiting("data::impl::generic::fill_with_image");
}
Index: mln/data/fill_with_value.spe.hh
--- mln/data/fill_with_value.spe.hh (revision 3091)
+++ mln/data/fill_with_value.spe.hh (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -29,8 +29,8 @@
# define MLN_DATA_FILL_WITH_VALUE_SPE_HH
/// \file mln/data/fill_with_value.spe.hh
-/// Specializations for mln::data::fill_with_value.
///
+/// Specializations for mln::data::fill_with_value.
# ifndef MLN_DATA_FILL_WITH_VALUE_HH
# error "Forbidden inclusion of *.spe.hh"
@@ -87,7 +87,8 @@
mlc_is(mln_trait_image_value_access(I),
trait::image::value_access::direct))::check();
- data::memset_(ima, ima.point_at_index(0), val, ima.nelements());
+ mln_value(I) v = static_cast<mln_value(I)>(val);
+ data::memset_(ima, ima.point_at_index(0), v, ima.nelements());
trace::exiting("data::impl::fill_with_value_one_block");
}
@@ -123,7 +124,7 @@
mlc_is(mln_trait_image_vw_io(I),
trait::image::vw_io::read_write))::check();
- ima.val() = val;
+ ima.val() = static_cast<mln_value(I)>(val);
trace::exiting("data::impl::fill_with_value_singleton");
}
Index: mln/data/fill.hh
--- mln/data/fill.hh (revision 3091)
+++ mln/data/fill.hh (working copy)
@@ -1,4 +1,5 @@
// 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
@@ -28,12 +29,11 @@
#ifndef MLN_DATA_FILL_HH
# define MLN_DATA_FILL_HH
-/*! \file mln/data/fill.hh
- *
- * \brief Fill an image, that is, set pixel values.
- *
- * \todo Add a conversion "arr->fun" then get rid of the C array overload.
- */
+/// \file mln/data/fill.hh
+///
+/// Fill an image, that is, set pixel values.
+///
+/// \todo Add a conversion "arr->fun" then get rid of the C array overload.
# include <mln/core/concept/function.hh>
# include <mln/pw/image.hh>
Index: mln/data/paste.hh
--- mln/data/paste.hh (revision 3091)
+++ mln/data/paste.hh (working copy)
@@ -1,4 +1,5 @@
// 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
@@ -28,16 +29,12 @@
#ifndef MLN_DATA_PASTE_HH
# define MLN_DATA_PASTE_HH
-/*! \file mln/data/paste.hh
- *
- * \brief Paste the contents of an image into another one.
- *
- */
+/// \file mln/data/paste.hh
+///
+/// Paste the contents of an image into another one.
# include <mln/core/concept/image.hh>
-
-
// Specializations are in:
# include <mln/data/paste.spe.hh>
@@ -65,10 +62,8 @@
///
/// \pre \p input.domain <= \p output.domain
///
- /// \{
template <typename I, typename J>
void paste(const Image<I>& input, Image<J>& output);
- /// \}
@@ -95,6 +90,7 @@
} // end of namespace mln::data::internal
+
namespace impl
{
@@ -115,7 +111,7 @@
mln_piter(I) p(input.domain());
for_all(p)
- output(p) = input(p);
+ output(p) = static_cast<mln_value(J)>(input(p));
trace::exiting("data::impl::generic::paste");
}
@@ -133,7 +129,6 @@
{
trace::entering("data::paste");
-
internal::paste_tests(input, output);
internal::paste_(input, output);
Index: mln/data/fill_with_value.hh
--- mln/data/fill_with_value.hh (revision 3091)
+++ mln/data/fill_with_value.hh (working copy)
@@ -104,7 +104,7 @@
mlc_is(mln_trait_image_pw_io(I),
trait::image::pw_io::read_write)::check();
- mln_value(I) v = exact(val);
+ mln_value(I) v = static_cast<mln_value(I)>(exact(val));
mln_piter(I) p(ima.domain());
for_all(p)
ima(p) = v;
Index: mln/linear/gaussian.hh
--- mln/linear/gaussian.hh (revision 3091)
+++ mln/linear/gaussian.hh (working copy)
@@ -33,26 +33,21 @@
///
/// Gaussian filter.
///
-/// \todo Add a clean reference David Deriche
+/// \todo Add a clean reference Rachid Deriche
/// Recursively implementing the gaussian and its derivatives (1993)
+# include <vector>
+# include <cmath>
+
# include <mln/core/concept/image.hh>
# include <mln/core/alias/point2d.hh>
-# include <mln/data/paste.hh>
+# include <mln/extension/adjust_fill.hh>
# include <mln/geom/ncols.hh>
# include <mln/geom/nrows.hh>
-
-# include <mln/trait/image/props.hh>
-
-# include <mln/extension/adjust_fill.hh>
+# include <mln/data/paste.hh>
# include <mln/level/stretch.hh>
-
# include <mln/algebra/vec.hh>
-# include <vector>
-# include <cmath>
-
-# include <mln/debug/println.hh>
namespace mln
{
@@ -111,10 +106,10 @@
w0 /= s;
w1 /= s;
- float sin0 = sin(w0);
- float sin1 = sin(w1);
- float cos0 = cos(w0);
- float cos1 = cos(w1);
+ float sin0 = std::sin(w0);
+ float sin1 = std::sin(w1);
+ float cos0 = std::cos(w0);
+ float cos1 = std::cos(w1);
int sign = 1;
float n_ = norm(a0, a1, b0, b1, c0, c1, cos0, sin0, cos1, sin1, sign);
@@ -125,37 +120,37 @@
c1 /= n_;
n[3] =
- exp(-b1 - 2*b0) * (c1 * sin1 - cos1 * c0) +
- exp(-b0 - 2*b1) * (a1 * sin0 - cos0 * a0);
+ std::exp(-b1 - 2*b0) * (c1 * sin1 - cos1 * c0) +
+ std::exp(-b0 - 2*b1) * (a1 * sin0 - cos0 * a0);
n[2] =
- 2 * exp(-b0 - b1) * ((a0 + c0) * cos1 * cos0 -
+ 2 * std::exp(-b0 - b1) * ((a0 + c0) * cos1 * cos0 -
cos1 * a1 * sin0 -
cos0 * c1 * sin1) +
- c0 * exp(-2*b0) + a0 * exp(-2*b1);
+ c0 * std::exp(-2*b0) + a0 * std::exp(-2*b1);
n[1] =
- exp(-b1) * (c1 * sin1 - (c0 + 2 * a0) * cos1) +
- exp(-b0) * (a1 * sin0 - (2 * c0 + a0) * cos0);
+ std::exp(-b1) * (c1 * sin1 - (c0 + 2 * a0) * cos1) +
+ std::exp(-b0) * (a1 * sin0 - (2 * c0 + a0) * cos0);
n[0] =
a0 + c0;
d[4] =
- exp(-2 * b0 - 2 * b1);
+ std::exp(-2 * b0 - 2 * b1);
d[3] =
- -2 * cos0 * exp(-b0 - 2*b1) -
- 2 * cos1 * exp(-b1 - 2*b0);
+ -2 * cos0 * std::exp(-b0 - 2*b1) -
+ 2 * cos1 * std::exp(-b1 - 2*b0);
d[2] =
- 4 * cos1 * cos0 * exp(-b0 - b1) +
- exp(-2*b1) + exp(-2*b0);
+ 4 * cos1 * cos0 * std::exp(-b0 - b1) +
+ std::exp(-2*b1) + std::exp(-2*b0);
d[1] =
- -2 * exp(-b1) * cos1 - 2 * exp(-b0) * cos0;
+ -2 * std::exp(-b1) * cos1 - 2 * std::exp(-b0) * cos0;
for (unsigned i = 1; i <= 3; ++i)
{
dm[i] = d[i];
- nm[i] = sign * (n[i] - d[i] * n[0]);
+ nm[i] = float(sign) * (n[i] - d[i] * n[0]);
}
dm[4] = d[4];
- nm[4] = sign * (-d[4] * n[0]);
+ nm[4] = float(sign) * (-d[4] * n[0]);
}
@@ -267,14 +262,14 @@
float cos1, float sin1,
int& sign)
{
- float expb0 = exp(b0);
- float exp2b0 = exp(2.0 * b0);
+ float expb0 = std::exp(b0);
+ float exp2b0 = std::exp(2.f * b0);
float scale0 = 1 + exp2b0 - 2 * cos0 * expb0;
float scaleA = 2 * a1 * sin0 * expb0 - a0 * (1 - exp2b0);
- float expb1 = exp(b1);
- float exp2b1 = exp(2.0 * b1);
+ float expb1 = std::exp(b1);
+ float exp2b1 = std::exp(2.f * b1);
float scale1 = 1 + exp2b1 - 2 * cos1 * expb1;
float scaleC = 2 * c1 * sin1 * expb1 - c0 * (1 - exp2b1);
@@ -295,16 +290,16 @@
float cos1, float sin1,
int& sign)
{
- float expb0 = exp(b0);
- float exp2b0 = exp(2.0 * b0);
+ float expb0 = std::exp(b0);
+ float exp2b0 = std::exp(2.f * b0);
float scale0 = 1 + exp2b0 - 2 * cos0 * expb0;
scale0 *= scale0;
float scaleA = - 2 * a1 * sin0 * expb0 * (1 - exp2b0) +
2 * a0 * expb0 * (2 * expb0 - cos0 * (1 + exp2b0));
- float expb1 = exp(b1);
- float exp2b1 = exp(2.0 * b1);
+ float expb1 = std::exp(b1);
+ float exp2b1 = std::exp(2.f * b1);
float scale1 = 1 + exp2b1 - 2 * cos1 * expb1;
scale1 *= scale1;
@@ -327,8 +322,8 @@
float cos1, float sin1,
int& sign)
{
- float expb0 = exp(b0);
- float exp2b0 = exp(2.0 * b0);
+ float expb0 = std::exp(b0);
+ float exp2b0 = std::exp(2.f * b0);
float scale0 = 1 + exp2b0 - 2 * cos0 * expb0;
scale0 *= scale0 * scale0;
@@ -338,8 +333,8 @@
a0 * expb0 * (2 * expb0 * (2 - cos0 * cos0) *
(1 - exp2b0) - cos0 * (1 - exp2b0 * exp2b0));
- float expb1 = exp(b1);
- float exp2b1 = exp(2.0 * b1);
+ float expb1 = std::exp(b1);
+ float exp2b1 = std::exp(2.f * b1);
float scale1 = 1 + exp2b1 - 2 * cos1 * expb1;
scale1 *= scale1 * scale1;
@@ -368,9 +363,9 @@
recursivefilter_<mln_value(I)>(img, coef,
- point1d(-img.border()),
- point1d(geom::ninds(img) - 1 +
- img.border()),
+ point1d(static_cast<def::coord>(-img.border())),
+ point1d(static_cast<def::coord>(geom::ninds(img) - 1 +
+ img.border())),
geom::ninds(img) + 2 * img.border(),
dpoint1d(1));
}
@@ -391,9 +386,11 @@
// Apply on rows.
for (unsigned j = 0; j < geom::ncols(img); ++j)
recursivefilter_<mln_value(I)>(img, coef,
- point2d(-img.border(), j),
- point2d(geom::nrows(img) - 1 +
- img.border(), j),
+ point2d(static_cast<def::coord>(-img.border()),
+ static_cast<def::coord>(j)),
+ point2d(static_cast<def::coord>(geom::nrows(img) - 1 +
+ img.border()),
+ static_cast<def::coord>(j)),
geom::nrows(img) + 2 * img.border(),
dpoint2d(1, 0));
}
@@ -403,9 +400,11 @@
// Apply on columns.
for (unsigned i = 0; i < geom::nrows(img); ++i)
recursivefilter_<mln_value(I)>(img, coef,
- point2d(i, -img.border()),
- point2d(i, geom::ncols(img) - 1 +
- img.border()),
+ point2d(static_cast<def::coord>(i),
+ static_cast<def::coord>(-img.border())),
+ point2d(static_cast<def::coord>(i),
+ static_cast<def::coord>(geom::ncols(img) - 1 +
+ img.border())),
geom::ncols(img) + 2 * img.border(),
dpoint2d(0, 1));
}
@@ -426,9 +425,13 @@
for (unsigned j = 0; j < geom::nrows(img); ++j)
for (unsigned k = 0; k < geom::ncols(img); ++k)
recursivefilter_<mln_value(I)>(img, coef,
- point3d(-img.border(), j , k),
- point3d(geom::nslis(img) - 1 +
- img.border(), j, k),
+ point3d(static_cast<def::coord>(-img.border()),
+ static_cast<def::coord>(j),
+ static_cast<def::coord>(k)),
+ point3d(static_cast<def::coord>(geom::nslis(img) - 1 +
+ img.border()),
+ static_cast<def::coord>(j),
+ static_cast<def::coord>(k)),
geom::nslis(img) + 2 *
img.border(),
dpoint3d(1, 0, 0));
@@ -441,9 +444,13 @@
for (unsigned i = 0; i < geom::nslis(img); ++i)
for (unsigned k = 0; k < geom::ncols(img); ++k)
recursivefilter_<mln_value(I)>(img, coef,
- point3d(i, -img.border(), k),
- point3d(i, geom::nrows(img) - 1 +
- img.border(), k),
+ point3d(static_cast<def::coord>(i),
+ static_cast<def::coord>(-img.border()),
+ static_cast<def::coord>(k)),
+ point3d(static_cast<def::coord>(i),
+ static_cast<def::coord>(geom::nrows(img) - 1 +
+ img.border()),
+ static_cast<def::coord>(k)),
geom::nrows(img) + 2 *
img.border(),
dpoint3d(0, 1, 0));
@@ -455,9 +462,13 @@
for (unsigned i = 0; i < geom::nslis(img); ++i)
for (unsigned j = 0; j < geom::nrows(img); ++i)
recursivefilter_<mln_value(I)>(img, coef,
- point3d(i, j, -img.border()),
- point3d(i, j, geom::ncols(img) -
- 1 + img.border()),
+ point3d(static_cast<def::coord>(i),
+ static_cast<def::coord>(j),
+ static_cast<def::coord>(-img.border())),
+ point3d(static_cast<def::coord>(i),
+ static_cast<def::coord>(j),
+ static_cast<def::coord>(geom::ncols(img) -
+ 1 + img.border())),
geom::ncols(img) + 2 *
img.border(),
dpoint3d(0, 0, 1));
Index: mln/accu/convolve.hh
--- mln/accu/convolve.hh (revision 3091)
+++ mln/accu/convolve.hh (working copy)
@@ -103,7 +103,7 @@
void
convolve<T1,T2,R>::take(const argument& t)
{
- s_ += t.first * t.second;
+ s_ = static_cast<S>(s_ + static_cast<S>(t.first) * static_cast<S>(t.second));
}
template <typename T1, typename T2, typename R>
@@ -111,7 +111,7 @@
void
convolve<T1,T2,R>::take(const T1& t1, const T2& t2)
{
- s_ += t1 * t2;
+ s_ = static_cast<S>(s_ + static_cast<S>(t1) * static_cast<S>(t2));
}
template <typename T1, typename T2, typename R>
@@ -119,7 +119,7 @@
void
convolve<T1,T2,R>::take(const convolve<T1,T2,R>& other)
{
- s_ += other.s_;
+ s_ = static_cast<S>(s_ + other.s_);
}
template <typename T1, typename T2, typename R>
Index: mln/value/ops.hh
--- mln/value/ops.hh (revision 3091)
+++ mln/value/ops.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,10 +29,9 @@
#ifndef MLN_VALUE_OPS_HH
# define MLN_VALUE_OPS_HH
-/*! \file mln/value/ops.hh
- *
- * \brief Definitions of operators for value types.
- */
+/// \file mln/value/ops.hh
+///
+/// Definitions of operators for value types.
# include <mln/trait/op/all.hh>
# include <mln/value/builtin/all.hh>
@@ -216,7 +216,8 @@
mln_trait_op_plus(Vl, Vr)
operator + (const value::Scalar<Vl>& lhs, const value::Scalar<Vr>& rhs)
{
- return value::equiv(lhs) + value::equiv(rhs);
+ typedef mln_trait_op_plus(Vl, Vr) R;
+ return static_cast<R>(value::equiv(lhs)) + static_cast<R>(value::equiv(rhs));
}
template <typename Vl, typename Vr>
@@ -224,7 +225,8 @@
mln_trait_op_minus(Vl, Vr)
operator - (const value::Scalar<Vl>& lhs, const value::Scalar<Vr>& rhs)
{
- return value::equiv(lhs) - value::equiv(rhs);
+ typedef mln_trait_op_minus(Vl, Vr) R;
+ return static_cast<R>(value::equiv(lhs)) - static_cast<R>(value::equiv(rhs));
}
template <typename Vl, typename Vr>
@@ -232,7 +234,8 @@
mln_trait_op_times(Vl, Vr)
operator * (const value::Scalar<Vl>& lhs, const value::Scalar<Vr>& rhs)
{
- return value::equiv(lhs) * value::equiv(rhs);
+ typedef mln_trait_op_times(Vl, Vr) R;
+ return static_cast<R>(value::equiv(lhs)) * static_cast<R>(value::equiv(rhs));
}
template <typename Vl, typename Vr>
@@ -256,7 +259,8 @@
mln_trait_op_uminus(S)
operator - (const value::scalar_<S>& rhs)
{
- return - rhs.to_equiv();
+ typedef mln_trait_op_uminus(S) R;
+ return static_cast<R>(- rhs.to_equiv());
}
template <typename S, typename O>
Index: mln/value/int_u_sat.hh
--- mln/value/int_u_sat.hh (revision 3091)
+++ mln/value/int_u_sat.hh (working copy)
@@ -29,11 +29,10 @@
#ifndef MLN_VALUE_INT_U_SAT_HH
# define MLN_VALUE_INT_U_SAT_HH
-/*! \file mln/value/int_u_sat.hh
- *
- * \brief Define a generic class for unsigned integers with saturation
- * behavior.
- */
+/// \file mln/value/int_u_sat.hh
+///
+/// Define a generic class for unsigned integers with saturation
+/// behavior.
# include <mln/metal/math/pow.hh>
# include <mln/value/internal/value_like.hh>
@@ -117,6 +116,9 @@
/// Self subtraction.
int_u_sat<n>& operator-=(int i);
+
+ private:
+ typedef mln_enc(int_u<n>) enc_;
};
@@ -155,9 +157,9 @@
// Explicitly cast I to unsigned to avoid a warning between
// signed and unsigned values from the compiler.
else if (static_cast<unsigned>(i) > max_)
- this->v_ = max_;
+ this->v_ = static_cast<enc_>(max_);
else
- this->v_ = i;
+ this->v_ = static_cast<enc_>(i);
}
template <unsigned n>
@@ -178,9 +180,9 @@
// Explicitly cast I to unsigned to avoid a warning between
// signed and unsigned values from the compiler.
else if (static_cast<unsigned>(i) > max_)
- this->v_ = max_;
+ this->v_ = static_cast<enc_>(max_);
else
- this->v_ = i;
+ this->v_ = static_cast<enc_>(i);
return *this;
}
Index: mln/border/mirror.hh
--- mln/border/mirror.hh (revision 3091)
+++ mln/border/mirror.hh (working copy)
@@ -81,9 +81,10 @@
trace::entering("border::impl::mirror_");
I& ima = const_cast<I&>(ima_);
- unsigned border = ima.border();
- unsigned nbinds = geom::ninds(ima);
- unsigned min;
+ def::coord
+ border = static_cast<def::coord>(ima.border()),
+ nbinds = static_cast<def::coord>(geom::ninds(ima)),
+ min;
if (border > nbinds)
min = nbinds;
@@ -92,18 +93,19 @@
/// left border
{
- unsigned i = 0;
+ def::coord i = 0;
for (; i < min; ++i)
ima.element(border - 1 - i) = ima(point1d(i));
for (; i < border; ++i)
- ima.element(border - 1 - i) = ima(point1d(min - 1));
+ ima.element(border - 1 - i) = ima(point1d(static_cast<def::coord>(min - 1)));
}
/// right border
{
- unsigned i = 0,
- j = nbinds - 1;
+ def::coord
+ i = 0,
+ j = static_cast<def::coord>(nbinds - 1);
for (;
i < min;
++i, --j)
Index: mln/convert/to_image.hh
--- mln/convert/to_image.hh (revision 3091)
+++ mln/convert/to_image.hh (working copy)
@@ -140,10 +140,12 @@
image1d<unsigned>
to_image(const histo::data<T>& h)
{
- T v_min = h.vset()[0],
- v_max = h.vset()[h.vset().nvalues() - 1];
+ def::coord
+ n = static_cast<def::coord>(h.vset().nvalues()),
+ v_min = static_cast<def::coord>(h.vset()[0]),
+ v_max = static_cast<def::coord>(h.vset()[n - 1]);
image1d<unsigned> ima(make::box1d(v_min, v_max));
- for (unsigned i = 0; i < h.vset().nvalues(); ++i)
+ for (def::coord i = 0; i < n; ++i)
ima(point1d(i)) = h[i];
return ima;
}
Index: mln/geom/essential.hh
--- mln/geom/essential.hh (revision 3091)
+++ mln/geom/essential.hh (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,10 +28,9 @@
#ifndef MLN_GEOM_ESSENTIAL_HH
# define MLN_GEOM_ESSENTIAL_HH
-/*! \file mln/geom/essential.hh
- *
- * \brief File that includes essential geometry related things.
- */
+/// \file mln/geom/essential.hh
+///
+/// File that includes essential geometry related things.
namespace mln
@@ -43,12 +42,11 @@
/// Implementation namespace of geom namespace.
namespace impl {}
}
-
}
+
# include <mln/geom/bbox.hh>
# include <mln/geom/chamfer.hh>
-# include <mln/geom/resize.hh>
# include <mln/geom/size1d.hh>
# include <mln/geom/size2d.hh>
# include <mln/geom/size3d.hh>
@@ -64,4 +62,5 @@
# include <mln/geom/min_row.hh>
# include <mln/geom/min_sli.hh>
+
#endif // ! MLN_GEOM_ESSENTIAL_HH
Index: mln/geom/all.hh
--- mln/geom/all.hh (revision 3091)
+++ mln/geom/all.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
@@ -63,11 +64,11 @@
# include <mln/geom/nsites.hh>
# include <mln/geom/nslis.hh>
# include <mln/geom/pmin_pmax.hh>
-# include <mln/geom/resize.hh>
# include <mln/geom/seeds2tiling.hh>
# include <mln/geom/seeds2tiling_roundness.hh>
# include <mln/geom/size1d.hh>
# include <mln/geom/size2d.hh>
# include <mln/geom/size3d.hh>
+
#endif // ! MLN_GEOM_ALL_HH
Index: mln/fun/v2v/inc.hh
--- mln/fun/v2v/inc.hh (revision 3091)
+++ mln/fun/v2v/inc.hh (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,10 +28,9 @@
#ifndef MLN_FUN_V2V_INC_HH
# define MLN_FUN_V2V_INC_HH
-/*! \file mln/fun/v2v/inc.hh
- *
- * \brief Incrementation function.
- */
+/// \file mln/fun/v2v/inc.hh
+///
+/// Incrementation function.
# include <mln/fun/internal/selector.hh>
@@ -63,7 +62,7 @@
T
inc<T>::operator()(const T& t) const
{
- return t + 1;
+ return static_cast<T>(t + 1);
}
# endif // ! MLN_INCLUDE_ONLY
Index: mln/fun/v2v/cast.hh
--- mln/fun/v2v/cast.hh (revision 3091)
+++ mln/fun/v2v/cast.hh (working copy)
@@ -1,4 +1,5 @@
// 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
@@ -28,13 +29,12 @@
#ifndef MLN_FUN_V2V_CAST_HH
# define MLN_FUN_V2V_CAST_HH
-/*! \file mln/fun/v2v/cast.hh
- *
- * \brief FIXME.
- *
- * \todo The function is intrisically meta; how to handle that
- * particular case?
- */
+/// \file mln/fun/v2v/cast.hh
+///
+/// FIXME.
+///
+/// \todo The function is intrisically meta; how to handle that
+/// particular case?
# include <mln/core/concept/function.hh>
# include <mln/value/cast.hh>
Index: mln/fun/v2v/linear.hh
--- mln/fun/v2v/linear.hh (revision 3091)
+++ mln/fun/v2v/linear.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,12 +29,12 @@
#ifndef MLN_FUN_V2V_LINEAR_HH
# define MLN_FUN_V2V_LINEAR_HH
-/*! \file mln/fun/v2v/linear.hh
- *
- * \brief FIXME.
- */
+/// \file mln/fun/v2v/linear.hh
+///
+/// FIXME.
# include <mln/core/concept/function.hh>
+# include <mln/convert/to.hh>
namespace mln
@@ -57,8 +58,12 @@
struct linear : public Function_v2v< linear<V,T,R> >
{
typedef R result;
+
R operator()(const V& v) const;
+ template <typename U>
+ R operator()(const U& u) const;
+
linear(T a, T b);
T a, b;
};
@@ -79,7 +84,16 @@
R
linear<V,T,R>::operator()(const V& v) const
{
- return R(a * T(v) + b);
+ return convert::to<R>(a * static_cast<T>(v) + b);
+ }
+
+ template <typename V, typename T, typename R>
+ template <typename U>
+ inline
+ R
+ linear<V,T,R>::operator()(const U& u) const
+ {
+ return this->operator()(static_cast<V>(u));
}
# endif // ! MLN_INCLUDE_ONLY
Index: mln/fun/v2v/dec.hh
--- mln/fun/v2v/dec.hh (revision 3091)
+++ mln/fun/v2v/dec.hh (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,10 +28,9 @@
#ifndef MLN_FUN_V2V_DEC_HH
# define MLN_FUN_V2V_DEC_HH
-/*! \file mln/fun/v2v/dec.hh
- *
- * \brief Decrementation function.
- */
+/// \file mln/fun/v2v/dec.hh
+///
+/// Decrementation function.
# include <mln/fun/internal/selector.hh>
@@ -63,7 +62,7 @@
T
dec<T>::operator()(const T& t) const
{
- return t - 1;
+ return static_cast<T>(t - 1);
}
# endif // ! MLN_INCLUDE_ONLY
Index: mln/win/cuboid3d.hh
--- mln/win/cuboid3d.hh (revision 3091)
+++ mln/win/cuboid3d.hh (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -29,7 +29,8 @@
# define MLN_WIN_CUBOID3D_HH
/// \file mln/win/cuboid3d.hh
-/// \brief Definition of the mln::win::cuboid3d window.
+///
+/// Definition of the mln::win::cuboid3d window.
# include <mln/core/internal/classical_window_base.hh>
# include <mln/core/alias/dpoint3d.hh>
@@ -126,12 +127,16 @@
width_(width)
{
mln_precondition(height % 2 == 1 && width % 2 == 1);
- const int dsli = depth / 2;
- const int drow = height / 2;
- const int dcol = width / 2;
- for (int sli = -dsli; sli <= dsli; ++sli)
- for (int row = -drow; row <= drow; ++row)
- for (int col = -dcol; col <= dcol; ++col)
+ const def::coord
+ dsli = static_cast<def::coord>(depth / 2),
+ drow = static_cast<def::coord>(height / 2),
+ dcol = static_cast<def::coord>(width / 2),
+ minus_dsli = static_cast<def::coord>(- dsli),
+ minus_drow = static_cast<def::coord>(- drow),
+ minus_dcol = static_cast<def::coord>(- dcol);
+ for (def::coord sli = minus_dsli; sli <= dsli; ++sli)
+ for (def::coord row = minus_drow; row <= drow; ++row)
+ for (def::coord col = minus_dcol; col <= dcol; ++col)
insert(dpoint3d(sli, row, col));
}
Index: mln/win/cube3d.hh
--- mln/win/cube3d.hh (revision 3091)
+++ mln/win/cube3d.hh (working copy)
@@ -1,4 +1,5 @@
// 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
@@ -28,10 +29,9 @@
#ifndef MLN_WIN_CUBE3D_HH
# define MLN_WIN_CUBE3D_HH
-/*! \file mln/win/cube3d.hh
- *
- * \brief Definition of the mln::win::cube3d window.
- */
+/// \file mln/win/cube3d.hh
+///
+/// Definition of the mln::win::cube3d window.
# include <mln/core/internal/classical_window_base.hh>
# include <mln/core/alias/dpoint3d.hh>
@@ -99,10 +99,12 @@
: length_(length)
{
mln_precondition(length % 2 == 1);
- const int dind = length / 2;
- for (int sli = - dind; sli <= dind; ++sli)
- for (int row = - dind; row <= dind; ++row)
- for (int col = - dind; col <= dind; ++col)
+ const def::coord
+ d = static_cast<def::coord>(length / 2),
+ minus_d = static_cast<def::coord>(- d);
+ for (def::coord sli = minus_d; sli <= d; ++sli)
+ for (def::coord row = minus_d; row <= d; ++row)
+ for (def::coord col = minus_d; col <= d; ++col)
insert(dpoint3d(sli, row, col));
}
Index: mln/algebra/quat.hh
--- mln/algebra/quat.hh (revision 3091)
+++ mln/algebra/quat.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,10 +29,9 @@
#ifndef MLN_ALGEBRA_QUAT_HH
# define MLN_ALGEBRA_QUAT_HH
-/*! \file mln/algebra/quat.hh
- *
- * \brief Define a class for quaternion algebra values.
- */
+/// \file mln/algebra/quat.hh
+///
+/// Define a class for quaternion algebra values.
# include <cmath>
@@ -47,6 +47,7 @@
// FIXME: pow, exp etc... are def here and in value::...
+
namespace mln
{
@@ -427,15 +428,15 @@
inline
void quat::set_unit(float theta, const algebra::vec<3,T>& uv)
{
- static const float pi = 3.14159265358979323846;
+ static const float pi = 3.14159265358979323846f;
mln_precondition(theta > - pi - mln_epsilon(float)
&& theta < pi + mln_epsilon(float));
mln_precondition(about_equal(norm::l2(uv), 1.f));
(void) pi;
- this->v_[0] = cos(theta);
- float sint = sin(theta);
+ this->v_[0] = std::cos(theta);
+ float sint = std::sin(theta);
this->v_[1] = uv[0] * sint;
this->v_[2] = uv[1] * sint;
this->v_[3] = uv[2] * sint;
@@ -456,7 +457,7 @@
float quat::theta() const
{
mln_precondition(is_unit());
- return acos(s());
+ return std::acos(s());
}
inline
@@ -558,7 +559,7 @@
float theta = norm::l2(v);
mln_precondition(!about_equal(theta, 0.f));
algebra::vec<3, float> uv = v / theta;
- return quat(cos(theta), sin(theta) * uv);
+ return quat(std::cos(theta), std::sin(theta) * uv);
}
@@ -611,11 +612,11 @@
quat slerp(const quat& p, const quat& q, float h)
{
assert(interpol_ok(p, q, h));
- float omega = acos(p.sprod(q));
+ float omega = std::acos(p.sprod(q));
return
about_equal(omega, 0.f) ?
lerp(p, q, h) :
- quat((sin((1-h)*omega) * p + sin(h*omega) * q) / sin(omega));
+ quat((std::sin((1-h)*omega) * p + std::sin(h*omega) * q) / std::sin(omega));
}
inline
Index: mln/algebra/vec.hh
--- mln/algebra/vec.hh (revision 3091)
+++ mln/algebra/vec.hh (working copy)
@@ -434,7 +434,7 @@
float n_l2 = 0;
for (unsigned i = 0; i < n; ++i)
n_l2 += data_[i] * data_[i];
- n_l2 = sqrt(n_l2);
+ n_l2 = float(std::sqrt(n_l2));
for (unsigned i = 0; i < n; ++i)
data_[i] = static_cast<T>(data_[i] / n_l2);
return *this;
Index: mln/io/pbm/load.hh
--- mln/io/pbm/load.hh (revision 3091)
+++ mln/io/pbm/load.hh (working copy)
@@ -115,7 +115,7 @@
if (i % 8 == 0)
file.read((char*)(&c), 1);
ima(p) = !(c & 128);
- c *= 2;
+ c = static_cast<char>(c * 2);
++i;
}
}
Index: mln/norm/linfty.hh
--- mln/norm/linfty.hh (revision 3091)
+++ mln/norm/linfty.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,12 +29,12 @@
#ifndef MLN_NORM_LINFTY_HH
# define MLN_NORM_LINFTY_HH
-/*! \file mln/norm/linfty.hh
- *
- * \brief Define some L-infinity-norm related routines.
- * \see http://mathworld.wolfram.com/L-Infinity-Norm.html for more
- * information.
- */
+/// \file mln/norm/linfty.hh
+///
+/// Define some L-infinity-norm related routines.
+///
+/// \see http://mathworld.wolfram.com/L-Infinity-Norm.html for more
+/// information.
# include <mln/math/abs.hh>
# include <mln/algebra/vec.hh>
Index: mln/norm/l1.hh
--- mln/norm/l1.hh (revision 3091)
+++ mln/norm/l1.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,11 +29,10 @@
#ifndef MLN_NORM_L1_HH
# define MLN_NORM_L1_HH
-/*! \file mln/norm/l1.hh
- *
- * \brief Define some L1-norm related routines.
- * \see http://mathworld.wolfram.com/L1-Norm.html for more information.
- */
+/// \file mln/norm/l1.hh
+///
+/// \brief Define some L1-norm related routines.
+/// \see http://mathworld.wolfram.com/L1-Norm.html for more information.
# include <mln/math/abs.hh>
# include <mln/algebra/vec.hh>
@@ -40,6 +40,7 @@
// FIXME: Use mln_sum_x (to be renamed as mln_sum_product) instead of
// mln_sum.
+
namespace mln
{
@@ -75,9 +76,13 @@
mln_sum(C)
l1_(const V& vec)
{
- mln_sum(C) m = 0;
+ typedef mln_sum(C) M;
+ M m = 0;
for (unsigned i = 0; i < n; ++i)
- m += mln::math::abs (vec[i]);
+ {
+ M v_i = static_cast<M>(mln::math::abs(vec[i]));
+ m = static_cast<M>(m + v_i);
+ }
return m;
}
@@ -86,9 +91,13 @@
mln_sum(C)
l1_distance_(const V& vec1, const V& vec2)
{
- mln_sum(C) d = 0;
+ typedef mln_sum(C) D;
+ D d = 0;
for (unsigned i = 0; i < n; ++i)
- d += mln::math::abs (vec1[i] - vec2[i]);
+ {
+ D v1_v2 = static_cast<D>(mln::math::abs(vec1[i] - vec2[i]));
+ d = static_cast<D>(d + v1_v2);
+ }
return d;
}
Index: mln/norm/l2.hh
--- mln/norm/l2.hh (revision 3091)
+++ mln/norm/l2.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,11 +29,11 @@
#ifndef MLN_NORM_L2_HH
# define MLN_NORM_L2_HH
-/*! \file mln/norm/l2.hh
- *
- * \brief Define some L2-norm related routines.
- * \see http://mathworld.wolfram.com/L2-Norm.html for more information.
- */
+/// \file mln/norm/l2.hh
+///
+/// Define some L2-norm related routines.
+///
+/// \see http://mathworld.wolfram.com/L2-Norm.html for more information.
# include <mln/math/sqr.hh>
# include <mln/math/sqrt.hh>
@@ -78,9 +79,13 @@
mln_sum(C)
l2_(const V& vec)
{
- mln_sum(C) m = 0;
+ typedef mln_sum(C) M;
+ M m = 0;
for (unsigned i = 0; i < n; ++i)
- m += mln::math::sqr(vec[i]);
+ {
+ M sqr_v_i = static_cast<M>(mln::math::sqr(vec[i]));
+ m = static_cast<M>(m + sqr_v_i);
+ }
return mln::math::sqrt(m);
}
@@ -89,9 +94,13 @@
mln_sum(C)
l2_distance_(const V& vec1, const V& vec2)
{
- mln_sum(C) d = 0;
+ typedef mln_sum(C) D;
+ D d = 0;
for (unsigned i = 0; i < n; ++i)
- d += mln::math::sqr(vec1[i] - vec2[i]);
+ {
+ D sqr_v1_v2 = static_cast<D>(mln::math::sqr(vec1[i] - vec2[i]));
+ d = static_cast<D>(d + sqr_v1_v2);
+ }
return mln::math::sqrt(d);
}
Index: mln/canvas/browsing/snake_fwd.hh
--- mln/canvas/browsing/snake_fwd.hh (revision 3091)
+++ mln/canvas/browsing/snake_fwd.hh (working copy)
@@ -105,7 +105,7 @@
// trait::image::dimension::two_d)::check();
trace::entering("canvas::browsing::snake_fwd");
mln_precondition(f.input.has_data());
- int
+ def::coord
min_row = geom::min_row(f.input), max_row = geom::max_row(f.input),
min_col = geom::min_col(f.input), max_col = geom::max_col(f.input);
Index: mln/canvas/browsing/dir_struct_elt_incr_update.hh
--- mln/canvas/browsing/dir_struct_elt_incr_update.hh (revision 3091)
+++ mln/canvas/browsing/dir_struct_elt_incr_update.hh (working copy)
@@ -36,6 +36,7 @@
# include <mln/core/concept/browsing.hh>
# include <mln/core/concept/image.hh>
+
namespace mln
{
@@ -110,11 +111,12 @@
pmin = f.input.domain().pmin(),
pmax = f.input.domain().pmax();
- const mln_deduce(I, site, coord)
+ typedef mln_deduce(I, site, coord) C;
+ const C
pmin_dir = pmin[f.dir],
pmax_dir = pmax[f.dir],
- pmin_dir_plus_half_length = pmin_dir + f.length / 2,
- pmax_dir_minus_half_length = pmax_dir - f.length / 2;
+ pmin_dir_plus_half_length = static_cast<C>(pmin_dir + f.length / 2),
+ pmax_dir_minus_half_length = static_cast<C>(pmax_dir - f.length / 2);
mln_psite(I) pt, pu;
Index: tests/opt/at.cc
--- tests/opt/at.cc (revision 3091)
+++ tests/opt/at.cc (working copy)
@@ -78,7 +78,7 @@
const II csub_ima(ima, make::box1d(4, 10));
point1d p(5);
- data::fill(ima, 51);
+ data::fill(ima, short(51));
mln_assertion(csub_ima(p) == opt::at(csub_ima, 5));
opt::at(sub_ima, 5) = 12;
mln_assertion(sub_ima(p) == 12);
@@ -92,7 +92,7 @@
const II ccast(in);
point1d p(5);
- data::fill(in, 51);
+ data::fill(in, (unsigned short)51);
mln_assertion(ccast(p) == opt::at(ccast, 5));
// FIXME
//opt::at(cast, 5) = 12;
@@ -120,7 +120,7 @@
const II csub_ima(ima, make::box2d(4, 4, 10, 10));
point2d p(5, 5);
- data::fill(ima, 51);
+ data::fill(ima, short(51));
mln_assertion(csub_ima(p) == opt::at(csub_ima, 5, 5));
opt::at(sub_ima, 5, 5) = 12;
mln_assertion(sub_ima(p) == 12);
@@ -134,7 +134,7 @@
const II ccast(in);
point2d p(5,5);
- data::fill(in, 51);
+ data::fill(in, (unsigned short)51);
mln_assertion(ccast(p) == opt::at(ccast, 5, 5));
// FIXME
//opt::at(cast, 5) = 12;
Index: tests/level/transform_inplace.cc
--- tests/level/transform_inplace.cc (revision 3091)
+++ tests/level/transform_inplace.cc (working copy)
@@ -27,7 +27,7 @@
/// \file tests/level/transform_inplace.cc
///
-/// Tests on mln::level::transform_inplace
+/// Tests on mln::level::transform_inplace.
#include <mln/core/image/image1d.hh>
@@ -37,19 +37,17 @@
#include <mln/core/image/image_if.hh>
#include <mln/core/image/sub_image.hh>
#include <mln/core/image/extension_val.hh>
-
-
#include <mln/core/routine/duplicate.hh>
-
#include <mln/fun/v2v/inc.hh>
#include <mln/fun/v2v/dec.hh>
+#include <mln/fun/p2b/chess.hh>
+
#include <mln/debug/iota.hh>
#include <mln/level/transform_inplace.hh>
#include <mln/level/compare.hh>
-#include <mln/fun/p2b/chess.hh>
int main()
@@ -60,24 +58,26 @@
// image 2d tests
{
- image2d<int> ref(size, size);
+ typedef int T;
+ image2d<T> ref(size, size);
debug::iota(ref);
- image2d<int> ima = duplicate(ref);
- level::transform_inplace(ima, fun::v2v::inc<int>());
- level::transform_inplace(ima, fun::v2v::dec<int>());
+ image2d<T> ima = duplicate(ref);
+ level::transform_inplace(ima, fun::v2v::inc<T>());
+ level::transform_inplace(ima, fun::v2v::dec<T>());
mln_assertion(ima == ref);
}
/// image 1d test
{
- image1d<unsigned short> ref(size);
+ typedef unsigned short T;
+ image1d<T> ref(size);
debug::iota(ref);
- image1d<unsigned short> ima = duplicate(ref);
- level::transform_inplace(ima, fun::v2v::inc<int>());
- level::transform_inplace(ima, fun::v2v::dec<int>());
+ image1d<T> ima = duplicate(ref);
+ level::transform_inplace(ima, fun::v2v::inc<T>());
+ level::transform_inplace(ima, fun::v2v::dec<T>());
mln_assertion(ima == ref);
}
@@ -85,30 +85,34 @@
/// image 3d test
{
- image3d<unsigned short> ref(size, size, size);
+ typedef unsigned short T;
+ image3d<T> ref(size, size, size);
debug::iota(ref);
- image3d<unsigned short> ima = duplicate(ref);
- level::transform_inplace(ima, fun::v2v::inc<int>());
- level::transform_inplace(ima, fun::v2v::dec<int>());
+ image3d<T> ima = duplicate(ref);
+ level::transform_inplace(ima, fun::v2v::inc<T>());
+ level::transform_inplace(ima, fun::v2v::dec<T>());
mln_assertion(ima == ref);
}
// flat image test
{
- flat_image<short, box2d> ref(5, make::box2d(size, size));
+ typedef short T;
+ flat_image<T, box2d>
+ ref(5, make::box2d(size, size)),
+ ima(5, make::box2d(size, size));
- flat_image<short, box2d> ima(5, make::box2d(size, size));
- level::transform_inplace(ima, fun::v2v::inc<int>());
- level::transform_inplace(ima, fun::v2v::dec<int>());
+ level::transform_inplace(ima, fun::v2v::inc<T>());
+ level::transform_inplace(ima, fun::v2v::dec<T>());
mln_assertion(ima == ref);
}
// image if test
{
- typedef image2d<unsigned short> I;
+ typedef unsigned short T;
+ typedef image2d<T> I;
typedef image_if<I, fun::p2b::chess> II;
I ref(size, size);
@@ -118,8 +122,8 @@
I ima = duplicate(ref);
II ima_if = ima | fun::p2b::chess();
- level::transform_inplace(ima_if, fun::v2v::inc<int>());
- level::transform_inplace(ima_if, fun::v2v::dec<int>());
+ level::transform_inplace(ima_if, fun::v2v::inc<T>());
+ level::transform_inplace(ima_if, fun::v2v::dec<T>());
mln_assertion(ima_if == ref_if);
}
@@ -145,16 +149,17 @@
// extended image test
{
- typedef image2d<int> I;
- typedef extension_val< image2d<int> > II;
+ typedef int T;
+ typedef image2d<T> I;
+ typedef extension_val< image2d<T> > II;
I ref(size, size);
I ima = duplicate(ref);
II extend_ima(ima, 5);
- level::transform_inplace(extend_ima, fun::v2v::inc<int>());
- level::transform_inplace(extend_ima, fun::v2v::dec<int>());
+ level::transform_inplace(extend_ima, fun::v2v::inc<T>());
+ level::transform_inplace(extend_ima, fun::v2v::dec<T>());
mln_assertion(extend_ima == ref);
Index: tests/level/transform.cc
--- tests/level/transform.cc (revision 3091)
+++ tests/level/transform.cc (working copy)
@@ -1,4 +1,5 @@
// 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
@@ -27,7 +28,7 @@
/// \file tests/level/transform.cc
///
-/// Tests on mln::level::transform
+/// Tests on mln::level::transform.
#include <cmath>
@@ -54,12 +55,14 @@
#include <mln/debug/iota.hh>
#include <mln/debug/println.hh>
+
struct mysqrt : mln::Function_v2v<mysqrt>
{
typedef unsigned short result;
- result operator()(unsigned short c) const
+ template <typename T>
+ result operator()(T c) const
{
- return result( std::sqrt(float(c)) );
+ return static_cast<result>( std::sqrt(float(c)) );
}
};
@@ -121,12 +124,11 @@
/// pw image test
{
-
const pw::image<fun::p2v::iota, box2d> ima(fun::p2v::iota(),
make::box2d(2,2, 5,5));
image2d<short unsigned int> out(8, 8);
- data::fill(out, 0);
+ data::fill(out, (short unsigned int)0);
out = level::transform(ima, mysqrt());
}
@@ -171,8 +173,8 @@
II cast(in);
III out(size, size);
- data::fill(in, 51);
- data::fill(out, 42);
+ data::fill(in, (unsigned short)51);
+ data::fill(out, (unsigned short)42);
out = level::transform(cast, mysqrt());
Index: tests/level/sort_psites.cc
--- tests/level/sort_psites.cc (revision 3091)
+++ tests/level/sort_psites.cc (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
@@ -25,10 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/level/sort_psites.cc
- *
- * \brief Tests on mln::level::sort_psites.
- */
+/// \file tests/level/sort_psites.cc
+///
+/// Tests on mln::level::sort_psites.
#include <mln/core/image/image2d.hh>
#include <mln/debug/iota.hh>
@@ -48,12 +48,13 @@
p_array<point2d> array_inc_ref;
p_array<point2d> array_dec_ref;
- for (int i = 0; i < 3; ++i)
- for (int j = 0; j < 3; ++j)
+ typedef def::coord C;
+ for (C i = 0; i < 3; ++i)
+ for (C j = 0; j < 3; ++j)
array_inc_ref.append(point2d(i, j));
- for (int i = 2; i >= 0; --i)
- for (int j = 2; j >= 0; --j)
+ for (C i = 2; i >= 0; --i)
+ for (C j = 2; j >= 0; --j)
array_dec_ref.append(point2d(i, j));
mln_assertion(array_inc == array_inc_ref);
Index: tests/level/Makefile.am
--- tests/level/Makefile.am (revision 3091)
+++ tests/level/Makefile.am (working copy)
@@ -22,7 +22,6 @@
paste \
saturate \
sort_psites \
- sort_psites_full \
stretch \
transform \
transform_inplace \
@@ -50,7 +49,4 @@
transform_inplace_SOURCES = transform_inplace.cc
update_SOURCES = update.cc
-# Lengthy tests.
-sort_psites_full_SOURCES = sort_psites_full.cc
-
TESTS = $(check_PROGRAMS)
Index: tests/data/paste.cc
--- tests/data/paste.cc (revision 3091)
+++ tests/data/paste.cc (working copy)
@@ -113,7 +113,7 @@
make::box2d(2,2, 5,5));
image2d<short unsigned int> out(8, 8);
- data::fill(out, 0);
+ data::fill(out, (short unsigned int)0);
data::paste(ima, out);
}
@@ -154,8 +154,8 @@
II cast(in);
III out(size, size);
- data::fill(in, 51);
- data::fill(out, 42);
+ data::fill(in, (unsigned short)51);
+ data::fill(out, (unsigned short)42);
data::paste(cast, out);
Index: tests/data/fill_with_image.cc
--- tests/data/fill_with_image.cc (revision 3091)
+++ tests/data/fill_with_image.cc (working copy)
@@ -149,7 +149,7 @@
make::box2d(-2,-2, 15,15));
image2d<short unsigned int> out(8, 8);
- data::fill(out, 0);
+ data::fill(out, (short unsigned int)0);
data::fill_with_image(out, ima);
}
@@ -191,8 +191,8 @@
II cast(in);
I out(size, size);
- data::fill(in, 51);
- data::fill(out, 42);
+ data::fill(in, (unsigned short)51);
+ data::fill(out, (unsigned short)42);
data::fill_with_image(out, cast);
Index: tests/linear/convolve.cc
--- tests/linear/convolve.cc (revision 3091)
+++ tests/linear/convolve.cc (working copy)
@@ -26,10 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/linear/convolve.cc
- *
- * \brief Tests on mln::linear::convolve.
- */
+/// \file tests/linear/convolve.cc
+///
+/// Tests on mln::linear::convolve.
#include <mln/core/image/image2d.hh>
#include <mln/value/int_u8.hh>
@@ -56,13 +55,14 @@
image2d<int_u8> lena;
io::pgm::load(lena, MLN_IMG_DIR "/lena.pgm");
- float ws[] = { .04, .04, .04, .04, .04,
- .04, .04, .04, .04, .04,
- .04, .04, .04, .04, .04,
- .04, .04, .04, .04, .04,
- .04, .04, .04, .04, .04 };
- w_window2d_float w = make::w_window2d(ws);
- image2d<float> tmp = linear::convolve(lena, w);
+ float w = .04f;
+ float ws[] = { w, w, w, w, w,
+ w, w, w, w, w,
+ w, w, w, w, w,
+ w, w, w, w, w,
+ w, w, w, w, w };
+ w_window2d_float w_win = make::w_window2d(ws);
+ image2d<float> tmp = linear::convolve(lena, w_win);
io::pgm::save(level::transform(tmp, math::round<int_u8>()),
"out.pgm");
Index: tests/linear/convolve_directional.cc
--- tests/linear/convolve_directional.cc (revision 3091)
+++ tests/linear/convolve_directional.cc (working copy)
@@ -26,10 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/linear/convolve_directional.cc
- *
- * \brief Tests on mln::linear::convolve_directional.
- */
+/// \file tests/linear/convolve_directional.cc
+///
+/// Tests on mln::linear::convolve_directional.
#include <mln/core/image/image2d.hh>
#include <mln/value/int_u8.hh>
@@ -56,7 +55,8 @@
image2d<int_u8> lena;
io::pgm::load(lena, MLN_IMG_DIR "/lena.pgm");
- float ws[] = { .11, .11, .11, .11, .11, .11, .11, .11, .11 };
+ float w = .11f;
+ float ws[] = { w, w, w, w, w, w, w, w, w };
image2d<float> tmp = linear::convolve_directional(lena, 1, ws);
io::pgm::save(level::transform(tmp, math::round<int_u8>()),
Index: tests/linear/gaussian.cc
--- tests/linear/gaussian.cc (revision 3091)
+++ tests/linear/gaussian.cc (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
@@ -25,10 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/linear/gaussian.cc
- *
- * \brief Test on mln::linear::gaussian.
- */
+/// \file tests/linear/gaussian.cc
+///
+/// Test on mln::linear::gaussian.
#include <mln/core/image/image2d.hh>
#include <mln/value/int_u8.hh>
Index: tests/geom/Makefile.am
--- tests/geom/Makefile.am (revision 3091)
+++ tests/geom/Makefile.am (working copy)
@@ -18,7 +18,6 @@
nsites \
nslis \
pmin_pmax \
-resize \
seed2tiling \
seed2tiling_roundness
@@ -38,7 +37,6 @@
nsites_SOURCES = nsites.cc
nslis_SOURCES = nslis.cc
pmin_pmax_SOURCES = pmin_pmax.cc
-resize_SOURCES = resize.cc
seed2tiling_SOURCES = seed2tiling.cc
seed2tiling_roundness_SOURCES = seed2tiling_roundness.cc
Index: tests/norm/l2.cc
--- tests/norm/l2.cc (revision 3091)
+++ tests/norm/l2.cc (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,10 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/norm/l2.cc
- *
- * \brief Test the L2-norm.
- */
+/// \file tests/norm/l2.cc
+///
+/// \brief Test the L2-norm.
#include <cmath>
#include <cassert>
@@ -59,14 +59,15 @@
}
}
+
int main()
{
typedef mln::algebra::vec<3, int> vec_t;
// Reference value.
- float d = std::sqrt((4 - 2) * (4 - 2) +
+ float d = float(std::sqrt((4 - 2) * (4 - 2) +
(1 + 2) * (1 + 2) +
- (0 - 3) * (0 - 3));
+ (0 - 3) * (0 - 3)));
// Tests using mln::algebra::vec.
vec_t t, u;
Index: tests/norm/common.hh
--- tests/norm/common.hh (revision 3091)
+++ tests/norm/common.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -32,27 +33,32 @@
#include <mln/math/abs.hh>
+
// FIXME: We should have a almost_equal function somewhere in Milena.
-static const float epsilon = 0.0001;
+static const float epsilon = 0.0001f;
+
namespace test
{
template <typename Norm, typename V>
void
- check_norm(const Norm norm, const V& vec1, const V& vec2)
+ check_norm(const Norm& norm, const V& vec1, const V& vec2)
{
assert(mln::math::abs(norm(vec1) - norm(vec2)) < epsilon);
}
template <typename Distance, typename V, typename S>
void
- check_distance (const Distance dist, const V& vec1, const V& vec2,
+ check_distance(const Distance& dist, const V& vec1, const V& vec2,
const S& ref_val)
{
- assert(mln::math::abs(dist(vec1, vec2) - ref_val) < epsilon);
+ float delta = mln::math::abs(static_cast<float>(dist(vec1, vec2))
+ - static_cast<float>(ref_val));
+ assert(delta < epsilon);
}
-} // End of namespace test.
+} // end of namespace test.
+
#endif // !TESTS_NORM_COMMON_HH
Index: tests/norm/linfty.cc
--- tests/norm/linfty.cc (revision 3091)
+++ tests/norm/linfty.cc (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,10 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/norm/linfty.cc
- *
- * \brief Test the L-infinity-norm.
- */
+/// \file tests/norm/linfty.cc
+///
+/// Test the L-infinity-norm.
#include <tests/norm/common.hh>
@@ -62,9 +62,9 @@
typedef mln::algebra::vec<3, int> vec_t;
// Reference value.
- float d = std::max(std::abs(4 - 2),
+ float d = float(std::max(std::abs(4 - 2),
std::max(std::abs(1 + 2),
- std::abs(0 - 4)));
+ std::abs(0 - 4))));
vec_t t, u;
t.set(2, -2, 4);
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Fix warnings due to g++ Wconversion option.
* mln/debug/iota.spe.hh,
* mln/debug/put_word.hh,
* mln/debug/println.spe.hh,
* mln/core/site_set/box.hh,
* mln/core/site_set/box_piter.hh,
* mln/core/image/image1d.hh,
* mln/core/image/image2d.hh,
* mln/core/image/image3d.hh,
* mln/core/point.hh,
* mln/core/box_runstart_piter.hh,
* mln/core/alias/window2d.hh,
* mln/core/concept/site_set.hh,
* mln/core/dpoint.hh,
* mln/math/abs.hh,
* mln/opt/at.hh,
* mln/accu/sum.hh,
* mln/accu/line.hh,
* mln/accu/mean.hh,
* mln/value/float01_.hh,
* mln/value/int_s.hh,
* mln/value/int_u.hh,
* mln/value/float01.hh,
* mln/make/win_chamfer.hh,
* mln/make/image.hh,
* mln/make/box2d_h.hh,
* mln/make/point2d_h.hh,
* mln/make/dpoint2d_h.hh,
* mln/make/box1d.hh,
* mln/make/box2d.hh,
* mln/make/box3d.hh,
* mln/border/mirror.hh,
* mln/convert/to_image.hh,
* mln/win/line.hh,
* mln/win/diag2d.hh,
* mln/win/backdiag2d.hh,
* mln/win/octagon2d.hh,
* mln/win/disk2d.hh,
* mln/algebra/mat.hh,
* mln/algebra/h_vec.hh,
* mln/algebra/vec.hh,
* mln/io/pnm/save_header.hh,
* mln/io/pnm/load_header.hh,
* mln/io/pnm/save.hh,
* mln/io/pnm/load.hh,
* mln/io/pbm/save.hh,
* tests/data/fill.cc,
* tests/border/fill_full.cc,
* tests/convert/to_p_array.cc,
* tests/convert/to_image.cc,
* tests/win/diag2d.cc: Use static_cast.
Replace int by def::coord when needed.
mln/accu/line.hh | 8 ++---
mln/accu/mean.hh | 8 +++--
mln/accu/sum.hh | 2 -
mln/algebra/h_vec.hh | 10 +++---
mln/algebra/mat.hh | 17 +++++------
mln/algebra/vec.hh | 21 ++++++++------
mln/border/mirror.hh | 15 ++++++----
mln/convert/to_image.hh | 1
mln/core/alias/window2d.hh | 21 +++++++++-----
mln/core/box_runstart_piter.hh | 15 +++++-----
mln/core/concept/site_set.hh | 10 ------
mln/core/dpoint.hh | 3 +-
mln/core/image/image1d.hh | 11 ++++---
mln/core/image/image2d.hh | 14 +++++----
mln/core/image/image3d.hh | 16 ++++++----
mln/core/point.hh | 4 +-
mln/core/site_set/box.hh | 18 ++++++------
mln/core/site_set/box_piter.hh | 2 -
mln/debug/iota.spe.hh | 2 -
mln/debug/println.spe.hh | 14 +++++----
mln/debug/put_word.hh | 13 ++++----
mln/io/pbm/save.hh | 33 +++++++++++-----------
mln/io/pnm/load.hh | 16 ++++------
mln/io/pnm/load_header.hh | 2 -
mln/io/pnm/save.hh | 22 ++++++---------
mln/io/pnm/save_header.hh | 16 ++++------
mln/make/box1d.hh | 10 +++---
mln/make/box2d.hh | 8 ++---
mln/make/box2d_h.hh | 21 +++++++-------
mln/make/box3d.hh | 12 ++++----
mln/make/dpoint2d_h.hh | 14 ++++-----
mln/make/image.hh | 20 +++++++++----
mln/make/point2d_h.hh | 14 ++++-----
mln/make/win_chamfer.hh | 58 +++++++++++++++++++--------------------
mln/math/abs.hh | 9 ++----
mln/opt/at.hh | 60 ++++++++++++++++++++---------------------
mln/value/float01.hh | 12 ++++----
mln/value/float01_.hh | 13 +++++---
mln/value/int_s.hh | 17 ++++++-----
mln/value/int_u.hh | 4 +-
mln/win/backdiag2d.hh | 14 +++++----
mln/win/diag2d.hh | 17 ++++++-----
mln/win/disk2d.hh | 20 +++++++------
mln/win/line.hh | 6 ++--
mln/win/octagon2d.hh | 57 +++++++++++++++++++++++---------------
tests/border/fill_full.cc | 8 ++---
tests/convert/to_image.cc | 1
tests/convert/to_p_array.cc | 10 ++++--
tests/data/fill.cc | 20 +++++--------
tests/win/diag2d.cc | 17 +++++------
50 files changed, 402 insertions(+), 354 deletions(-)
Index: mln/debug/iota.spe.hh
--- mln/debug/iota.spe.hh (revision 3090)
+++ mln/debug/iota.spe.hh (working copy)
@@ -63,7 +63,7 @@
unsigned i = 0;
mln_pixter(I) p(input);
for_all(p)
- p.val() = ++i % mln_max(mln_value(I));
+ p.val() = static_cast<mln_value(I)>(++i % mln_max(mln_value(I)));
}
# endif // ! MLN_INCLUDE_ONLY
Index: mln/debug/put_word.hh
--- mln/debug/put_word.hh (revision 3090)
+++ mln/debug/put_word.hh (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,10 +28,9 @@
#ifndef MLN_DEBUG_PUT_WORD_HH
# define MLN_DEBUG_PUT_WORD_HH
-/*! \file mln/debug/put_word.hh
- *
- * \brief Write a word in a 2D image of characters.
- */
+/// \file mln/debug/put_word.hh
+///
+/// Write a word in a 2D image of characters.
# include <string>
# include <mln/core/image/image2d.hh>
@@ -62,7 +61,9 @@
mln_precondition(inout.has(word_start));
point2d word_end = word_start;
- word_end.last_coord() += word.length() - 1;
+
+ word_end.last_coord() = static_cast<def::coord>(word_end.last_coord() + word.length() - 1);
+
if (!inout.has(word_end))
trace::warning("Cannot write text outside the image domain");
Index: mln/debug/println.spe.hh
--- mln/debug/println.spe.hh (revision 3090)
+++ mln/debug/println.spe.hh (working copy)
@@ -84,9 +84,9 @@
void
println(const box2d& b, const image2d<char>& input)
{
- for (int row = b.min_row(); row <= b.max_row(); ++row)
+ for (def::coord row = b.min_row(); row <= b.max_row(); ++row)
{
- for (int col = b.min_col(); col <= b.max_col(); ++col)
+ for (def::coord col = b.min_col(); col <= b.max_col(); ++col)
std::cout << opt::at(input, row, col) << ' ';
std::cout << std::endl;
}
@@ -115,14 +115,16 @@
{
std::ostringstream oss;
oss << format(input(p));
- point2d w( p.row() - b.min_row(),
- (p.col() - b.min_col()) * len);
+ def::coord
+ row = static_cast<def::coord>(p.row() - b.min_row()),
+ col = static_cast<def::coord>((p.col() - b.min_col()) * len);
+ point2d w(row, col);
put_word(output, w, oss.str());
}
- for (unsigned row = 0; row < b.nrows(); ++row)
+ for (def::coord row = 0; row < def::coord(b.nrows()); ++row)
{
- for (unsigned col = 0; col < b.ncols() * len; ++col)
+ for (def::coord col = 0; col < def::coord(b.ncols() * len); ++col)
std::cout << opt::at(output, row, col);
std::cout << std::endl;
}
Index: mln/core/site_set/box.hh
--- mln/core/site_set/box.hh (revision 3090)
+++ mln/core/site_set/box.hh (working copy)
@@ -1,4 +1,5 @@
// 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
@@ -28,12 +29,11 @@
#ifndef MLN_CORE_SITE_SET_BOX_HH
# define MLN_CORE_SITE_SET_BOX_HH
-/*! \file mln/core/site_set/box.hh
- *
- * \brief This file defines a generic box class.
- *
- * \todo Test if the safety code in box::box() is not too slow.
- */
+/// \file mln/core/site_set/box.hh
+///
+/// This file defines a generic box class.
+///
+/// \todo Test if the safety code in box::box() is not too slow.
# include <mln/core/concept/box.hh>
# include <mln/core/internal/box_impl.hh>
@@ -357,8 +357,8 @@
for (unsigned i = 0; i < P::dim; ++i)
{
- tmp.pmin_[i] -= b;
- tmp.pmax_[i] += b;
+ tmp.pmin_[i] = static_cast<mln_coord(P)>(tmp.pmin_[i] - b);
+ tmp.pmax_[i] = static_cast<mln_coord(P)>(tmp.pmax_[i] + b);
}
mln_postcondition(tmp.is_valid());
return tmp;
@@ -372,7 +372,7 @@
mln_precondition(is_valid());
P center;
for (unsigned i = 0; i < P::dim; ++i)
- center[i] = pmin_[i] + ((pmax_[i] - pmin_[i]) / 2);
+ center[i] = static_cast<mln_coord(P)>(pmin_[i] + ((pmax_[i] - pmin_[i]) / 2));
return center;
}
Index: mln/core/site_set/box_piter.hh
--- mln/core/site_set/box_piter.hh (revision 3090)
+++ mln/core/site_set/box_piter.hh (working copy)
@@ -165,7 +165,7 @@
void
box_fwd_piter_<P>::invalidate_()
{
- p_[0] = (s_->pmax()[0] + 1);
+ p_[0] = static_cast<def::coord>(s_->pmax()[0] + 1);
}
template <typename P>
Index: mln/core/image/image1d.hh
--- mln/core/image/image1d.hh (revision 3090)
+++ mln/core/image/image1d.hh (working copy)
@@ -181,10 +181,10 @@
// -----------------
/// Read-only access to the image value located at (\p index).
- const T& at(int index) const;
+ const T& at(def::coord index) const;
/// Read-write access to the image value located at (\p index).
- T& at(int index);
+ T& at(def::coord index);
/// Fast Image method
@@ -426,7 +426,7 @@
template <typename T>
inline
const T&
- image1d<T>::at(int index) const
+ image1d<T>::at(def::coord index) const
{
mln_precondition(this->has(point1d(index)));
return this->data_->array_[index];
@@ -435,7 +435,7 @@
template <typename T>
inline
T&
- image1d<T>::at(int index)
+ image1d<T>::at(def::coord index)
{
mln_precondition(this->has(point1d(index)));
return this->data_->array_[index];
@@ -494,7 +494,8 @@
image1d<T>::point_at_index(unsigned i) const
{
mln_precondition(i < nelements());
- point1d p = point1d(i + this->data_->vb_.min_ind());
+ def::coord ind = static_cast<def::coord>(i + this->data_->vb_.min_ind());
+ point1d p = point1d(ind);
mln_postcondition(& this->operator()(p) == this->data_->buffer_ + i);
return p;
}
Index: mln/core/image/image2d.hh
--- mln/core/image/image2d.hh (revision 3090)
+++ mln/core/image/image2d.hh (working copy)
@@ -205,10 +205,10 @@
// -----------------
/// Read-only access to the image value located at (\p row, \p col).
- const T& at(int row, int col) const;
+ const T& at(def::coord row, def::coord col) const;
/// Read-write access to the image value located at (\p row, \p col).
- T& at(int row, int col);
+ T& at(def::coord row, def::coord col);
/// Give the number of rows.
unsigned nrows() const;
@@ -463,7 +463,7 @@
template <typename T>
inline
const T&
- image2d<T>::at(int row, int col) const
+ image2d<T>::at(def::coord row, def::coord col) const
{
mln_precondition(this->has(point2d(row, col)));
return this->data_->array_[row][col];
@@ -472,7 +472,7 @@
template <typename T>
inline
T&
- image2d<T>::at(int row, int col)
+ image2d<T>::at(def::coord row, def::coord col)
{
mln_precondition(this->has(point2d(row, col)));
return this->data_->array_[row][col];
@@ -569,8 +569,10 @@
image2d<T>::point_at_index(unsigned i) const
{
mln_precondition(i < nelements());
- point2d p = point2d(i / this->data_->vb_.len(1) + this->data_->vb_.min_row(),
- i % this->data_->vb_.len(1) + this->data_->vb_.min_col());
+ def::coord
+ row = static_cast<def::coord>(i / this->data_->vb_.len(1) + this->data_->vb_.min_row()),
+ col = static_cast<def::coord>(i % this->data_->vb_.len(1) + this->data_->vb_.min_col());
+ point2d p = point2d(row, col);
mln_postcondition(& this->operator()(p) == this->data_->buffer_ + i);
return p;
}
Index: mln/core/image/image3d.hh
--- mln/core/image/image3d.hh (revision 3090)
+++ mln/core/image/image3d.hh (working copy)
@@ -201,11 +201,11 @@
/// Read-only access to the image value located at (\p sli, \p
/// row, \p col).
- const T& at(int sli, int row, int col) const;
+ const T& at(def::coord sli, def::coord row, def::coord col) const;
/// Read-write access to the image value located at (\p sli, \p
/// row, \p col).
- T& at(int sli, int row, int col);
+ T& at(def::coord sli, def::coord row, def::coord col);
/// Fast Image method
@@ -484,7 +484,7 @@
template <typename T>
inline
const T&
- image3d<T>::at(int sli, int row, int col) const
+ image3d<T>::at(def::coord sli, def::coord row, def::coord col) const
{
mln_precondition(this->has(point3d(sli, row, col)));
return data_->array_[sli][row][col];
@@ -493,7 +493,7 @@
template <typename T>
inline
T&
- image3d<T>::at(int sli, int row, int col)
+ image3d<T>::at(def::coord sli, def::coord row, def::coord col)
{
mln_precondition(this->has(point3d(sli, row, col)));
return data_->array_[sli][row][col];
@@ -533,9 +533,11 @@
image3d<T>::point_at_index(unsigned o) const
{
mln_precondition(o < nelements());
- point3d p = point3d(o / (data_->vb_.len(1) * data_->vb_.len(2)) + data_->vb_.min_sli(),
- (o % (data_->vb_.len(1) * data_->vb_.len(2))) / data_->vb_.len(2) + data_->vb_.min_row(),
- o % data_->vb_.len(2) + data_->vb_.min_col());
+ def::coord
+ sli = static_cast<def::coord>(o / (data_->vb_.len(1) * data_->vb_.len(2)) + data_->vb_.min_sli()),
+ row = static_cast<def::coord>((o % (data_->vb_.len(1) * data_->vb_.len(2))) / data_->vb_.len(2) + data_->vb_.min_row()),
+ col = static_cast<def::coord>(o % data_->vb_.len(2) + data_->vb_.min_col());
+ point3d p = point3d(sli, row, col);
mln_postcondition(& this->operator()(p) == this->data_->buffer_ + o);
return p;
}
Index: mln/core/point.hh
--- mln/core/point.hh (revision 3090)
+++ mln/core/point.hh (working copy)
@@ -298,7 +298,7 @@
mlc_converts_to(mln_result(F), C)::check();
const F& f = exact(f_);
for (unsigned i = 0; i < dim; ++i)
- coord_[i] = f(i);
+ coord_[i] = static_cast<C>( f(i) );
}
template <typename G, typename C>
@@ -369,7 +369,7 @@
point<G,C>::operator+=(const delta& dp)
{
for (unsigned i = 0; i < dim; ++i)
- coord_[i] += dp[i];
+ coord_[i] = static_cast<C>(coord_[i] + dp[i]);
return *this;
}
Index: mln/core/box_runstart_piter.hh
--- mln/core/box_runstart_piter.hh (revision 3090)
+++ mln/core/box_runstart_piter.hh (working copy)
@@ -1,4 +1,5 @@
// 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
@@ -28,18 +29,18 @@
#ifndef MLN_CORE_BOX_RUNSTART_PITER_HH
# define MLN_CORE_BOX_RUNSTART_PITER_HH
-/*! \file mln/core/box_runstart_piter.hh
- *
- * \brief Definition of iterators on points by lines.
- *
- */
+/// \file mln/core/box_runstart_piter.hh
+///
+/// Definition of iterators on points by lines.
# include <mln/core/internal/site_iterator_base.hh>
# include <mln/core/site_set/box.hh>
+
#define mln_box_runstart_piter(I) typename mln::box_runstart_piter< mln_psite(I) >
#define mln_box_runstart_piter_(I) mln::box_runstart_piter<mln_psite(I)>
+
namespace mln
{
@@ -111,7 +112,7 @@
bool
box_runstart_piter<P>::is_valid_() const
{
- return p_[0] != s_->pmax()[0] + 1;
+ return p_[0] != static_cast<mln_coord(P)>(s_->pmax()[0] + 1);
}
template <typename P>
@@ -119,7 +120,7 @@
void
box_runstart_piter<P>::invalidate_()
{
- p_[0] = s_->pmax()[0] + 1;
+ p_[0] = static_cast<mln_coord(P)>(s_->pmax()[0] + 1);
}
template <typename P>
Index: mln/core/alias/window2d.hh
--- mln/core/alias/window2d.hh (revision 3090)
+++ mln/core/alias/window2d.hh (working copy)
@@ -107,12 +107,15 @@
void
from_to_(const bool (&values)[S], window2d& win)
{
- enum { h = mlc_sqrt_int(S) / 2 };
- mlc_bool((2 * h + 1) * (2 * h + 1) == S)::check();
+ enum { H = mlc_sqrt_int(S) / 2 };
+ mlc_bool((2 * H + 1) * (2 * H + 1) == S)::check();
win.clear();
unsigned i = 0;
- for (int row = - h; row <= h; ++row)
- for (int col = - h; col <= h; ++col)
+ const def::coord
+ h = static_cast<def::coord>(H),
+ _h = static_cast<def::coord>(-h);
+ for (def::coord row = _h; row <= h; ++row)
+ for (def::coord col = _h; col <= h; ++col)
if (values[i++])
win.insert(row, col);
}
@@ -124,9 +127,13 @@
mlc_bool(R % 2 == 1)::check();
mlc_bool(C % 2 == 1)::check();
win.clear();
- const int drow = int(R) / 2, dcol = int(C) / 2;
- for (int row = - drow; row <= drow; ++row)
- for (int col = - dcol; col <= dcol; ++col)
+ const def::coord
+ drow = static_cast<def::coord>(R / 2),
+ _drow = static_cast<def::coord>(- drow),
+ dcol = static_cast<def::coord>(C / 2),
+ _dcol = static_cast<def::coord>(- dcol);
+ for (def::coord row = _drow; row <= drow; ++row)
+ for (def::coord col = _dcol; col <= dcol; ++col)
if (values[row + drow][col + dcol])
win.insert(row, col);
}
Index: mln/core/concept/site_set.hh
--- mln/core/concept/site_set.hh (revision 3090)
+++ mln/core/concept/site_set.hh (working copy)
@@ -48,17 +48,9 @@
namespace mln
{
- // Forward declarations.
+ // Forward declaration.
template <typename E> struct Site_Set;
- namespace convert
- {
-
- template <typename F, typename T>
- void from_to(const F& from, T& to);
-
- }
-
/// Site_Set category flag type.
template <>
Index: mln/core/dpoint.hh
--- mln/core/dpoint.hh (revision 3090)
+++ mln/core/dpoint.hh (working copy)
@@ -40,6 +40,7 @@
# include <mln/algebra/vec.hh>
# include <mln/metal/converts_to.hh>
+
namespace mln
{
@@ -232,7 +233,7 @@
mlc_converts_to(mln_result(F), C)::check();
const F& f = exact(f_);
for (unsigned i = 0; i < dim; ++i)
- coord_[i] = f(i);
+ coord_[i] = static_cast<C>(f(i));
}
template <typename G, typename C>
Index: mln/math/abs.hh
--- mln/math/abs.hh (revision 3090)
+++ mln/math/abs.hh (working copy)
@@ -29,10 +29,9 @@
#ifndef MLN_MATH_ABS_HH
# define MLN_MATH_ABS_HH
-/*! \file mln/math/abs.hh
- *
- * \brief Define the absolute value (abs) routine.
- */
+/// \file mln/math/abs.hh
+///
+/// Define the absolute value (abs) routine.
# include <cmath>
# include <cstdlib>
@@ -77,7 +76,7 @@
inline
T abs(const T& v)
{
- return v >= 0 ? v : -v;
+ return v >= 0 ? v : static_cast<T>(-v);
}
inline int abs(int v) { return std::abs(v); }
Index: mln/opt/at.hh
--- mln/opt/at.hh (revision 3090)
+++ mln/opt/at.hh (working copy)
@@ -49,25 +49,25 @@
/// One dimension
template <typename I>
- mln_rvalue(I) at(const Image<I>& ima, int ind);
+ mln_rvalue(I) at(const Image<I>& ima, def::coord ind);
template <typename I>
- mln_lvalue(I) at(Image<I>& ima, int ind);
+ mln_lvalue(I) at(Image<I>& ima, def::coord ind);
/// Two dimensions
template <typename I>
- mln_rvalue(I) at(const Image<I>& ima, int row, int col);
+ mln_rvalue(I) at(const Image<I>& ima, def::coord row, def::coord col);
template <typename I>
- mln_lvalue(I) at(Image<I>& ima, int row, int col);
+ mln_lvalue(I) at(Image<I>& ima, def::coord row, def::coord col);
/// Three dimensions
template <typename I>
- mln_rvalue(I) at(const Image<I>& ima, int sli, int row, int col);
+ mln_rvalue(I) at(const Image<I>& ima, def::coord sli, def::coord row, def::coord col);
template <typename I>
- mln_lvalue(I) at(Image<I>& ima, int sli, int row, int col);
+ mln_lvalue(I) at(Image<I>& ima, def::coord sli, def::coord row, def::coord col);
# ifndef MLN_INCLUDE_ONLY
@@ -80,7 +80,7 @@
template <typename I>
inline
mln_rvalue(I) at_1d_impl(trait::image::category::domain_morpher,
- const Image<I>& ima, int ind)
+ const Image<I>& ima, def::coord ind)
{
point1d p(ind);
return exact(ima)(p);
@@ -89,7 +89,7 @@
template <typename I>
inline
mln_rvalue(I) at_1d_impl(trait::image::category::morpher,
- const Image<I>& ima, int ind)
+ const Image<I>& ima, def::coord ind)
{
// FIXME: what about morpher that modify the image value?
// (through a function for instance)
@@ -99,7 +99,7 @@
template <typename I>
inline
mln_rvalue(I) at_1d_impl(trait::image::category::primary,
- const Image<I>& ima, int ind)
+ const Image<I>& ima, def::coord ind)
{
return exact(ima).at(ind);
}
@@ -108,7 +108,7 @@
template <typename I>
inline
mln_lvalue(I) at_1d_impl(trait::image::category::domain_morpher,
- Image<I>& ima, int ind)
+ Image<I>& ima, def::coord ind)
{
mlc_is(mln_trait_image_pw_io(I),
trait::image::pw_io::read_write)::check();
@@ -120,7 +120,7 @@
template <typename I>
inline
mln_lvalue(I) at_1d_impl(trait::image::category::morpher,
- Image<I>& ima, int ind)
+ Image<I>& ima, def::coord ind)
{
// FIXME: what about morpher that modify the image value?
// (through a function for instance)
@@ -130,7 +130,7 @@
template <typename I>
inline
mln_lvalue(I) at_1d_impl(trait::image::category::primary,
- Image<I>& ima, int ind)
+ Image<I>& ima, def::coord ind)
{
return exact(ima).at(ind);
}
@@ -139,7 +139,7 @@
template <typename I>
inline
- mln_rvalue(I) at(const Image<I>& ima, int ind)
+ mln_rvalue(I) at(const Image<I>& ima, def::coord ind)
{
mlc_is(mln_trait_image_dimension(I),
trait::image::dimension::one_d)::check();
@@ -148,7 +148,7 @@
}
template <typename I>
- mln_lvalue(I) at(Image<I>& ima, int ind)
+ mln_lvalue(I) at(Image<I>& ima, def::coord ind)
{
mlc_is(mln_trait_image_dimension(I),
trait::image::dimension::one_d)::check();
@@ -165,7 +165,7 @@
template <typename I>
inline
mln_rvalue(I) at_2d_impl(trait::image::category::domain_morpher,
- const Image<I>& ima, int row, int col)
+ const Image<I>& ima, def::coord row, def::coord col)
{
point2d p(row, col);
return exact(ima)(p);
@@ -174,7 +174,7 @@
template <typename I>
inline
mln_rvalue(I) at_2d_impl(trait::image::category::morpher,
- const Image<I>& ima, int row, int col)
+ const Image<I>& ima, def::coord row, def::coord col)
{
// FIXME: what about morpher that modify the image value?
// (through a function for instance)
@@ -184,7 +184,7 @@
template <typename I>
inline
mln_rvalue(I) at_2d_impl(trait::image::category::primary,
- const Image<I>& ima, int row, int col)
+ const Image<I>& ima, def::coord row, def::coord col)
{
return exact(ima).at(row, col);
}
@@ -193,7 +193,7 @@
template <typename I>
inline
mln_lvalue(I) at_2d_impl(trait::image::category::domain_morpher,
- Image<I>& ima, int row, int col)
+ Image<I>& ima, def::coord row, def::coord col)
{
mlc_is(mln_trait_image_pw_io(I),
trait::image::pw_io::read_write)::check();
@@ -205,7 +205,7 @@
template <typename I>
inline
mln_lvalue(I) at_2d_impl(trait::image::category::morpher,
- Image<I>& ima, int row, int col)
+ Image<I>& ima, def::coord row, def::coord col)
{
// FIXME: what about morpher that modify the image value?
// (through a function for instance)
@@ -215,7 +215,7 @@
template <typename I>
inline
mln_lvalue(I) at_2d_impl(trait::image::category::primary,
- Image<I>& ima, int row, int col)
+ Image<I>& ima, def::coord row, def::coord col)
{
return exact(ima).at(row, col);
}
@@ -224,7 +224,7 @@
template <typename I>
inline
- mln_rvalue(I) at(const Image<I>& ima, int row, int col)
+ mln_rvalue(I) at(const Image<I>& ima, def::coord row, def::coord col)
{
mlc_is(mln_trait_image_dimension(I),
trait::image::dimension::two_d)::check();
@@ -233,7 +233,7 @@
}
template <typename I>
- mln_lvalue(I) at(Image<I>& ima, int row, int col)
+ mln_lvalue(I) at(Image<I>& ima, def::coord row, def::coord col)
{
mlc_is(mln_trait_image_dimension(I),
trait::image::dimension::two_d)::check();
@@ -249,7 +249,7 @@
template <typename I>
inline
mln_rvalue(I) at_3d_impl(trait::image::category::domain_morpher,
- const Image<I>& ima, int sli, int row, int col)
+ const Image<I>& ima, def::coord sli, def::coord row, def::coord col)
{
point3d p(sli, row, col);
return exact(ima)(p);
@@ -258,7 +258,7 @@
template <typename I>
inline
mln_rvalue(I) at_3d_impl(trait::image::category::morpher,
- const Image<I>& ima, int sli, int row, int col)
+ const Image<I>& ima, def::coord sli, def::coord row, def::coord col)
{
// FIXME: what about morpher that modify the image value?
// (through a function for instance)
@@ -268,7 +268,7 @@
template <typename I>
inline
mln_rvalue(I) at_3d_impl(trait::image::category::primary,
- const Image<I>& ima, int sli, int row, int col)
+ const Image<I>& ima, def::coord sli, def::coord row, def::coord col)
{
return exact(ima).at(sli, row, col);
}
@@ -277,7 +277,7 @@
template <typename I>
inline
mln_lvalue(I) at_3d_impl(trait::image::category::domain_morpher,
- Image<I>& ima, int sli, int row, int col)
+ Image<I>& ima, def::coord sli, def::coord row, def::coord col)
{
mlc_is(mln_trait_image_pw_io(I),
trait::image::pw_io::read_write)::check();
@@ -289,7 +289,7 @@
template <typename I>
inline
mln_lvalue(I) at_3d_impl(trait::image::category::morpher,
- Image<I>& ima, int sli, int row, int col)
+ Image<I>& ima, def::coord sli, def::coord row, def::coord col)
{
// FIXME: what about morpher that modify the image value?
// (through a function for instance)
@@ -299,7 +299,7 @@
template <typename I>
inline
mln_lvalue(I) at_3d_impl(trait::image::category::primary,
- Image<I>& ima, int sli, int row, int col)
+ Image<I>& ima, def::coord sli, def::coord row, def::coord col)
{
return exact(ima).at(sli, row, col);
}
@@ -308,7 +308,7 @@
template <typename I>
inline
- mln_rvalue(I) at(const Image<I>& ima, int sli, int row, int col)
+ mln_rvalue(I) at(const Image<I>& ima, def::coord sli, def::coord row, def::coord col)
{
mlc_is(mln_trait_image_dimension(I),
trait::image::dimension::three_d)::check();
@@ -318,7 +318,7 @@
}
template <typename I>
- mln_lvalue(I) at(Image<I>& ima, int sli, int row, int col)
+ mln_lvalue(I) at(Image<I>& ima, def::coord sli, def::coord row, def::coord col)
{
mlc_is(mln_trait_image_dimension(I),
trait::image::dimension::three_d)::check();
Index: mln/accu/sum.hh
--- mln/accu/sum.hh (revision 3090)
+++ mln/accu/sum.hh (working copy)
@@ -123,7 +123,7 @@
inline
void sum<T,S>::take(const argument& t)
{
- s_ += t;
+ s_ += static_cast<S>(t);
}
template <typename T, typename S>
Index: mln/accu/line.hh
--- mln/accu/line.hh (revision 3090)
+++ mln/accu/line.hh (working copy)
@@ -125,8 +125,8 @@
O& output = exact(output_);
// Avoid warning in signed/unsigned comparison.
- const def::coord len = len_;
- const def::coord half_length = half_length_;
+ const def::coord len = static_cast<def::coord>(len_);
+ const def::coord half_length = static_cast<def::coord>(half_length_);
// Checks and tests.
internal::line_tests<Meta_Accu, Dir>(input,
@@ -136,7 +136,7 @@
// Initialization.
const def::coord start = p_start[Dir];
- const def::coord last = start + len - 1;
+ const def::coord last = static_cast<def::coord>(start + len - 1);
A a; // Accumulator.
a.init();
P p; // Current point.
@@ -159,7 +159,7 @@
P p_plus = p_start;
def::coord& plus = p_plus[Dir];
- plus += half_length;
+ plus = static_cast<def::coord>(plus + half_length);
while (cur < start + half_length && cur < last)
{
Index: mln/accu/mean.hh
--- mln/accu/mean.hh (revision 3090)
+++ mln/accu/mean.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
@@ -149,14 +150,15 @@
M
mean<T,S,M>::to_result() const
{
- return sum_.to_result() / count_.to_result();
+ S n = static_cast<S>(count_.to_result());
+ return static_cast<M>(sum_.to_result() / n);
}
template <typename T, typename S, typename M>
inline
mean<T,S,M>::operator M() const
{
- return M(sum_.to_result() / count_.to_result());
+ return to_result();
}
template <typename T, typename S, typename M>
Index: mln/value/float01_.hh
--- mln/value/float01_.hh (revision 3090)
+++ mln/value/float01_.hh (working copy)
@@ -113,6 +113,9 @@
/// Conversion to a float.
operator float() const;
+
+ private:
+ typedef mln_enc(int_u<n>) enc_;
};
@@ -166,7 +169,7 @@
{
mln_precondition(val >= 0);
mln_precondition(val <= 1);
- this->v_ = int(val * (mln_card(float01_<n>) - 1)); // FIXME
+ this->v_ = static_cast<enc_>(val * (mln_card(float01_<n>) - 1)); // FIXME
}
template <unsigned n>
@@ -174,7 +177,7 @@
float
float01_<n>::value() const
{
- return float(this->v_) / (mln_card(float01_<n>) - 1); // FIXME
+ return float(this->v_) / float(mln_card(float01_<n>) - 1); // FIXME
}
template <unsigned n>
@@ -182,7 +185,7 @@
void
float01_<n>::set_ind(unsigned long val)
{
- this->v_ = val;
+ this->v_ = static_cast<enc_>(val);
}
template <unsigned n>
@@ -192,7 +195,7 @@
{
mln_precondition(val >= 0);
mln_precondition(val <= 1);
- this->v_ = int(val * (mln_card(float01_<n>) - 1)); // FIXME
+ this->v_ = static_cast<enc_>(val * (mln_card(float01_<n>) - 1)); // FIXME
return *this;
}
@@ -200,7 +203,7 @@
inline
float01_<n>::operator float() const
{
- return float(this->v_) / (mln_card(float01_<n>) - 1);
+ return float(this->v_) / float(mln_card(float01_<n>) - 1);
}
Index: mln/value/int_s.hh
--- mln/value/int_s.hh (revision 3090)
+++ mln/value/int_s.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,10 +29,9 @@
#ifndef MLN_VALUE_INT_S_HH
# define MLN_VALUE_INT_S_HH
-/*! \file mln/value/int_s.hh
- *
- * \brief Define a generic class for signed integers.
- */
+/// \file mln/value/int_s.hh
+///
+/// Define a generic class for signed integers.
# include <mln/value/ops.hh>
@@ -139,6 +139,9 @@
/// Unit value.
static const int_s<n> one;
+
+ private:
+ typedef typename internal::encoding_signed_<n>::ret enc_;
};
@@ -184,7 +187,7 @@
static const int min = - max;
mln_precondition(i >= min);
mln_precondition(i <= max);
- this->v_ = i;
+ this->v_ = static_cast<enc_>(i);
}
template <unsigned n>
@@ -196,7 +199,7 @@
static const int min = - max;
mln_precondition(i >= min);
mln_precondition(i <= max);
- this->v_ = i;
+ this->v_ = static_cast<enc_>(i);
return *this;
}
Index: mln/value/int_u.hh
--- mln/value/int_u.hh (revision 3090)
+++ mln/value/int_u.hh (working copy)
@@ -183,7 +183,7 @@
{
mln_precondition(i >= 0);
mln_precondition(unsigned(i) <= mln_max(enc_));
- this->v_ = enc_(i);
+ this->v_ = static_cast<enc_>(i);
}
template <unsigned n>
@@ -240,7 +240,7 @@
{
mln_precondition(i >= 0);
mln_precondition(unsigned(i) <= mln_max(enc_));
- this->v_ = i;
+ this->v_ = static_cast<enc_>(i);
return *this;
}
Index: mln/value/float01.hh
--- mln/value/float01.hh (revision 3090)
+++ mln/value/float01.hh (working copy)
@@ -1,5 +1,5 @@
-// Copyright (C) 2006, 2007, 2008 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2006, 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
@@ -167,16 +167,16 @@
inline
float01::float01(unsigned nbits, float val)
- : nbits_(nbits),
- val_(unsigned(val * internal::two_pow_n_minus_1(nbits)))
+ : nbits_(nbits)
{
+ val_ = static_cast<unsigned long>(val * float(internal::two_pow_n_minus_1(nbits)));
}
inline
float float01::value() const
{
mln_invariant(nbits_ != 0);
- return double(val_) / internal::two_pow_n_minus_1(nbits_);
+ return float(val_) / float(internal::two_pow_n_minus_1(nbits_));
}
inline
@@ -228,7 +228,7 @@
float01::operator float() const
{
mln_precondition(nbits_ != 0);
- float tmp = float(val_) / internal::two_pow_n_minus_1(nbits_);
+ float tmp = float(val_) / float(internal::two_pow_n_minus_1(nbits_));
return tmp;
}
Index: mln/make/win_chamfer.hh
--- mln/make/win_chamfer.hh (revision 3090)
+++ mln/make/win_chamfer.hh (working copy)
@@ -1,4 +1,5 @@
// Copyright (C) 2006, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,18 +26,20 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-
#ifndef MLN_MAKE_WIN_CHAMFER_HH
-# define MLN_MAKE_WIN_CHAMFER_HH\
+# define MLN_MAKE_WIN_CHAMFER_HH
/// \file mln/make/win_chamfer.hh
///
/// Routine to create chamfer mln::w_window2d_int.
+///
+/// \todo Revamp!
+# include <cmath>
# include <mln/core/alias/w_window2d_int.hh>
# include <mln/core/alias/w_window2d_float.hh>
-# include <math.h>
+
namespace mln
{
@@ -45,46 +48,40 @@
{
template<int d10, int d11>
- const mln::w_window2d_int mk_chamfer_3x3_int();
+ mln::w_window2d_int
+ mk_chamfer_3x3_int();
template<int d10, int d11, int d21>
- const mln::w_window2d_int mk_chamfer_5x5_int();
+ mln::w_window2d_int
+ mk_chamfer_5x5_int();
- const mln::w_window2d_float mk_chamfer_3x3_float(float d10, float d11);
+ mln::w_window2d_float
+ mk_chamfer_3x3_float(float d10, float d11);
- const mln::w_window2d_float
+ mln::w_window2d_float
mk_chamfer_5x5_float(float d10, float d11, float d21);
- const mln::w_window2d_float mk_chamfer_exact();
-
- } // end of namespace mln::make
-
-} // end of namespace mln
+ mln::w_window2d_float
+ mk_chamfer_exact();
# ifndef MLN_INCLUDE_ONLY
-namespace mln
-{
-
- namespace make
- {
-
template<int d10, int d11>
inline
- const mln::w_window2d_int
+ mln::w_window2d_int
mk_chamfer_3x3_int()
{
int ws[] = { d11, d10, d11,
d10, 0, 0,
0, 0, 0 };
- return (make::w_window2d(ws));
+ return make::w_window2d(ws);
}
template<int d10, int d11, int d21>
inline
- const mln::w_window2d_int
+ mln::w_window2d_int
mk_chamfer_5x5_int()
{
int ws[] = { 0, d21, 0, d21, 0,
@@ -93,22 +90,22 @@
0, 0, 0, 0, 0,
0, 0, 0, 0, 0 };
- return (make::w_window2d(ws));
+ return make::w_window2d(ws);
}
inline
- const mln::w_window2d_float
+ mln::w_window2d_float
mk_chamfer_3x3_float(float d10, float d11)
{
float ws[] = { d11, d10, d11,
d10, 0, 0,
0, 0, 0 };
- return (make::w_window2d(ws));
+ return make::w_window2d(ws);
}
inline
- const mln::w_window2d_float
+ mln::w_window2d_float
mk_chamfer_5x5_float(float d10, float d11, float d21)
{
float ws[] = { 0, d21, 0, d21, 0,
@@ -117,25 +114,26 @@
0, 0, 0, 0, 0,
0, 0, 0, 0, 0 };
- return (make::w_window2d(ws));
+ return make::w_window2d(ws);
}
inline
- const mln::w_window2d_float
+ mln::w_window2d_float
mk_chamfer_exact()
{
- float r2 = sqrt(2);
+ float r2 = static_cast<float>(std::sqrt(2));
float ws[] = { r2, 1, r2,
1, 0, 0,
0, 0, 0 };
- return (make::w_window2d(ws));
+ return make::w_window2d(ws);
}
+# endif // ! MLN_INCLUDE_ONLY
+
} // end of namespace mln::make
} // end of namespace mln
-# endif // !MLN_INCLUDE_ONLY
#endif // ! MLN_MAKE_WIN_CHAMFER_HH
Index: mln/make/image.hh
--- mln/make/image.hh (revision 3090)
+++ mln/make/image.hh (working copy)
@@ -85,7 +85,8 @@
{
mlc_bool(L != 0)::check();
mln::image1d<V> tmp(L);
- for (unsigned ind = 0; ind < L; ++ind)
+ const def::coord ninds = static_cast<def::coord>(L);
+ for (def::coord ind = 0; ind < ninds; ++ind)
tmp(point1d(ind)) = values[ind];
return tmp;
}
@@ -96,8 +97,11 @@
{
mlc_bool(R != 0 && C != 0)::check();
mln::image2d<V> tmp(R, C);
- for (unsigned row = 0; row < R; ++row)
- for (unsigned col = 0; col < C; ++col)
+ const def::coord
+ nrows = static_cast<def::coord>(R),
+ ncols = static_cast<def::coord>(C);
+ for (def::coord row = 0; row < nrows; ++row)
+ for (def::coord col = 0; col < ncols; ++col)
opt::at(tmp, row, col) = values[row][col];
return tmp;
}
@@ -108,9 +112,13 @@
{
mlc_bool(S != 0 && R != 0 && C != 0)::check();
mln::image3d<V> tmp(S, R, C);
- for (unsigned sli = 0; sli < S; ++sli)
- for (unsigned row = 0; row < R; ++row)
- for (unsigned col = 0; col < C; ++col)
+ const def::coord
+ nslis = static_cast<def::coord>(S),
+ nrows = static_cast<def::coord>(R),
+ ncols = static_cast<def::coord>(C);
+ for (def::coord sli = 0; sli < nslis; ++sli)
+ for (def::coord row = 0; row < nrows; ++row)
+ for (def::coord col = 0; col < ncols; ++col)
opt::at(tmp, sli, row, col) = values[sli][row][col];
return tmp;
}
Index: mln/make/box2d_h.hh
--- mln/make/box2d_h.hh (revision 3090)
+++ mln/make/box2d_h.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,10 +29,9 @@
#ifndef MLN_MAKE_BOX2D_H_HH
# define MLN_MAKE_BOX2D_H_HH
-/*! \file mln/make/box2d_h.hh
- *
- * \brief Routines to construct an mln::box2d_h.
- */
+/// \file mln/make/box2d_h.hh
+///
+/// Routines to construct an mln::box2d_h.
# include <mln/core/alias/box2d_h.hh>
# include <mln/make/point2d_h.hh>
@@ -68,8 +68,8 @@
*
* \return A 2D_H box.
*/
- mln::box2d_h box2d_h(int min_row, int min_col,
- int max_row, int max_col);
+ mln::box2d_h box2d_h(def::coord min_row, def::coord min_col,
+ def::coord max_row, def::coord max_col);
# ifndef MLN_INCLUDE_ONLY
@@ -79,13 +79,14 @@
{
mln_precondition(nrows != 0 && ncols != 0);
mln::box2d_h tmp(point2d_h(0, 0),
- point2d_h(nrows - 1, ncols - 1));
+ point2d_h(static_cast<def::coord>(nrows - 1),
+ static_cast<def::coord>(ncols - 1)));
return tmp;
}
inline
- mln::box2d_h box2d_h(int min_row, int min_col,
- int max_row, int max_col)
+ mln::box2d_h box2d_h(def::coord min_row, def::coord min_col,
+ def::coord max_row, def::coord max_col)
{
mln_precondition(max_row >= min_row && max_col >= min_col);
mln::box2d_h tmp(point2d_h(min_row, min_col),
Index: mln/make/point2d_h.hh
--- mln/make/point2d_h.hh (revision 3090)
+++ mln/make/point2d_h.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,10 +29,9 @@
#ifndef MLN_MAKE_POINT2D_H_HH
# define MLN_MAKE_POINT2D_H_HH
-/*! \file mln/make/point2d_h.hh
- *
- * \brief Routine to construct an mln::point2d_h.
- */
+/// \file mln/make/point2d_h.hh
+///
+/// Routine to construct an mln::point2d_h.
# include <mln/core/alias/point2d_h.hh>
@@ -49,13 +49,13 @@
*
* \return A 2D point.
*/
- mln::point2d_h point2d_h(int row, int col);
+ mln::point2d_h point2d_h(def::coord row, def::coord col);
# ifndef MLN_INCLUDE_ONLY
inline
- mln::point2d_h point2d_h(int row, int col)
+ mln::point2d_h point2d_h(def::coord row, def::coord col)
{
mln::point2d_h tmp;
tmp[0] = row;
Index: mln/make/dpoint2d_h.hh
--- mln/make/dpoint2d_h.hh (revision 3090)
+++ mln/make/dpoint2d_h.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,10 +29,9 @@
#ifndef MLN_MAKE_DPOINT2D_H_HH
# define MLN_MAKE_DPOINT2D_H_HH
-/*! \file mln/make/dpoint2d_h.hh
- *
- * \brief Routine to construct an mln::dpoint2d_h.
- */
+/// \file mln/make/dpoint2d_h.hh
+///
+/// Routine to construct an mln::dpoint2d_h.
# include <mln/core/alias/dpoint2d_h.hh>
@@ -49,13 +49,13 @@
*
* \return A 2D dpoint.
*/
- mln::dpoint2d_h dpoint2d_h(int row, int col);
+ mln::dpoint2d_h dpoint2d_h(def::coord row, def::coord col);
# ifndef MLN_INCLUDE_ONLY
inline
- mln::dpoint2d_h dpoint2d_h(int row, int col)
+ mln::dpoint2d_h dpoint2d_h(def::coord row, def::coord col)
{
mln::dpoint2d_h tmp;
tmp[0] = row;
Index: mln/make/box1d.hh
--- mln/make/box1d.hh (revision 3090)
+++ mln/make/box1d.hh (working copy)
@@ -1,4 +1,5 @@
// 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
@@ -28,10 +29,9 @@
#ifndef MLN_MAKE_BOX1D_HH
# define MLN_MAKE_BOX1D_HH
-/*! \file mln/make/box1d.hh
- *
- * \brief Routines to construct an mln::box1d.
- */
+/// \file mln/make/box1d.hh
+///
+/// Routines to construct an mln::box1d.
# include <mln/core/alias/box1d.hh>
@@ -74,7 +74,7 @@
{
mln_precondition(ninds != 0);
mln::box1d tmp(point1d(0),
- point1d(ninds - 1));
+ point1d(static_cast<def::coord>(ninds - 1)));
return tmp;
}
Index: mln/make/box2d.hh
--- mln/make/box2d.hh (revision 3090)
+++ mln/make/box2d.hh (working copy)
@@ -1,4 +1,5 @@
// 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
@@ -28,10 +29,9 @@
#ifndef MLN_MAKE_BOX2D_HH
# define MLN_MAKE_BOX2D_HH
-/*! \file mln/make/box2d.hh
- *
- * \brief Routines to construct an mln::box2d.
- */
+/// \file mln/make/box2d.hh
+///
+/// Routines to construct an mln::box2d.
# include <mln/core/alias/box2d.hh>
Index: mln/make/box3d.hh
--- mln/make/box3d.hh (revision 3090)
+++ mln/make/box3d.hh (working copy)
@@ -1,4 +1,5 @@
// 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
@@ -28,10 +29,9 @@
#ifndef MLN_MAKE_BOX3D_HH
# define MLN_MAKE_BOX3D_HH
-/*! \file mln/make/box3d.hh
- *
- * \brief Routines to construct an mln::box3d.
- */
+/// \file mln/make/box3d.hh
+///
+/// Routines to construct an mln::box3d.
# include <mln/core/alias/box3d.hh>
@@ -84,7 +84,9 @@
{
mln_precondition(nrows != 0 && ncols != 0 && nslis != 0);
mln::box3d tmp(point3d(0, 0, 0),
- point3d(nslis - 1, nrows - 1, ncols - 1));
+ point3d(static_cast<def::coord>(nslis - 1),
+ static_cast<def::coord>(nrows - 1),
+ static_cast<def::coord>(ncols - 1)));
return tmp;
}
Index: mln/border/mirror.hh
--- mln/border/mirror.hh (revision 3090)
+++ mln/border/mirror.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,11 +29,12 @@
#ifndef MLN_BORDER_MIRROR_HH
# define MLN_BORDER_MIRROR_HH
-/*! \file mln/border/mirror.hh
- *
- * \brief Define function that fills border using nearer pixels with a
- * mirroring effect.
- */
+/// \file mln/border/mirror.hh
+///
+/// Define function that fills border using nearer pixels with a
+/// mirroring effect.
+///
+/// \todo Awful code: rewrite it!
# include <mln/core/image/image1d.hh>
# include <mln/core/image/image2d.hh>
@@ -47,6 +49,7 @@
# include <mln/geom/max_col.hh>
# include <mln/geom/ninds.hh>
+
namespace mln
{
Index: mln/convert/to_image.hh
--- mln/convert/to_image.hh (revision 3090)
+++ mln/convert/to_image.hh (working copy)
@@ -47,6 +47,7 @@
# include <mln/core/image/image1d.hh>
# include <mln/core/image/image2d.hh>
# include <mln/core/image/image3d.hh>
+# include <mln/convert/from_to.hh>
namespace mln
Index: mln/win/line.hh
--- mln/win/line.hh (revision 3090)
+++ mln/win/line.hh (working copy)
@@ -111,8 +111,10 @@
mln_precondition(length % 2 == 1);
dpoint<M,C> n;
n.set_all(0);
- const int dc = length / 2;
- for (int c = - dc; c <= dc; ++c)
+ const def::coord
+ dc = static_cast<def::coord>(length / 2),
+ minus_dc = static_cast<def::coord>(- dc);
+ for (def::coord c = minus_dc; c <= dc; ++c)
{
n[i] = c;
this->insert(n);
Index: mln/win/diag2d.hh
--- mln/win/diag2d.hh (revision 3090)
+++ mln/win/diag2d.hh (working copy)
@@ -1,4 +1,5 @@
// 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
@@ -28,10 +29,9 @@
#ifndef MLN_WIN_DIAG2D_HH
# define MLN_WIN_DIAG2D_HH
-/*! \file mln/win/diag2d.hh
- *
- * \brief Definition of the mln::win::diag2d window.
- */
+/// \file mln/win/diag2d.hh
+///
+/// Definition of the mln::win::diag2d window.
# include <mln/core/internal/classical_window_base.hh>
# include <mln/core/alias/dpoint2d.hh>
@@ -93,9 +93,12 @@
: length_(length)
{
mln_precondition(length % 2 == 1);
- const int dcol = length / 2;
- for (int col = - dcol; col <= dcol; ++col)
- insert(dpoint2d(-col, col));
+ const def::coord
+ dcol = static_cast<def::coord>(length) / 2,
+ minus_dcol = static_cast<def::coord>(-dcol);
+ for (def::coord col = minus_dcol; col <= dcol; ++col)
+ insert(dpoint2d(static_cast<def::coord>(-col),
+ col));
}
inline
Index: mln/win/backdiag2d.hh
--- mln/win/backdiag2d.hh (revision 3090)
+++ mln/win/backdiag2d.hh (working copy)
@@ -1,4 +1,5 @@
// 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
@@ -28,10 +29,9 @@
#ifndef MLN_WIN_BACKDIAG2D_HH
# define MLN_WIN_BACKDIAG2D_HH
-/*! \file mln/win/backdiag2d.hh
- *
- * \brief Definition of the mln::win::backdiag2d window.
- */
+/// \file mln/win/backdiag2d.hh
+///
+/// Definition of the mln::win::backdiag2d window.
# include <mln/core/internal/classical_window_base.hh>
# include <mln/core/alias/dpoint2d.hh>
@@ -93,8 +93,10 @@
: length_(length)
{
mln_precondition(length % 2 == 1);
- const int dcol = length / 2;
- for (int col = - dcol; col <= dcol; ++col)
+ const def::coord
+ dcol = static_cast<def::coord>(length / 2),
+ minus_dcol = static_cast<def::coord>(- dcol);
+ for (def::coord col = minus_dcol; col <= dcol; ++col)
insert(dpoint2d(col, col));
}
Index: mln/win/octagon2d.hh
--- mln/win/octagon2d.hh (revision 3090)
+++ mln/win/octagon2d.hh (working copy)
@@ -1,4 +1,5 @@
// 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
@@ -28,10 +29,9 @@
#ifndef MLN_WIN_OCTAGON2D_HH
# define MLN_WIN_OCTAGON2D_HH
-/*! \file mln/win/octagon2d.hh
- *
- * \brief Definition of the mln::win::octagon2d window.
- */
+/// \file mln/win/octagon2d.hh
+///
+/// Definition of the mln::win::octagon2d window.
# include <mln/core/internal/classical_window_base.hh>
# include <mln/core/alias/dpoint2d.hh>
@@ -101,29 +101,42 @@
: length_(length)
{
mln_precondition(length % 6 == 1);
- const int y = length / 6;
- const int x = y * 2;
- const int z = y + x;
+ const def::coord
+ y = static_cast<def::coord>(length / 6),
+ x = static_cast<def::coord>(y * 2),
+ z = static_cast<def::coord>(y + x);
insert(dpoint2d(0, 0));
- for (int a = 1; a <= x; ++a)
- for (int b = 0; b <= x; ++b)
+ for (def::coord a = 1; a <= x; ++a)
+ for (def::coord b = 0; b <= x; ++b)
{
+ def::coord
+ _a = static_cast<def::coord>(-a),
+ _b = static_cast<def::coord>(-b);
insert(dpoint2d(a, b));
- insert(dpoint2d(-b, a));
- insert(dpoint2d(b, -a));
- insert(dpoint2d(-a, -b));
- }
- for (int a = x + 1; a <= z; ++a)
- for (int b = -2 * x + a; b <= 2 * x - a; ++b)
- {
+ insert(dpoint2d(_b, a));
+ insert(dpoint2d(b, _a));
+ insert(dpoint2d(_a, _b));
+ }
+ const def::coord a_min = static_cast<def::coord>(x + 1);
+ for (def::coord a = a_min; a <= z; ++a)
+ {
+ const def::coord
+ b_min = static_cast<def::coord>(-2 * x + a),
+ b_max = static_cast<def::coord>(2 * x - a);
+ for (def::coord b = b_min; b <= b_max; ++b)
+ {
+ def::coord
+ _a = static_cast<def::coord>(-a),
+ _b = static_cast<def::coord>(-b);
insert(dpoint2d(a, b));
- insert(dpoint2d(a, -b));
- insert(dpoint2d(-a, b));
- insert(dpoint2d(-a, -b));
+ insert(dpoint2d(a, _b));
+ insert(dpoint2d(_a, b));
+ insert(dpoint2d(_a, _b));
insert(dpoint2d(b, a));
- insert(dpoint2d(b, -a));
- insert(dpoint2d(-b, a));
- insert(dpoint2d(-b, -a));
+ insert(dpoint2d(b, _a));
+ insert(dpoint2d(_b, a));
+ insert(dpoint2d(_b, _a));
+ }
}
}
Index: mln/win/disk2d.hh
--- mln/win/disk2d.hh (revision 3090)
+++ mln/win/disk2d.hh (working copy)
@@ -1,4 +1,5 @@
// 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
@@ -28,10 +29,9 @@
#ifndef MLN_WIN_DISK2D_HH
# define MLN_WIN_DISK2D_HH
-/*! \file mln/win/disk2d.hh
- *
- * \brief Definition of the mln::win::disk2d window.
- */
+/// \file mln/win/disk2d.hh
+///
+/// Definition of the mln::win::disk2d window.
# include <mln/core/internal/classical_window_base.hh>
# include <mln/core/alias/dpoint2d.hh>
@@ -48,7 +48,7 @@
/*! \brief Disk window defined on the 2D square grid.
*
- * An disk2d is centered and symmetric.
+ * A disk2d is centered and symmetric.
*
*/
struct disk2d : public internal::classical_window_base< dpoint2d, disk2d >
@@ -84,10 +84,12 @@
: length_(length)
{
mln_precondition(length % 2 == 1);
- const int r = length / 2;
- const int r2 = r * r;
- for (int a = -r; a <= r; ++a)
- for (int b = -r; b <= r; ++b)
+ const def::coord
+ r = static_cast<def::coord>(length / 2),
+ minus_r = static_cast<def::coord>(-r),
+ r2 = static_cast<def::coord>(r * r);
+ for (def::coord a = minus_r; a <= r; ++a)
+ for (def::coord b = minus_r; b <= r; ++b)
if (a * a + b * b <= r2)
insert(dpoint2d(a, b));
}
Index: mln/algebra/mat.hh
--- mln/algebra/mat.hh (revision 3090)
+++ mln/algebra/mat.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2006 EPITA Research and Development Laboratory
+// Copyright (C) 2006, 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
@@ -28,11 +29,9 @@
#ifndef MLN_ALGEBRA_MAT_HH
# define MLN_ALGEBRA_MAT_HH
-/*!
- * \file mln/algebra/mat.hh
- *
- * \brief Definition of a generic matrix class.
- */
+/// \file mln/algebra/mat.hh
+///
+/// Definition of a generic matrix class.
# include <iostream>
@@ -309,7 +308,7 @@
{
for (unsigned i = 0; i < n; ++i)
for (unsigned j = 0; j < m; ++j)
- data_[i][j] = rhs(i, j);
+ data_[i][j] = static_cast<T>( rhs(i, j) );
}
template <unsigned n, unsigned m, typename T>
@@ -321,7 +320,7 @@
const F& f = exact(f_);
for (unsigned i = 0; i < n; ++i)
for (unsigned j = 0; j < m; ++j)
- data_[i][j] = f(i * n + j);
+ data_[i][j] = static_cast<T>( f(i * n + j) );
}
template <unsigned n, unsigned m, typename T>
@@ -332,7 +331,7 @@
{
for (unsigned i = 0; i < n; ++i)
for (unsigned j = 0; j < m; ++j)
- data_[i][j] = rhs(i, j);
+ data_[i][j] = static_cast<T>( rhs(i, j) );
return *this;
}
Index: mln/algebra/h_vec.hh
--- mln/algebra/h_vec.hh (revision 3090)
+++ mln/algebra/h_vec.hh (working copy)
@@ -1,4 +1,5 @@
// 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
@@ -28,10 +29,9 @@
#ifndef MLN_ALGEBRA_H_VEC_HH
# define MLN_ALGEBRA_H_VEC_HH
-/*! \file mln/algebra/h_vec.hh
- *
- * \brief Definition of a vector with homogeneous coordinates.
- */
+/// \file mln/algebra/h_vec.hh
+///
+/// Definition of a vector with homogeneous coordinates.
# include <mln/algebra/vec.hh>
# include <mln/literal/one.hh>
@@ -150,7 +150,7 @@
vec<d,C> tmp;
for (unsigned i = 0; i < d; ++i)
- tmp[i] = this->data_[i] / w;
+ tmp[i] = static_cast<C>(this->data_[i] / w);
return tmp;
}
Index: mln/algebra/vec.hh
--- mln/algebra/vec.hh (revision 3090)
+++ mln/algebra/vec.hh (working copy)
@@ -383,7 +383,7 @@
: super_()
{
for (unsigned i = 0; i < n; ++i)
- data_[i] = rhs[i];
+ data_[i] = static_cast<T>(rhs[i]);
}
template <unsigned n, typename T>
@@ -392,7 +392,7 @@
vec<n,T>& vec<n,T>::operator=(const vec<n, U>& rhs)
{
for (unsigned i = 0; i < n; ++i)
- data_[i] = rhs[i];
+ data_[i] = static_cast<T>(rhs[i]);
return *this;
}
@@ -436,7 +436,7 @@
n_l2 += data_[i] * data_[i];
n_l2 = sqrt(n_l2);
for (unsigned i = 0; i < n; ++i)
- data_[i] = T(data_[i] / n_l2);
+ data_[i] = static_cast<T>(data_[i] / n_l2);
return *this;
}
@@ -448,7 +448,7 @@
mlc_converts_to(mln_result(F), T)::check();
const F& f = exact(f_);
for (unsigned i = 0; i < n; ++i)
- data_[i] = f(i);
+ data_[i] = static_cast<T>(f(i));
}
@@ -478,7 +478,8 @@
vec<n, mln_trait_op_plus(T,U)>
operator+(const vec<n,T>& lhs, const vec<n,U>& rhs)
{
- vec<n, mln_trait_op_plus(T,U)> tmp;
+ typedef mln_trait_op_plus(T,U) R;
+ vec<n, R> tmp;
for (unsigned i = 0; i < n; ++i)
tmp[i] = lhs[i] + rhs[i];
return tmp;
@@ -489,7 +490,8 @@
vec<n, mln_trait_op_minus(T,U)>
operator-(const vec<n,T>& lhs, const vec<n,U>& rhs)
{
- vec<n, mln_trait_op_minus(T,U)> tmp;
+ typedef mln_trait_op_minus(T,U) R;
+ vec<n, R> tmp;
for (unsigned i = 0; i < n; ++i)
tmp[i] = lhs[i] - rhs[i];
return tmp;
@@ -500,6 +502,7 @@
mln_sum_x(T,U)
operator*(const vec<n,T>& lhs, const vec<n,U>& rhs)
{
+ typedef mln_sum_x(T,U) R;
mln_sum_x(T,U) tmp(literal::zero);
for (unsigned i = 0; i < n; ++i)
tmp += lhs[i] * rhs[i];
@@ -521,7 +524,8 @@
// If we really want to propage the "scalar" status then
// we shall allow for scalar(scalar(..)) !!! => FIXME
- vec<n, mln_trait_op_times(T, S)> tmp;
+ typedef mln_trait_op_times(T, S) R;
+ vec<n, R> tmp;
for (unsigned i = 0; i < n; ++i)
tmp[i] = lhs[i] * s.to_equiv();
return tmp;
@@ -533,7 +537,8 @@
operator/(const vec<n,T>& lhs, const mln::value::scalar_<S>& s)
{
mln_precondition(value::equiv(s) != (S)(literal::zero));
- vec<n, mln_trait_op_div(T, S)> tmp;
+ typedef mln_trait_op_div(T, S) R;
+ vec<n, R> tmp;
for (unsigned i = 0; i < n; ++i)
tmp[i] = lhs[i] / s.to_equiv();
return tmp;
Index: mln/io/pnm/save_header.hh
--- mln/io/pnm/save_header.hh (revision 3090)
+++ mln/io/pnm/save_header.hh (working copy)
@@ -1,5 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 EPITA
-// Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 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
@@ -29,12 +29,9 @@
#ifndef MLN_IO_PNM_SAVE_HEADER_HH
# define MLN_IO_PNM_SAVE_HEADER_HH
-/*!
- * \file mln/io/pnm/save_header.hh
- *
- * \brief Define a function which saves header for PNM image.
- *
- */
+/// \file mln/io/pnm/save_header.hh
+///
+/// Define a function which saves header for PNM image.
# include <iostream>
# include <fstream>
@@ -45,6 +42,7 @@
# include <mln/geom/nrows.hh>
# include <mln/geom/ncols.hh>
+
namespace mln
{
@@ -70,7 +68,7 @@
template <typename I>
inline
- void save_header(const char type,
+ void save_header(char type,
const I& ima, const std::string& filename,
std::ofstream& file)
{
Index: mln/io/pnm/load_header.hh
--- mln/io/pnm/load_header.hh (revision 3090)
+++ mln/io/pnm/load_header.hh (working copy)
@@ -60,7 +60,7 @@
// check magic
if (istr.get() != 'P' )
goto err;
- type = istr.get();
+ type = static_cast<char>(istr.get());
if (type < '1' || type > '6')
goto err;
Index: mln/io/pnm/save.hh
--- mln/io/pnm/save.hh (revision 3090)
+++ mln/io/pnm/save.hh (working copy)
@@ -1,5 +1,5 @@
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 EPITA
-// Research and Development Laboratory
+// 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
@@ -29,13 +29,10 @@
#ifndef MLN_IO_PNM_SAVE_HH
# define MLN_IO_PNM_SAVE_HH
-/*!
- * \file mln/io/pnm/save.hh
- *
- * \brief Define a function which saves an image of kind PNM into
- * given path.
- *
- */
+/// \file mln/io/pnm/save.hh
+///
+/// Define a function which saves an image of kind PNM into
+/// given path.
# include <iostream>
# include <fstream>
@@ -72,7 +69,8 @@
* \param[in,out] filename the destination.
*/
template <typename I>
- void save(const int type, const Image<I>& ima_, const std::string& filename);
+ void save(char type, const Image<I>& ima_, const std::string& filename);
+
# ifndef MLN_INCLUDE_ONLY
@@ -116,7 +114,7 @@
void save_data_uncontiguous(std::ofstream& file,
const I& ima)
{
- const int
+ const def::coord
min_row = geom::min_row(ima),
max_row = geom::max_row(ima),
min_col = geom::min_col(ima),
@@ -136,7 +134,7 @@
const I& ima_)
{
const I& ima = exact(ima_);
- const int
+ const def::coord
min_row = geom::min_row(ima),
max_row = geom::max_row(ima);
point2d p;
@@ -175,7 +173,7 @@
template <typename I>
inline
- void save(const int type, const Image<I>& ima_, const std::string& filename)
+ void save(char type, const Image<I>& ima_, const std::string& filename)
{
trace::entering("mln::io::pnm::save");
const I& ima = exact(ima_);
Index: mln/io/pnm/load.hh
--- mln/io/pnm/load.hh (revision 3090)
+++ mln/io/pnm/load.hh (working copy)
@@ -29,12 +29,10 @@
#ifndef MLN_IO_PNM_LOAD_HH
# define MLN_IO_PNM_LOAD_HH
-/*!
- * \file mln/io/pnm/load.hh
- *
- * \brief Define a function which loads an image of kind PNM 8/16bits with
- * given path.
- */
+/// \file mln/io/pnm/load.hh
+///
+/// Define a function which loads an image of kind PNM 8/16bits with
+/// given path.
# include <iostream>
# include <fstream>
@@ -104,7 +102,7 @@
inline
void load_raw_2d_uncontiguous(std::ifstream& file, image2d<V>& ima)
{
- const int
+ const def::coord
min_row = geom::min_row(ima),
max_row = geom::max_row(ima),
min_col = geom::min_col(ima),
@@ -171,7 +169,7 @@
char type = 0;
int nrows, ncols;
unsigned int maxval;
- read_header(type_ - 3, type_, file, type,
+ read_header(static_cast<char>(type_ - 3), type_, file, type,
nrows, ncols, maxval);
if (max_component(V()) != maxval)
@@ -223,7 +221,7 @@
char type = 0;
int nrows, ncols;
unsigned int maxval;
- read_header(type_ - 3, type_, file, type,
+ read_header(static_cast<char>(type_ - 3), type_, file, type,
nrows, ncols, maxval);
if (max_component(mln_value(I)()) != maxval)
Index: mln/io/pbm/save.hh
--- mln/io/pbm/save.hh (revision 3090)
+++ mln/io/pbm/save.hh (working copy)
@@ -1,5 +1,5 @@
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 EPITA
-// Research and Development Laboratory
+// 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
@@ -29,13 +29,10 @@
#ifndef MLN_IO_PBM_SAVE_HH
# define MLN_IO_PBM_SAVE_HH
-/*!
- * \file mln/io/pbm/save.hh
- *
- * \brief Define a function which saves an image of kind pbm into
- * given path.
- *
- */
+/// \file mln/io/pbm/save.hh
+///
+/// Define a function which saves an image of kind pbm into
+/// given path.
# include <iostream>
# include <fstream>
@@ -86,27 +83,31 @@
io::pnm::save_header(PBM, ima, filename, file);
- int ncols = geom::ncols(ima);
- int col = 0;
- int stride = 0;
+ def::coord
+ ncols = static_cast<def::coord>(geom::ncols(ima)),
+ col = 0,
+ stride = 0;
unsigned char c = 0;
mln_fwd_piter(I) p(ima.domain());
for_all(p)
{
- c <<= 1;
- c += (ima(p) == true ? 0 : 1); // In pbm, '0' means 'white' so 'object', thus 'true'!
+ c = static_cast<unsigned char>(c << 1);
+ if (ima(p) == false)
+ ++c; // In pbm, '0' means 'white' so 'object', thus 'true'!
if (++col >= ncols)
{
- c <<= (8 - stride - 1);
+ c = static_cast<unsigned char>(c << (8 - stride - 1));
file << c;
- c = col = stride = 0;
+ c = 0;
+ col = stride = 0;
}
else
if (++stride >= 8)
{
file << c;
- c = stride = 0;
+ c = 0;
+ stride = 0;
}
}
mln_postcondition(stride == 0);
Index: tests/data/fill.cc
--- tests/data/fill.cc (revision 3090)
+++ tests/data/fill.cc (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,30 +26,25 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/data/fill.cc
- *
- * \brief Tests on mln::data::fill
- */
+/// \file tests/data/fill.cc
+///
+/// Tests on mln::data::fill
#include <mln/core/image/image2d.hh>
#include <mln/data/fill.hh>
+
int main()
{
using namespace mln;
- unsigned u = 300;
- unsigned char uc = u;
- mln_assertion(uc == 44);
-
- {
const unsigned size = 3;
image2d<unsigned> ima(size, size);
+
+ unsigned u = 300;
data::fill(ima, u);
box_fwd_piter_<point2d> p(ima.domain());
for_all (p)
mln_assertion (ima(p) == u);
}
-
-}
Index: tests/border/fill_full.cc
--- tests/border/fill_full.cc (revision 3090)
+++ tests/border/fill_full.cc (working copy)
@@ -258,8 +258,8 @@
{
typedef value::float01_8 T;
- T value = T(0.9999);
- T v = T(0.111);
+ T value = static_cast<T>(0.9999f);
+ T v = static_cast<T>(0.111f);
for (int i = 1; i < limits; ++i)
for (int j = 1; j < limits; ++j)
@@ -273,8 +273,8 @@
{
typedef value::float01_16 T;
- T value = T(0.9999);
- T v = T(0.111);
+ T value = static_cast<T>(0.9999f);
+ T v = static_cast<T>(0.111f);
for (int i = 1; i < limits; ++i)
for (int j = 1; j < limits; ++j)
Index: tests/convert/to_p_array.cc
--- tests/convert/to_p_array.cc (revision 3090)
+++ tests/convert/to_p_array.cc (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
@@ -38,6 +39,7 @@
#include <mln/convert/to_p_array.hh>
+
int main()
{
using namespace mln;
@@ -48,7 +50,7 @@
vec1d v1(convert::to_p_array(win1d, p1));
{
- unsigned col = 4;
+ def::coord col = 4;
for (size_t i=0; i < v1.nsites(); i++)
mln_assertion(v1[i] == point1d(col++));
}
@@ -58,11 +60,11 @@
win::rectangle2d win2d(3, 3);
vec2d v2(convert::to_p_array(win2d, p2));
- unsigned row = 9;
+ def::coord row = 9;
for (unsigned col = 0; col < v2.nsites(); ++col)
{
if (col > 0 && !(col%3))
++row;
- mln_assertion(v2[col] == point2d(row, 9 + (col%3)));
+ mln_assertion(v2[col] == point2d(row, static_cast<def::coord>(9 + (col%3))));
}
}
Index: tests/convert/to_image.cc
--- tests/convert/to_image.cc (revision 3090)
+++ tests/convert/to_image.cc (working copy)
@@ -27,6 +27,7 @@
// Public License.
/// \file tests/convert/to_image.cc
+///
/// Tests on mln::convert::to_image.
#include <mln/core/image/image2d.hh>
Index: tests/win/diag2d.cc
--- tests/win/diag2d.cc (revision 3090)
+++ tests/win/diag2d.cc (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
@@ -25,19 +26,17 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/win/diag2d.cc
- *
- * \brief Tests on mln::win::diag2d.
- */
+/// \file tests/win/diag2d.cc
+///
+/// Tests on mln::win::diag2d.
#include <cmath>
#include <mln/win/diag2d.hh>
-
#include <mln/convert/to_image.hh>
-
#include <mln/debug/println.hh>
+
int main()
{
using namespace mln;
@@ -47,8 +46,8 @@
mln_assertion(diag.delta() == 2);
- for (int x = -5; x <= 5; ++x)
- for (int y = -5; y <= 5; ++y)
+ for (def::coord x = -5; x <= 5; ++x)
+ for (def::coord y = -5; y <= 5; ++y)
{
mln_assertion(((abs(x) <= 2) && (abs(y) <= 2)) ||
!diag.has(dpoint2d(x, y)));
1
0
* mln/core/concept/window.hh: rename from_to as from_to_.
* mln/core/site_set/operators.hh: remove the inclusion of from_to.hh
and directly call from_to_ overloads instead of the facade.
---
milena/ChangeLog | 9 +++++++++
milena/mln/core/concept/window.hh | 2 +-
milena/mln/core/site_set/operators.hh | 11 +++++------
3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 8e4bb36..d822b99 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,12 @@
+2008-12-30 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Fix from_to related errors.
+
+ * mln/core/concept/window.hh: rename from_to as from_to_.
+
+ * mln/core/site_set/operators.hh: remove the inclusion of from_to.hh
+ and directly call from_to_ overloads instead of the facade.
+
2008-12-29 Guillaume Lazzara <z(a)lrde.epita.fr>
Fix issues with GCC 2.95.
diff --git a/milena/mln/core/concept/window.hh b/milena/mln/core/concept/window.hh
index 71b22d6..0b6ba51 100644
--- a/milena/mln/core/concept/window.hh
+++ b/milena/mln/core/concept/window.hh
@@ -317,7 +317,7 @@ namespace mln
template <typename W, typename I>
void
- from_to(const Window<W>& win_, Image<I>& ima_)
+ from_to_(const Window<W>& win_, Image<I>& ima_)
{
mln_is_simple_window(W)::check();
typedef mln_psite(I) P;
diff --git a/milena/mln/core/site_set/operators.hh b/milena/mln/core/site_set/operators.hh
index fd2b7b7..ff788b2 100644
--- a/milena/mln/core/site_set/operators.hh
+++ b/milena/mln/core/site_set/operators.hh
@@ -37,7 +37,6 @@
# include <algorithm>
-# include <mln/convert/from_to.hh>
# include <mln/core/concept/site_set.hh>
@@ -125,8 +124,8 @@ namespace mln
typedef mln_site(Sl) P;
mlc_converts_to(mln_psite(Sr), P)::check();
std::set< P, util::ord<P> > sl, sr, sd;
- convert::from_to(lhs, sl);
- convert::from_to(rhs, sr);
+ convert::over_load::from_to_(lhs, sl);
+ convert::over_load::from_to_(rhs, sr);
std::set_symmetric_difference(sl.begin(), sl.end(),
sr.begin(), sr.end(),
std::inserter(sd, sd.begin()),
@@ -140,7 +139,7 @@ namespace mln
to_std_set(const Site_Set<S>& s)
{
std::set< mln_site(S), util::ord<mln_site(S)> > std_s;
- convert::from_to(s, std_s);
+ convert::over_load::from_to_(s, std_s);
return std_s;
}
@@ -152,8 +151,8 @@ namespace mln
typedef mln_site(Sl) P;
mlc_converts_to(mln_psite(Sr), P)::check();
std::set< P, util::ord<P> > sl, sr;
- convert::from_to(lhs, sl);
- convert::from_to(rhs, sr);
+ convert::over_load::from_to_(lhs, sl);
+ convert::over_load::from_to_(rhs, sr);
return std::includes(sr.begin(), sr.end(),
sl.begin(), sl.end(),
util::ord<P>());
--
1.5.6.5
1
0
* mln/value/internal/limits.hh: add support for std::numeric_limits with gcc 2.95.
* headers.mk: add limits.hh.
* mln/topo/complex.hh,
* mln/topo/face.hh,
* mln/topo/n_face.hh,
* mln/value/builtin/floatings.hh,
* mln/value/builtin/integers.hh: use value::internal::limits.
* mln/util/internal/graph_base.hh,
* mln/util/tree.hh: use <iostream> instead of <ostream>.
* mln/core/dpoint.hh,
* mln/core/point.hh: Help the compiler resolving 'G::dim' in method return type.
* mln/value/float01.hh: use '&&' operator instead of 'and'.
* tests/unit_test/Makefile.am,
* tests/unit_test/mln_value_internal_limits.cc: Add new unit test.
---
milena/ChangeLog | 26 +++
milena/headers.mk | 1 +
milena/mln/core/dpoint.hh | 47 ++---
milena/mln/core/point.hh | 61 +++---
milena/mln/topo/complex.hh | 49 ++---
milena/mln/topo/face.hh | 24 +-
milena/mln/topo/n_face.hh | 20 +-
milena/mln/util/internal/graph_base.hh | 2 +-
milena/mln/util/tree.hh | 2 +-
milena/mln/value/builtin/floatings.hh | 22 +-
milena/mln/value/builtin/integers.hh | 14 +-
milena/mln/value/float01.hh | 4 +-
milena/mln/value/internal/limits.hh | 220 ++++++++++++++++++++
milena/tests/unit_test/Makefile.am | 8 +
.../tests/unit_test/mln_value_internal_limits.cc | 11 +
15 files changed, 386 insertions(+), 125 deletions(-)
create mode 100644 milena/mln/value/internal/limits.hh
create mode 100644 milena/tests/unit_test/mln_value_internal_limits.cc
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 1ae05f4..8e4bb36 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,31 @@
2008-12-29 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Fix issues with GCC 2.95.
+
+ * mln/value/internal/limits.hh: add support for std::numeric_limits with gcc 2.95.
+
+ * headers.mk: add limits.hh.
+
+ * mln/topo/complex.hh,
+ * mln/topo/face.hh,
+ * mln/topo/n_face.hh,
+ * mln/value/builtin/floatings.hh,
+ * mln/value/builtin/integers.hh: use value::internal::limits.
+
+
+ * mln/util/internal/graph_base.hh,
+ * mln/util/tree.hh: use <iostream> instead of <ostream>.
+
+ * mln/core/dpoint.hh,
+ * mln/core/point.hh: Help the compiler resolving 'G::dim' in method return type.
+
+ * mln/value/float01.hh: use '&&' operator instead of 'and'.
+
+ * tests/unit_test/Makefile.am,
+ * tests/unit_test/mln_value_internal_limits.cc: Add new unit test.
+
+2008-12-29 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Update tutorial according to the last renamings.
* apps/statues/mesh-complex-segm.cc,
diff --git a/milena/headers.mk b/milena/headers.mk
index 7111d16..faea509 100644
--- a/milena/headers.mk
+++ b/milena/headers.mk
@@ -287,6 +287,7 @@ mln/value/internal/gray_f.hh \
mln/value/internal/all.hh \
mln/value/internal/value_like.hh \
mln/value/internal/iterable_set.hh \
+mln/value/internal/limits.hh \
mln/value/internal/encoding.hh \
mln/value/internal/convert.hh \
mln/value/internal/gray_.hh \
diff --git a/milena/mln/core/dpoint.hh b/milena/mln/core/dpoint.hh
index f634cc3..4cb55bd 100644
--- a/milena/mln/core/dpoint.hh
+++ b/milena/mln/core/dpoint.hh
@@ -29,10 +29,9 @@
#ifndef MLN_CORE_DPOINT_HH
# define MLN_CORE_DPOINT_HH
-/*! \file mln/core/dpoint.hh
- *
- * \brief Definition of the generic delta-point class mln::dpoint.
- */
+/// \file mln/core/dpoint.hh
+///
+/// Definition of the generic delta-point class mln::dpoint.
# include <mln/core/def/coord.hh>
# include <mln/core/concept/gdpoint.hh>
@@ -44,7 +43,7 @@
namespace mln
{
- /// \{ Fwd decls.
+ /// \{ Forward declarations.
template <typename G, typename C> struct point;
namespace literal {
struct zero_t;
@@ -53,19 +52,17 @@ namespace mln
/// \}
- /*! \brief Generic delta-point class.
- *
- * Parameters are \c G the dimension of the space and \c C the
- * coordinate type in this space.
- */
+ /// Generic delta-point class.
+ ///
+ /// Parameters are \c G the dimension of the space and \c C the
+ /// coordinate type in this space.
template <typename G, typename C>
struct dpoint : public Gdpoint< dpoint<G,C> >,
public internal::mutable_coord_impl_< G::dim, C, dpoint<G,C> >
{
- /*! \var dim
- * \brief Dimension of the space.
- * \invariant dim > 0
- */
+ /// \var dim
+ /// Dimension of the space.
+ /// \invariant dim > 0
enum { dim = G::dim };
/// Grid associated type.
@@ -83,16 +80,14 @@ namespace mln
/// Algebra vector (vec) associated type.
typedef algebra::vec<G::dim, C> vec;
- /*! \brief Read-only access to the \p i-th coordinate value.
- * \param[in] i The coordinate index.
- * \pre \p i < \c dim
- */
+ /// Read-only access to the \p i-th coordinate value.
+ /// \param[in] i The coordinate index.
+ /// \pre \p i < \c dim
C operator[](unsigned i) const;
- /*! \brief Read-write access to the \p i-th coordinate value.
- * \param[in] i The coordinate index.
- * \pre \p i < \c dim
- */
+ /// Read-write access to the \p i-th coordinate value.
+ /// \param[in] i The coordinate index.
+ /// \pre \p i < \c dim
C& operator[](unsigned i);
/// Constructor without argument.
@@ -126,10 +121,10 @@ namespace mln
/// Conversion towards a algebra::vec.
template <typename Q>
- operator mln::algebra::vec<G::dim, Q>() const;
+ operator mln::algebra::vec<dpoint<G,C>::dim, Q>() const;
/// Explicit conversion.
- const mln::algebra::vec<G::dim, C>& to_vec() const;
+ const vec& to_vec() const;
protected:
mln::algebra::vec<G::dim, C> coord_;
@@ -251,14 +246,14 @@ namespace mln
template <typename G, typename C>
template <typename Q>
inline
- dpoint<G,C>::operator mln::algebra::vec<G::dim, Q> () const
+ dpoint<G,C>::operator mln::algebra::vec<dpoint<G,C>::dim, Q> () const
{
return coord_;
}
template <typename G, typename C>
inline
- const mln::algebra::vec<G::dim, C>&
+ const typename dpoint<G,C>::vec&
dpoint<G,C>::to_vec() const
{
return coord_;
diff --git a/milena/mln/core/point.hh b/milena/mln/core/point.hh
index 25b7bc9..4153a49 100644
--- a/milena/mln/core/point.hh
+++ b/milena/mln/core/point.hh
@@ -1,4 +1,5 @@
// 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
@@ -28,10 +29,10 @@
#ifndef MLN_CORE_POINT_HH
# define MLN_CORE_POINT_HH
-/*! \file mln/core/point.hh
- *
- * \brief Definition of the generic point class mln::point.
- */
+/// \file mln/core/point.hh
+///
+/// Definition of the generic point class mln::point.
+
# include <mln/core/def/coord.hh>
# include <mln/core/concept/gpoint.hh>
@@ -49,7 +50,7 @@
namespace mln
{
- /// \{ Fwd decls.
+ /// \{ Forward declarations.
template <typename G, typename C> struct point;
template <typename G, typename C> struct dpoint;
namespace literal {
@@ -76,11 +77,10 @@ namespace mln
- /*! \brief Generic point class.
- *
- * Parameters are \c n the dimension of the space and \c C the
- * coordinate type in this space.
- */
+ /// Generic point class.
+ ///
+ /// Parameters are \c n the dimension of the space and \c C the
+ /// coordinate type in this space.
template <typename G, typename C>
struct point : public Gpoint< point<G,C> >,
public internal::mutable_coord_impl_< G::dim, C, point<G,C> >
@@ -90,10 +90,9 @@ namespace mln
typedef point psite;
- /*! \var dim
- * \brief Dimension of the space.
- * \invariant dim > 0
- */
+ /// \var dim
+ /// Dimension of the space.
+ /// \invariant dim > 0
enum { dim = G::dim };
/// Grid associated type.
@@ -111,16 +110,17 @@ namespace mln
/// Algebra vector (vec) associated type.
typedef algebra::vec<G::dim, C> vec;
- /*! \brief Read-only access to the \p i-th coordinate value.
- * \param[in] i The coordinate index.
- * \pre \p i < \c dim
- */
+ /// Algebra hexagonal vector (hvec) associated type.
+ typedef algebra::h_vec<G::dim, C> h_vec;
+
+ /// Read-only access to the \p i-th coordinate value.
+ /// \param[in] i The coordinate index.
+ /// \pre \p i < \c dim
const C& operator[](unsigned i) const;
- /*! \brief Read-write access to the \p i-th coordinate value.
- * \param[in] i The coordinate index.
- * \pre \p i < \c dim
- */
+ /// Read-write access to the \p i-th coordinate value.
+ /// \param[in] i The coordinate index.
+ /// \pre \p i < \c dim
C& operator[](unsigned i);
@@ -187,10 +187,10 @@ namespace mln
#endif
/// Explicit conversion towards mln::algebra::vec.
- const algebra::vec<G::dim, C>& to_vec() const;
+ const vec& to_vec() const;
/// Transform to point in homogene coordinate system.
- algebra::h_vec<G::dim, C> to_h_vec() const;
+ h_vec to_h_vec() const;
/// Point with all coordinates set to the maximum value.
static const point<G,C>& plus_infty();
@@ -206,7 +206,7 @@ namespace mln
/// FIXME...
template <typename G, typename C>
- const algebra::vec<G::dim - 1, C>& cut_(const point<G,C>& p);
+ const algebra::vec<point<G,C>::dim - 1, C>& cut_(const point<G,C>& p);
template <typename C>
const util::yes& cut_(const point<grid::tick,C>& p);
@@ -405,15 +405,16 @@ namespace mln
template <typename G, typename C>
inline
- const algebra::vec<G::dim, C>&
+ const typename point<G,C>::vec&
point<G,C>::to_vec() const
{
return coord_;
}
-
+
template <typename G, typename C>
inline
- algebra::h_vec<G::dim, C> point<G,C>::to_h_vec() const
+ typename point<G,C>::h_vec
+ point<G,C>::to_h_vec() const
{
algebra::h_vec<G::dim, C> tmp;
for (unsigned i = 0; i < dim; ++i)
@@ -444,10 +445,10 @@ namespace mln
template <typename G, typename C>
inline
- const algebra::vec<G::dim - 1, C>&
+ const algebra::vec<point<G,C>::dim - 1, C>&
cut_(const point<G,C>& p)
{
- return *(const algebra::vec<G::dim - 1, C>*)(& p.to_vec());
+ return *(const algebra::vec<point<G,C>::dim - 1, C>*)(& p.to_vec());
}
template <typename C>
diff --git a/milena/mln/topo/complex.hh b/milena/mln/topo/complex.hh
index 619c3ca..2b392ac 100644
--- a/milena/mln/topo/complex.hh
+++ b/milena/mln/topo/complex.hh
@@ -29,14 +29,13 @@
# define MLN_TOPO_COMPLEX_HH
/// \file mln/topo/complex.hh
-/// \brief Structures for general complexes.
+/// Structures for general complexes.
///
/// A complex defines a topological space which can be used as a
/// support for an image (i.e., as site sets).
# include <cstddef>
-# include <limits>
# include <iosfwd>
# include <mln/metal/bool.hh>
@@ -82,7 +81,7 @@ namespace mln
| Complex. |
`----------*/
- /// \brief General complex of dimension \p D.
+ /// General complex of dimension \p D.
template <unsigned D>
class complex
{
@@ -107,10 +106,10 @@ namespace mln
/// Create a new \p D-complex.
complex();
- /// \brief Add a 0-face to the complex.
+ /// Add a 0-face to the complex.
n_face<0u, D> add_face();
- /// \brief Add a \p (N+1)-face to the complex (with \p N >= 0).
+ /// Add a \p (N+1)-face to the complex (with \p N >= 0).
///
/// \param adjacent_faces The (\p N-1)-faces adjacent to the new
/// \p N-face.
@@ -118,24 +117,24 @@ namespace mln
n_face<N + 1, D> add_face(const n_faces_set<N, D>& adjacent_faces);
/// \}
- /// \brief Static manipulators.
+ /// Static manipulators.
///
/// These methods use statically-known input.
/// \{
- /// \brief Return the total number of faces, whatever their
+ /// Return the total number of faces, whatever their
/// dimension.
unsigned nfaces() const;
- /// \brief Return the number of \p N-faces.
+ /// Return the number of \p N-faces.
template <unsigned N>
unsigned nfaces() const;
/// \}
- /// \brief Dynamic manipulators.
+ /// Dynamic manipulators.
///
/// These methods use input know as run time.
/// \{
- /// \brief Return the number of \a n-faces.
+ /// Return the number of \a n-faces.
///
/// Warning, this function has a complexity linear in term of N,
/// since each n_faces_set is checked (the present implementation
@@ -153,7 +152,7 @@ namespace mln
void print_faces(std::ostream& ostr) const;
/// \}
- /// \brief Get the address of the data of this complex.
+ /// Get the address of the data of this complex.
///
/// This address is a concise and useful information to print
/// and track the actual content of this complex.
@@ -186,7 +185,7 @@ namespace mln
/* FIXME: Replace F and ACCU by a Milena accumulator? */
- /** \brief Apply a kind of static fold left operator to the
+ /** Apply a kind of static fold left operator to the
implicit list of n_faces_set using a functor \a f and a value \a
accu.
@@ -198,13 +197,13 @@ namespace mln
template <typename BinaryFunction, typename T>
T fold_left_(const BinaryFunction& f, const T& accu) const;
- /// \brief Apply a functor \a f to this list of \a n-faces.
+ /// Apply a functor \a f to this list of \a n-faces.
template <typename UnaryFunction>
typename UnaryFunction::result_type
apply_if_dim_matches_(unsigned n, const UnaryFunction& f) const;
/// \}
- /// \brief Connect two algebraic faces.
+ /// Connect two algebraic faces.
///
/// \param f1 An algebraic face of dimension \p N
/// \param f2 A face of dimension \p N + 1
@@ -232,7 +231,7 @@ namespace mln
| Complex data. |
`---------------*/
- /** \brief Complex data.
+ /** Complex data.
Data is aggregated as follows in an mln::topo::complex<D>:
@@ -291,7 +290,7 @@ namespace mln
template <unsigned N, unsigned D>
struct faces_set_mixin;
- /// \brief Complex data.
+ /// Complex data.
template <unsigned D>
struct complex_data : faces_set_mixin<D, D>
{
@@ -319,7 +318,7 @@ namespace mln
// mln::topo::internal::faces_set_mixin. //
// -------------------------------------- //
- /// \brief Recursive mixins of set of faces.
+ /// Recursive mixins of set of faces.
/// \{
template <unsigned N, unsigned D> struct faces_set_mixin;
@@ -339,11 +338,11 @@ namespace mln
/// Functional meta-manipulators.
/// \{
- /// \brief Fold left.
+ /// Fold left.
/// \see mln::complex<D>::fold_left_.
template <typename BinaryFunction, typename T>
T fold_left_(const BinaryFunction& f, const T& accu) const;
- /// \brief Apply a functor \a f to the list of faces if \a n == \p D.
+ /// Apply a functor \a f to the list of faces if \a n == \p D.
/// \see mln::complex<D>::apply_if_dim_matches_.
template <typename UnaryFunction>
typename UnaryFunction::result_type
@@ -370,11 +369,11 @@ namespace mln
/// Functional meta-manipulators.
/// \{
- /// \brief Fold left.
+ /// Fold left.
/// \see mln::complex<D>::fold_left_.
template <typename BinaryFunction, typename T>
T fold_left_(const BinaryFunction& f, const T& accu) const;
- /// \brief Apply a functor \a f to the list of faces if \a n == \p N.
+ /// Apply a functor \a f to the list of faces if \a n == \p N.
/// \see mln::complex<D>::apply_if_dim_matches_.
template <typename UnaryFunction>
typename UnaryFunction::result_type
@@ -397,11 +396,11 @@ namespace mln
/// Functional meta-manipulators.
/// \{
- /// \brief Fold left.
+ /// Fold left.
/// \see mln::complex<D>::fold_left_.
template <typename BinaryFunction, typename T>
T fold_left_(const BinaryFunction& f, const T& accu) const;
- /// \brief Apply a functor \a f to the list of faces if \a n == 0.
+ /// Apply a functor \a f to the list of faces if \a n == 0.
/// \see mln::complex<D>::apply_if_dim_matches_.
template <typename UnaryFunction>
typename UnaryFunction::result_type
@@ -424,11 +423,11 @@ namespace mln
/// Functional meta-manipulators.
/// \{
- /// \brief Fold left.
+ /// Fold left.
/// \see mln::complex<D>::fold_left_.
template <typename BinaryFunction, typename T>
T fold_left_(const BinaryFunction& f, const T& accu) const;
- /// \brief Apply a functor \a f to the list of faces if \a n == 0.
+ /// Apply a functor \a f to the list of faces if \a n == 0.
/// \see mln::complex<D>::apply_if_dim_matches_.
template <typename UnaryFunction>
typename UnaryFunction::result_type
diff --git a/milena/mln/topo/face.hh b/milena/mln/topo/face.hh
index 3d25954..74077f1 100644
--- a/milena/mln/topo/face.hh
+++ b/milena/mln/topo/face.hh
@@ -29,12 +29,12 @@
# define MLN_TOPO_FACE_HH
/// \file mln/topo/face.hh
-/// \brief Face of a complex.
+/// Face of a complex.
# include <iostream>
-# include <limits>
# include <vector>
+# include <mln/value/internal/limits.hh>
# include <mln/core/contract.hh>
# include <mln/metal/bool.hh>
@@ -56,7 +56,7 @@ namespace mln
| Face. |
`-------*/
- /// \brief Face handle in a complex; the face dimension is dynamic.
+ /// Face handle in a complex; the face dimension is dynamic.
///
/// Contrary to an mln::topo::n_face, the dimension of an
/// mln::topo::face is not fixed.
@@ -121,14 +121,14 @@ namespace mln
/// \}
private:
- /// \brief The complex the face belongs to.
+ /// The complex the face belongs to.
///
/// A const face can be used to modify a complex.
mutable complex<D> cplx_;
/// The dimension of the face.
// FIXME: Rename as `dim_'?
unsigned n_;
- /// \brief The id of the face.
+ /// The id of the face.
// FIXME: Rename as `id_'?
unsigned face_id_;
};
@@ -137,21 +137,21 @@ namespace mln
/// Comparison of two instances of mln::topo::face.
/// \{
- /// \brief Is \a lhs equal to \a rhs?
+ /// Is \a lhs equal to \a rhs?
///
/// \pre Arguments \a lhs and \a rhs must belong to the same
/// mln::topo::complex.
template <unsigned D>
bool operator==(const face<D>& lhs, const face<D>& rhs);
- /// \brief Is \a lhs different from \a rhs?
+ /// Is \a lhs different from \a rhs?
///
/// \pre Arguments \a lhs and \a rhs must belong to the same
/// mln::topo::complex.
template <unsigned D>
bool operator!=(const face<D>& lhs, const face<D>& rhs);
- /// \brief Is \a lhs ``less'' than \a rhs?
+ /// Is \a lhs ``less'' than \a rhs?
///
/// This comparison is required by algorithms sorting face handles.
///
@@ -177,8 +177,8 @@ namespace mln
inline
face<D>::face()
: cplx_(),
- n_(std::numeric_limits<unsigned>::max()),
- face_id_(std::numeric_limits<unsigned>::max())
+ n_(value::internal::limits<unsigned>::max()),
+ face_id_(value::internal::limits<unsigned>::max())
{
}
@@ -214,8 +214,8 @@ namespace mln
void
face<D>::invalidate()
{
- set_n(std::numeric_limits<unsigned>::max());
- set_face_id(std::numeric_limits<unsigned>::max());
+ set_n(value::internal::limits<unsigned>::max());
+ set_face_id(value::internal::limits<unsigned>::max());
}
template <unsigned D>
diff --git a/milena/mln/topo/n_face.hh b/milena/mln/topo/n_face.hh
index e7a6475..ee146a8 100644
--- a/milena/mln/topo/n_face.hh
+++ b/milena/mln/topo/n_face.hh
@@ -30,12 +30,12 @@
/// \file mln/topo/n_face.hh
///
-/// \brief n-face of a complex.
+/// n-face of a complex.
# include <iostream>
-# include <limits>
# include <vector>
+# include <mln/value/internal/limits.hh>
# include <mln/core/contract.hh>
# include <mln/metal/bool.hh>
@@ -55,7 +55,7 @@ namespace mln
| n-Face. |
`---------*/
- /// \brief \p N-face handle in a complex.
+ /// \p N-face handle in a complex.
///
/// Contrary to an mln::topo::face, the dimension of an
/// mln::topo::n_face is fixed.
@@ -108,11 +108,11 @@ namespace mln
/// \}
private:
- /// \brief The complex the face belongs to.
+ /// The complex the face belongs to.
///
/// A const mln::topo::n_face can be used to modify a complex.
mutable complex<D> cplx_;
- /// \brief The id of the face.
+ /// The id of the face.
// FIXME: Rename as `id_'?
unsigned face_id_;
};
@@ -121,21 +121,21 @@ namespace mln
/// Comparison of two instances of mln::topo::n_face.
/// \{
- /// \brief Is \a lhs equal to \a rhs?
+ /// Is \a lhs equal to \a rhs?
///
/// \pre Arguments \a lhs and \a rhs must belong to the same
/// mln::topo::complex.
template <unsigned N, unsigned D>
bool operator==(const n_face<N, D>& lhs, const n_face<N, D>& rhs);
- /// \brief Is \a lhs different from \a rhs?
+ /// Is \a lhs different from \a rhs?
///
/// \pre Arguments \a lhs and \a rhs must belong to the same
/// mln::topo::complex.
template <unsigned N, unsigned D>
bool operator!=(const n_face<N, D>& lhs, const n_face<N, D>& rhs);
- /// \brief Is \a lhs ``less'' than \a rhs?
+ /// Is \a lhs ``less'' than \a rhs?
///
/// This comparison is required by algorithms sorting face handles.
///
@@ -159,7 +159,7 @@ namespace mln
template <unsigned N, unsigned D>
inline
n_face<N, D>::n_face()
- : cplx_(), face_id_(std::numeric_limits<unsigned>::max())
+ : cplx_(), face_id_(value::internal::limits<unsigned>::max())
{
// Ensure N is compatible with D.
metal::bool_< N <= D >::check();
@@ -188,7 +188,7 @@ namespace mln
void
n_face<N, D>::invalidate()
{
- set_face_id(std::numeric_limits<unsigned>::max());
+ set_face_id(value::internal::limits<unsigned>::max());
}
template <unsigned N, unsigned D>
diff --git a/milena/mln/util/internal/graph_base.hh b/milena/mln/util/internal/graph_base.hh
index ac6099e..f011324 100644
--- a/milena/mln/util/internal/graph_base.hh
+++ b/milena/mln/util/internal/graph_base.hh
@@ -37,7 +37,7 @@
# include <algorithm>
# include <vector>
# include <set>
-# include <ostream>
+# include <iostream>
# include <mln/core/concept/object.hh>
# include <mln/core/concept/graph.hh>
diff --git a/milena/mln/util/tree.hh b/milena/mln/util/tree.hh
index 0f09dcf..fc0b029 100644
--- a/milena/mln/util/tree.hh
+++ b/milena/mln/util/tree.hh
@@ -30,7 +30,7 @@
# include <vector>
# include <algorithm>
-# include <ostream>
+# include <iostream>
# include <algorithm>
# include <mln/core/contract.hh>
diff --git a/milena/mln/value/builtin/floatings.hh b/milena/mln/value/builtin/floatings.hh
index 9afbde1..3fd0b50 100644
--- a/milena/mln/value/builtin/floatings.hh
+++ b/milena/mln/value/builtin/floatings.hh
@@ -1,4 +1,5 @@
// 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
@@ -28,12 +29,11 @@
#ifndef MLN_VALUE_BUILTIN_FLOATINGS_HH
# define MLN_VALUE_BUILTIN_FLOATINGS_HH
-/*! \file mln/value/builtin/floatings.hh
- *
- * \brief Some definitions about built-in floating types.
- */
+/// \file mln/value/builtin/floatings.hh
+///
+/// Some definitions about built-in floating types.
-# include <limits>
+# include <mln/value/internal/limits.hh>
# include <mln/value/concept/built_in.hh>
# include <mln/value/concept/floating.hh>
@@ -74,17 +74,17 @@ namespace mln
static float min()
{
- static const float min_ = std::numeric_limits<float>::min();
+ static const float min_ = mln::value::internal::limits<float>::min();
return min_;
}
static float max()
{
- static const float max_ = std::numeric_limits<float>::max();
+ static const float max_ = mln::value::internal::limits<float>::max();
return max_;
}
static float epsilon()
{
- static const float epsilon_ = std::numeric_limits<float>::epsilon();
+ static const float epsilon_ = mln::value::internal::limits<float>::epsilon();
return epsilon_;
}
@@ -105,17 +105,17 @@ namespace mln
static double min()
{
- static const double min_ = std::numeric_limits<double>::min();
+ static const double min_ = mln::value::internal::limits<double>::min();
return min_;
}
static double max()
{
- static const double max_ = std::numeric_limits<double>::max();
+ static const double max_ = mln::value::internal::limits<double>::max();
return max_;
}
static double epsilon()
{
- static const double epsilon_ = std::numeric_limits<double>::epsilon();
+ static const double epsilon_ = mln::value::internal::limits<double>::epsilon();
return epsilon_;
}
diff --git a/milena/mln/value/builtin/integers.hh b/milena/mln/value/builtin/integers.hh
index 09dd233..cb4cced 100644
--- a/milena/mln/value/builtin/integers.hh
+++ b/milena/mln/value/builtin/integers.hh
@@ -1,4 +1,5 @@
// 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
@@ -28,12 +29,11 @@
#ifndef MLN_VALUE_BUILTIN_INTEGERS_HH
# define MLN_VALUE_BUILTIN_INTEGERS_HH
-/*! \file mln/value/builtin/integers.hh
- *
- * \brief Some definitions about built-in integer types.
- */
+/// \file mln/value/builtin/integers.hh
+///
+/// Some definitions about built-in integer types.
-# include <limits>
+# include <mln/value/internal/limits.hh>
# include <mln/value/concept/built_in.hh>
# include <mln/value/concept/integer.hh>
@@ -81,8 +81,8 @@ namespace mln
typedef trait::value::kind::data kind;
typedef mln_value_quant_from_(card) quant;
- static const E min() { return std::numeric_limits<E>::min(); }
- static const E max() { return std::numeric_limits<E>::max(); }
+ static const E min() { return mln::value::internal::limits<E>::min(); }
+ static const E max() { return mln::value::internal::limits<E>::max(); }
typedef float sum;
};
diff --git a/milena/mln/value/float01.hh b/milena/mln/value/float01.hh
index f5348b0..577aa10 100644
--- a/milena/mln/value/float01.hh
+++ b/milena/mln/value/float01.hh
@@ -254,7 +254,7 @@ namespace mln
inline
bool operator==(const float01& lhs, const float01& rhs)
{
- mln_precondition(lhs.nbits() != 0 and rhs.nbits() != 0);
+ mln_precondition(lhs.nbits() != 0 && rhs.nbits() != 0);
if (rhs.nbits() == lhs.nbits())
return lhs.value_ind() == rhs.value_ind();
@@ -270,7 +270,7 @@ namespace mln
inline
bool operator<(const float01& lhs, const float01& rhs)
{
- mln_precondition(lhs.nbits() != 0 and rhs.nbits() != 0);
+ mln_precondition(lhs.nbits() != 0 && rhs.nbits() != 0);
if (rhs.nbits() == lhs.nbits())
return lhs.value() < rhs.value();
if (lhs.nbits() > rhs.nbits())
diff --git a/milena/mln/value/internal/limits.hh b/milena/mln/value/internal/limits.hh
new file mode 100644
index 0000000..61f6f75
--- /dev/null
+++ b/milena/mln/value/internal/limits.hh
@@ -0,0 +1,220 @@
+// Copyright (C) 2008 EPITA Research and Development Laboratory
+// (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_VALUE_INTERNAL_LIMITS_HH
+# define MLN_VALUE_INTERNAL_LIMITS_HH
+
+/// \file mln/value/internal/limits.hh
+///
+/// Define built-in type limits.
+
+# if defined(__GNUC__) && __GNUC__ < 3
+# include <cfloat>
+# include <climits>
+# else
+# include <limits>
+# endif
+
+namespace mln
+{
+
+ namespace value
+ {
+
+ namespace internal
+ {
+
+ template<typename T>
+ struct limits
+# if !defined(__GNUC__) || __GNUC__ >= 3
+ : std::numeric_limits<T>
+ { };
+# else
+ {
+ static const bool is_specialized = false;
+ };
+
+ template<>
+ struct limits<bool>
+ {
+ static bool min() throw() { return false; }
+ static bool max() throw() { return false; }
+ static bool epsilon() throw()
+ { return false; }
+ };
+
+ template<>
+ struct limits<char>
+ {
+ static char min() throw() { return CHAR_MIN; }
+ static char max() throw() { return CHAR_MAX; }
+ static char epsilon() throw()
+ { return 0; }
+ };
+
+ template<>
+ struct limits<signed char>
+ {
+ static signed char min() throw() { return SCHAR_MIN; }
+ static signed char max() throw() { return SCHAR_MAX; }
+ static signed char epsilon() throw()
+ { return 0; }
+ };
+
+ template<>
+ struct limits<unsigned char>
+ {
+ static unsigned char min() throw() { return 0; }
+ static unsigned char max() throw() { return UCHAR_MAX; }
+ static unsigned char epsilon() throw()
+ { return 0; }
+ };
+
+ template<>
+ struct limits<short>
+ {
+ static short min() throw() { return SHRT_MIN; }
+ static short max() throw() { return SHRT_MAX; }
+ static short epsilon() throw()
+ { return 0; }
+ };
+
+ template<>
+ struct limits<unsigned short>
+ {
+ static unsigned short min() throw() { return 0; }
+ static unsigned short max() throw() { return USHRT_MAX; }
+ static unsigned short epsilon() throw()
+ { return 0; }
+ };
+
+ template<>
+ struct limits<int>
+ {
+ static int min() throw() { return INT_MIN; }
+ static int max() throw() { return INT_MAX; }
+ static int epsilon() throw()
+ { return 0; }
+ };
+
+ template<>
+ struct limits<unsigned int>
+ {
+ static unsigned int min() throw() { return 0; }
+ static unsigned int max() throw() { return UINT_MAX; }
+ static unsigned int epsilon() throw()
+ { return 0; }
+ };
+
+ template<>
+ struct limits<long>
+ {
+ static long min() throw() { return LONG_MIN; }
+ static long max() throw() { return LONG_MAX; }
+ static long epsilon() throw()
+ { return 0; }
+ };
+
+ template<>
+ struct limits<unsigned long>
+ {
+ static unsigned long min() throw() { return 0; }
+ static unsigned long max() throw() { return ULONG_MAX; }
+ static unsigned long epsilon() throw()
+ { return 0; }
+ };
+
+
+/*
+** Some pre-ANSI-C99 systems like Linux/GCC 2.95 define
+** ULONGLONG_MAX, LONGLONG_MIN, LONGLONG_MAX; we use them if they're defined.
+*/
+
+# if defined(HAVE_LONG_LONG) && !defined(LONGLONG_MIN)
+# define LONGLONG_MIN((long long) 0x8000000000000000LL)
+# define LONGLONG_MAX((long long) 0x7FFFFFFFFFFFFFFFLL)
+# endif
+
+
+# if defined(HAVE_LONG_LONG) && !defined(ULONGLONG_MAX)
+ /* First check for ANSI C99 definition: */
+# ifdef ULLONG_MAX
+# define ULONGLONG_MAX ULLONG_MAX
+# else
+# define ULONGLONG_MAX ((unsigned long long)(~0ULL))
+# endif
+
+# endif /* defined (HAVE_LONG_LONG) && !defined(ULONGLONG_MAX)*/
+
+
+# if defined(HAVE_LONG_LONG)
+ template<>
+ struct limits<long long>
+ {
+ static long long min() throw() { return LONGLONG_MIN; }
+ static long long max() throw() { return LONGLONG_MAX; }
+ static long long epsilon() throw()
+ { return 0; }
+ };
+
+ template<>
+ struct limits<unsigned long long>
+ {
+ static unsigned long long min() throw() { return 0; }
+ static unsigned long long max() throw() { return ULONGLONG_MAX; }
+ static unsigned long long epsilon() throw()
+ { return 0; }
+ };
+# endif
+
+ template<>
+ struct limits<float>
+ {
+ static float min() throw() { return FLT_MIN; }
+ static float max() throw() { return FLT_MAX; }
+ static float epsilon() throw()
+ { return FLT_EPSILON; }
+ };
+
+ template<>
+ struct limits<double>
+ {
+ static float min() throw() { return DBL_MIN; }
+ static float max() throw() { return DBL_MAX; }
+ static float epsilon() throw()
+ { return DBL_EPSILON; }
+ };
+
+# endif
+ } // end of namespace mln::value::internal
+
+ } // end of namespace mln::value
+
+} // end of namespace mln
+
+#endif // ! MLN_VALUE_INTERNAL_LIMITS_HH
diff --git a/milena/tests/unit_test/Makefile.am b/milena/tests/unit_test/Makefile.am
index a3c3035..2f3426e 100644
--- a/milena/tests/unit_test/Makefile.am
+++ b/milena/tests/unit_test/Makefile.am
@@ -187,6 +187,7 @@ mln_fun_vv2v_min \
mln_fun_vv2v_essential \
mln_fun_internal_array_base \
mln_fun_internal_x2x_linear_impl \
+mln_fun_internal_ch_function_value_impl \
mln_fun_internal_selector \
mln_fun_v2w_w2v_norm \
mln_fun_p2v_ternary \
@@ -209,6 +210,7 @@ mln_fun_v2v_dec \
mln_fun_v2v_abs \
mln_fun_v2v_rgb_to_hsl \
mln_fun_v2v_cast \
+mln_fun_v2v_ch_function_value \
mln_fun_v2v_rgb_to_hsi \
mln_fun_v2v_enc \
mln_fun_v2v_convert \
@@ -283,6 +285,7 @@ mln_value_internal_gray_f \
mln_value_internal_all \
mln_value_internal_value_like \
mln_value_internal_iterable_set \
+mln_value_internal_limits \
mln_value_internal_encoding \
mln_value_internal_convert \
mln_value_internal_gray_ \
@@ -434,6 +437,7 @@ mln_trait_value_essential \
mln_trait_images \
mln_trait_window_props \
mln_trait_window_print \
+mln_trait_ch_function_value \
mln_trait_ch_value \
mln_trait_solve \
mln_trait_solve_unary \
@@ -1190,6 +1194,7 @@ mln_fun_vv2v_min_SOURCES = mln_fun_vv2v_min.cc
mln_fun_vv2v_essential_SOURCES = mln_fun_vv2v_essential.cc
mln_fun_internal_array_base_SOURCES = mln_fun_internal_array_base.cc
mln_fun_internal_x2x_linear_impl_SOURCES = mln_fun_internal_x2x_linear_impl.cc
+mln_fun_internal_ch_function_value_impl_SOURCES = mln_fun_internal_ch_function_value_impl.cc
mln_fun_internal_selector_SOURCES = mln_fun_internal_selector.cc
mln_fun_v2w_w2v_norm_SOURCES = mln_fun_v2w_w2v_norm.cc
mln_fun_p2v_ternary_SOURCES = mln_fun_p2v_ternary.cc
@@ -1212,6 +1217,7 @@ mln_fun_v2v_dec_SOURCES = mln_fun_v2v_dec.cc
mln_fun_v2v_abs_SOURCES = mln_fun_v2v_abs.cc
mln_fun_v2v_rgb_to_hsl_SOURCES = mln_fun_v2v_rgb_to_hsl.cc
mln_fun_v2v_cast_SOURCES = mln_fun_v2v_cast.cc
+mln_fun_v2v_ch_function_value_SOURCES = mln_fun_v2v_ch_function_value.cc
mln_fun_v2v_rgb_to_hsi_SOURCES = mln_fun_v2v_rgb_to_hsi.cc
mln_fun_v2v_enc_SOURCES = mln_fun_v2v_enc.cc
mln_fun_v2v_convert_SOURCES = mln_fun_v2v_convert.cc
@@ -1286,6 +1292,7 @@ mln_value_internal_gray_f_SOURCES = mln_value_internal_gray_f.cc
mln_value_internal_all_SOURCES = mln_value_internal_all.cc
mln_value_internal_value_like_SOURCES = mln_value_internal_value_like.cc
mln_value_internal_iterable_set_SOURCES = mln_value_internal_iterable_set.cc
+mln_value_internal_limits_SOURCES = mln_value_internal_limits.cc
mln_value_internal_encoding_SOURCES = mln_value_internal_encoding.cc
mln_value_internal_convert_SOURCES = mln_value_internal_convert.cc
mln_value_internal_gray__SOURCES = mln_value_internal_gray_.cc
@@ -1437,6 +1444,7 @@ mln_trait_value_essential_SOURCES = mln_trait_value_essential.cc
mln_trait_images_SOURCES = mln_trait_images.cc
mln_trait_window_props_SOURCES = mln_trait_window_props.cc
mln_trait_window_print_SOURCES = mln_trait_window_print.cc
+mln_trait_ch_function_value_SOURCES = mln_trait_ch_function_value.cc
mln_trait_ch_value_SOURCES = mln_trait_ch_value.cc
mln_trait_solve_SOURCES = mln_trait_solve.cc
mln_trait_solve_unary_SOURCES = mln_trait_solve_unary.cc
diff --git a/milena/tests/unit_test/mln_value_internal_limits.cc b/milena/tests/unit_test/mln_value_internal_limits.cc
new file mode 100644
index 0000000..5dd172a
--- /dev/null
+++ b/milena/tests/unit_test/mln_value_internal_limits.cc
@@ -0,0 +1,11 @@
+// Unit test for mln/value/internal/limits.hh.
+// Generated by ./build_unit_test.sh, do not modify.
+
+// Include the file twice, so we detect missing inclusion guards.
+#include <mln/value/internal/limits.hh>
+#include <mln/value/internal/limits.hh>
+
+int main()
+{
+ // Nothing.
+}
--
1.5.6.5
1
0
URL: https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008
ChangeLog:
2008-11-10 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
Put Licence to 70 cols.
* milena/doc/benchmark/morpho/erosion.cc: .
* milena/mln/accu/count_adjacent_vertices.hh: .
* milena/mln/accu/height.hh: .
* milena/mln/border/fill.hh: .
* milena/mln/border/get.hh: .
* milena/mln/canvas/morpho/algebraic_union_find.hh: .
* milena/mln/convert/to_p_array.hh: .
* milena/mln/convert/to_upper_window.hh: .
* milena/mln/convert/to_window.hh: .
* milena/mln/core/alias/dpoint1d.hh: .
* milena/mln/core/alias/dpoint2d.hh: .
* milena/mln/core/alias/dpoint2d_h.hh: .
* milena/mln/core/alias/dpoint3d.hh: .
* milena/mln/core/alias/point1d.hh: .
* milena/mln/core/alias/point2d.hh: .
* milena/mln/core/alias/point2d_h.hh: .
* milena/mln/core/alias/point3d.hh: .
* milena/mln/core/alias/point3df.hh: .
* milena/mln/core/alias/window1d.hh: .
* milena/mln/core/alias/window3d.hh: .
* milena/mln/core/dpoints_pixter.hh: .
* milena/mln/core/image/bgraph_image.hh: .
* milena/mln/core/image/bgraph_psite.hh: .
* milena/mln/core/image/decorated_image.hh: .
* milena/mln/core/image/fi_adaptor.hh: .
* milena/mln/core/image/graph_elt_neighborhood.hh: .
* milena/mln/core/image/graph_elt_window.hh: .
* milena/mln/core/image/graph_image.hh: .
* milena/mln/core/image/graph_neighborhood_piter.hh: .
* milena/mln/core/image/graph_window_piter.hh: .
* milena/mln/core/image/line_graph_elt_neighborhood.hh: .
* milena/mln/core/image/line_graph_elt_window.hh: .
* milena/mln/core/image/line_graph_image.hh: .
* milena/mln/core/image/line_graph_neighborhood_piter.hh: .
* milena/mln/core/image/line_graph_psite.hh: .
* milena/mln/core/image/line_graph_window_piter.hh: .
* milena/mln/core/internal/force_exact.hh: .
* milena/mln/core/internal/image_value_morpher.hh: .
* milena/mln/core/internal/line_graph_vicinity_piter.hh: .
* milena/mln/core/internal/pixel_iterator_base.hh: .
* milena/mln/core/pixter1d.hh: .
* milena/mln/core/pixter2d.hh: .
* milena/mln/core/pixter3d.hh: .
* milena/mln/core/site_set/p_bgraph.hh: .
* milena/mln/core/site_set/p_bgraph_piter.hh: .
* milena/mln/core/site_set/p_edges.hh: .
* milena/mln/core/site_set/p_graph.hh: .
* milena/mln/core/site_set/p_graph_piter.hh: .
* milena/mln/core/site_set/p_line_graph.hh: .
* milena/mln/core/site_set/p_line_graph_piter.hh: .
* milena/mln/core/site_set/p_vertices.hh: .
* milena/mln/core/trait/qlf_value.hh: .
* milena/mln/debug/graph.hh: .
* milena/mln/geom/seeds2tiling.hh: .
* milena/mln/geom/seeds2tiling_roundness.hh: .
* milena/mln/labeling/background.hh: .
* milena/mln/labeling/flat_zones.hh: .
* milena/mln/labeling/foreground.hh: .
* milena/mln/labeling/regional_maxima.hh: .
* milena/mln/labeling/regional_minima.hh: .
* milena/mln/level/memset_.hh: .
* milena/mln/linear/gaussian.hh: .
* milena/mln/make/voronoi.hh: .
* milena/mln/math/abs.hh: .
* milena/mln/metal/abort.hh: .
* milena/mln/morpho/closing_area.hh: .
* milena/mln/morpho/closing_area_on_vertices.hh: .
* milena/mln/morpho/closing_attribute.hh: .
* milena/mln/morpho/closing_height.hh: .
* milena/mln/morpho/closing_volume.hh: .
* milena/mln/morpho/opening_area.hh: .
* milena/mln/morpho/opening_area_on_vertices.hh: .
* milena/mln/morpho/opening_attribute.hh: .
* milena/mln/morpho/opening_height.hh: .
* milena/mln/morpho/opening_volume.hh: .
* milena/mln/set/inter.hh: .
* milena/mln/tag/skeleton.hh: .
* milena/mln/trait/ch_value.hh: .
* milena/mln/util/graph.hh: .
* milena/mln/util/greater_point.hh: .
* milena/mln/util/greater_psite.hh: .
* milena/mln/util/internal/boost_graph.hh: .
* milena/mln/util/internal/boost_graph_access.hh: .
* milena/mln/util/internal/boost_graph_property.hh: .
* milena/mln/util/internal/boost_graph_structure.hh: .
* milena/mln/util/internal/graph_base.hh: .
* milena/mln/util/ord_pair.hh: .
* milena/mln/value/int_u_sat.hh: .
* milena/mln/value/proxy.hh: .
* milena/mln/value/stack.hh: .
* milena/mln/win/line.hh: .
* milena/sandbox/garrigues/ocr/check.sh: .
* milena/sandbox/garrigues/ocr/ocr_with_preprocess.cc: .
* milena/sandbox/garrigues/ocr/skeleton.hh: .
* milena/sandbox/jardonnet/array/old/1d.hh: .
* milena/sandbox/jardonnet/array/old/2d.hh: .
* milena/sandbox/jardonnet/array/old/3d.hh: .
* milena/sandbox/jardonnet/array/old/all.hh: .
* milena/sandbox/jardonnet/array/old/nd.hh: .
* milena/sandbox/jardonnet/array/old/objs.hh: .
* milena/sandbox/levillain/morpho/lower_completion.hh: .
* milena/sandbox/levillain/morpho/shortest_path_watershed.hh: .
* milena/sandbox/nivault/dmap.hh: .
* milena/sandbox/pellegrin/set/core/p_bgraph.hh: .
* milena/sandbox/pellegrin/set/core/p_graph.hh: .
* milena/sandbox/pellegrin/set/core/p_line_graph.hh: .
* milena/sandbox/vigouroux/color.hh: .
* milena/sandbox/vigouroux/color/color.hh: .
* milena/sandbox/vigouroux/color/hsi.hh: .
* milena/sandbox/vigouroux/color/hsl.hh: .
* milena/sandbox/vigouroux/color/hsv.hh: .
* milena/sandbox/vigouroux/color/nrgb.hh: .
* milena/sandbox/vigouroux/color/rgb.hh: .
* milena/sandbox/vigouroux/color/xyz.hh: .
* milena/sandbox/vigouroux/color/yiq.hh: .
* milena/sandbox/vigouroux/color/yuv.hh: .
* milena/sandbox/vigouroux/convert/abstract/colorconv.hh: .
* milena/sandbox/vigouroux/convert/abstract/conversion.hh: .
* milena/sandbox/vigouroux/convert/basics.hh: .
* milena/sandbox/vigouroux/convert/bound.hh: .
* milena/sandbox/vigouroux/convert/cast.hh: .
* milena/sandbox/vigouroux/convert/conversion.hh: .
* milena/sandbox/vigouroux/convert/conversion_ng_se.hh: .
* milena/sandbox/vigouroux/convert/force.hh: .
* milena/sandbox/vigouroux/convert/nrgbxyz.hh: .
* milena/sandbox/vigouroux/convert/rgbhsi.hh: .
* milena/sandbox/vigouroux/convert/rgbhsl.hh: .
* milena/sandbox/vigouroux/convert/rgbhsv.hh: .
* milena/sandbox/vigouroux/convert/rgbnrgb.hh: .
* milena/sandbox/vigouroux/convert/rgbxyz.hh: .
* milena/sandbox/vigouroux/convert/rgbyiq.hh: .
* milena/sandbox/vigouroux/convert/rgbyuv.hh: .
* milena/sandbox/vigouroux/convert/stretch.hh: .
* milena/tests/timer.hh: .
---
doc/benchmark/morpho/erosion.cc | 10 ++-
mln/accu/count_adjacent_vertices.hh | 3 -
mln/accu/height.hh | 3 -
mln/border/fill.hh | 3 -
mln/border/get.hh | 3 -
mln/canvas/morpho/algebraic_union_find.hh | 3 -
mln/convert/to_p_array.hh | 3 -
mln/convert/to_upper_window.hh | 3 -
mln/convert/to_window.hh | 3 -
mln/core/alias/dpoint1d.hh | 3 -
mln/core/alias/dpoint2d.hh | 3 -
mln/core/alias/dpoint2d_h.hh | 3 -
mln/core/alias/dpoint3d.hh | 3 -
mln/core/alias/point1d.hh | 3 -
mln/core/alias/point2d.hh | 3 -
mln/core/alias/point2d_h.hh | 3 -
mln/core/alias/point3d.hh | 3 -
mln/core/alias/point3df.hh | 3 -
mln/core/alias/window1d.hh | 3 -
mln/core/alias/window3d.hh | 3 -
mln/core/dpoints_pixter.hh | 3 -
mln/core/image/bgraph_image.hh | 3 -
mln/core/image/bgraph_psite.hh | 3 -
mln/core/image/decorated_image.hh | 3 -
mln/core/image/fi_adaptor.hh | 3 -
mln/core/image/graph_elt_neighborhood.hh | 3 -
mln/core/image/graph_elt_window.hh | 3 -
mln/core/image/graph_image.hh | 3 -
mln/core/image/graph_neighborhood_piter.hh | 3 -
mln/core/image/graph_window_piter.hh | 3 -
mln/core/image/line_graph_elt_neighborhood.hh | 3 -
mln/core/image/line_graph_elt_window.hh | 3 -
mln/core/image/line_graph_image.hh | 3 -
mln/core/image/line_graph_neighborhood_piter.hh | 3 -
mln/core/image/line_graph_psite.hh | 3 -
mln/core/image/line_graph_window_piter.hh | 3 -
mln/core/internal/force_exact.hh | 3 -
mln/core/internal/image_value_morpher.hh | 3 -
mln/core/internal/line_graph_vicinity_piter.hh | 3 -
mln/core/internal/pixel_iterator_base.hh | 3 -
mln/core/pixter1d.hh | 3 -
mln/core/pixter2d.hh | 3 -
mln/core/pixter3d.hh | 3 -
mln/core/site_set/p_bgraph.hh | 3 -
mln/core/site_set/p_bgraph_piter.hh | 3 -
mln/core/site_set/p_graph.hh | 3 -
mln/core/site_set/p_graph_piter.hh | 3 -
mln/core/site_set/p_line_graph.hh | 3 -
mln/core/site_set/p_line_graph_piter.hh | 3 -
mln/core/trait/qlf_value.hh | 3 -
mln/debug/graph.hh | 3 -
mln/geom/seeds2tiling.hh | 3 -
mln/geom/seeds2tiling_roundness.hh | 3 -
mln/labeling/background.hh | 3 -
mln/labeling/flat_zones.hh | 3 -
mln/labeling/foreground.hh | 3 -
mln/labeling/regional_maxima.hh | 3 -
mln/labeling/regional_minima.hh | 3 -
mln/level/memset_.hh | 3 -
mln/linear/gaussian.hh | 2
mln/make/voronoi.hh | 3 -
mln/math/abs.hh | 3 -
mln/metal/abort.hh | 3 -
mln/morpho/closing_area.hh | 3 -
mln/morpho/closing_area_on_vertices.hh | 3 -
mln/morpho/closing_attribute.hh | 3 -
mln/morpho/closing_height.hh | 3 -
mln/morpho/closing_volume.hh | 3 -
mln/morpho/opening_area.hh | 3 -
mln/morpho/opening_area_on_vertices.hh | 3 -
mln/morpho/opening_attribute.hh | 3 -
mln/morpho/opening_height.hh | 3 -
mln/morpho/opening_volume.hh | 3 -
mln/set/inter.hh | 3 -
mln/tag/skeleton.hh | 3 -
mln/trait/ch_value.hh | 3 -
mln/util/graph.hh | 3 -
mln/util/greater_point.hh | 3 -
mln/util/greater_psite.hh | 3 -
mln/util/internal/boost_graph.hh | 3 -
mln/util/internal/boost_graph_access.hh | 3 -
mln/util/internal/boost_graph_property.hh | 3 -
mln/util/internal/boost_graph_structure.hh | 3 -
mln/util/internal/graph_base.hh | 3 -
mln/util/ord_pair.hh | 3 -
mln/value/int_u_sat.hh | 3 -
mln/value/proxy.hh | 3 -
mln/value/stack.hh | 3 -
sandbox/garrigues/ocr/check.sh | 11 ++-
sandbox/garrigues/ocr/ocr_with_preprocess.cc | 49 +++++++++-------
sandbox/garrigues/ocr/skeleton.hh | 58 ++++++++++++--------
sandbox/jardonnet/array/old/1d.hh | 3 -
sandbox/jardonnet/array/old/2d.hh | 3 -
sandbox/jardonnet/array/old/3d.hh | 3 -
sandbox/jardonnet/array/old/all.hh | 3 -
sandbox/jardonnet/array/old/objs.hh | 3 -
sandbox/levillain/morpho/lower_completion.hh | 3 -
sandbox/levillain/morpho/shortest_path_watershed.hh | 3 -
sandbox/nivault/dmap.hh | 3 -
sandbox/pellegrin/set/core/p_bgraph.hh | 3 -
sandbox/pellegrin/set/core/p_graph.hh | 3 -
sandbox/pellegrin/set/core/p_line_graph.hh | 3 -
sandbox/vigouroux/color.hh | 3 -
sandbox/vigouroux/color/color.hh | 3 -
sandbox/vigouroux/color/hsi.hh | 3 -
sandbox/vigouroux/color/hsl.hh | 3 -
sandbox/vigouroux/color/hsv.hh | 3 -
sandbox/vigouroux/color/nrgb.hh | 3 -
sandbox/vigouroux/color/rgb.hh | 3 -
sandbox/vigouroux/color/xyz.hh | 3 -
sandbox/vigouroux/color/yiq.hh | 3 -
sandbox/vigouroux/color/yuv.hh | 3 -
sandbox/vigouroux/convert/abstract/colorconv.hh | 3 -
sandbox/vigouroux/convert/abstract/conversion.hh | 3 -
sandbox/vigouroux/convert/basics.hh | 3 -
sandbox/vigouroux/convert/bound.hh | 3 -
sandbox/vigouroux/convert/cast.hh | 3 -
sandbox/vigouroux/convert/conversion.hh | 3 -
sandbox/vigouroux/convert/force.hh | 3 -
sandbox/vigouroux/convert/nrgbxyz.hh | 3 -
sandbox/vigouroux/convert/rgbhsi.hh | 3 -
sandbox/vigouroux/convert/rgbhsl.hh | 3 -
sandbox/vigouroux/convert/rgbhsv.hh | 3 -
sandbox/vigouroux/convert/rgbnrgb.hh | 3 -
sandbox/vigouroux/convert/rgbxyz.hh | 3 -
sandbox/vigouroux/convert/rgbyiq.hh | 3 -
sandbox/vigouroux/convert/rgbyuv.hh | 3 -
sandbox/vigouroux/convert/stretch.hh | 3 -
tests/timer.hh | 3 -
129 files changed, 326 insertions(+), 176 deletions(-)
Index: branches/cleanup-2008/milena/tests/timer.hh
===================================================================
--- branches/cleanup-2008/milena/tests/timer.hh (revision 2837)
+++ branches/cleanup-2008/milena/tests/timer.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/doc/benchmark/morpho/erosion.cc
===================================================================
--- branches/cleanup-2008/milena/doc/benchmark/morpho/erosion.cc (revision 2837)
+++ branches/cleanup-2008/milena/doc/benchmark/morpho/erosion.cc (revision 2838)
@@ -41,6 +41,7 @@
#include <mln/value/int_u8.hh>
#include <mln/morpho/erosion.hh>
+#include <mln/arith/diff_abs.hh>
#include "tests/data.hh"
#include "tests/timer.hh"
@@ -84,7 +85,7 @@
// trace::quiet = false;
timer t;
-
+ /*
// Rectangle
std::cout << "-------------------------- Rectangle: " << std::endl;
@@ -271,9 +272,9 @@
mln_assertion(test);
std::cout << " " << (test ? "OK" : "KO!!!") << std::endl;
}
-
+ */
std::cout << "-------------------------- Octagon: " << std::endl;
-
+ border::thickness = 0;
// Octagon
{
t.start();
@@ -286,6 +287,9 @@
t.start();
out = morpho::erosion(lena, oct);
std::cout << "dispach on octagon: " << t << std::endl;
+ io::pgm::save(out, "out_oct.pgm");
+ io::pgm::save(arith::diff_abs(out, ref), "diff.pgm");
+
bool test = out == ref;
mln_assertion(test);
std::cout << " " << (test ? "OK" : "KO!!!") << std::endl;
Index: branches/cleanup-2008/milena/mln/trait/ch_value.hh
===================================================================
--- branches/cleanup-2008/milena/mln/trait/ch_value.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/trait/ch_value.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/debug/graph.hh
===================================================================
--- branches/cleanup-2008/milena/mln/debug/graph.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/debug/graph.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/site_set/p_line_graph.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/site_set/p_line_graph.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/site_set/p_line_graph.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/site_set/p_line_graph_piter.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/site_set/p_line_graph_piter.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/site_set/p_line_graph_piter.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/site_set/p_graph.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/site_set/p_graph.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/site_set/p_graph.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/site_set/p_bgraph.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/site_set/p_bgraph.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/site_set/p_bgraph.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/site_set/p_graph_piter.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/site_set/p_graph_piter.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/site_set/p_graph_piter.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/site_set/p_bgraph_piter.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/site_set/p_bgraph_piter.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/site_set/p_bgraph_piter.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/site_set/p_vertices.hh
===================================================================
Index: branches/cleanup-2008/milena/mln/core/site_set/p_edges.hh
===================================================================
Index: branches/cleanup-2008/milena/mln/core/image/decorated_image.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/image/decorated_image.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/image/decorated_image.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/image/line_graph_neighborhood_piter.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/image/line_graph_neighborhood_piter.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/image/line_graph_neighborhood_piter.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/image/line_graph_window_piter.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/image/line_graph_window_piter.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/image/line_graph_window_piter.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/image/graph_image.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/image/graph_image.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/image/graph_image.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/image/line_graph_elt_neighborhood.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/image/line_graph_elt_neighborhood.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/image/line_graph_elt_neighborhood.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/image/line_graph_elt_window.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/image/line_graph_elt_window.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/image/line_graph_elt_window.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/image/line_graph_image.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/image/line_graph_image.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/image/line_graph_image.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/image/line_graph_psite.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/image/line_graph_psite.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/image/line_graph_psite.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/image/graph_window_piter.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/image/graph_window_piter.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/image/graph_window_piter.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/image/graph_neighborhood_piter.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/image/graph_neighborhood_piter.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/image/graph_neighborhood_piter.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/image/graph_elt_window.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/image/graph_elt_window.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/image/graph_elt_window.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/image/graph_elt_neighborhood.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/image/graph_elt_neighborhood.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/image/graph_elt_neighborhood.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/image/bgraph_image.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/image/bgraph_image.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/image/bgraph_image.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/image/bgraph_psite.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/image/bgraph_psite.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/image/bgraph_psite.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/image/fi_adaptor.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/image/fi_adaptor.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/image/fi_adaptor.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/trait/qlf_value.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/trait/qlf_value.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/trait/qlf_value.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/pixter1d.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/pixter1d.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/pixter1d.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/pixter2d.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/pixter2d.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/pixter2d.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/pixter3d.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/pixter3d.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/pixter3d.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/dpoints_pixter.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/dpoints_pixter.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/dpoints_pixter.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/internal/pixel_iterator_base.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/internal/pixel_iterator_base.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/internal/pixel_iterator_base.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/internal/force_exact.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/internal/force_exact.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/internal/force_exact.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/internal/line_graph_vicinity_piter.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/internal/line_graph_vicinity_piter.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/internal/line_graph_vicinity_piter.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/internal/image_value_morpher.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/internal/image_value_morpher.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/internal/image_value_morpher.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/alias/dpoint1d.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/alias/dpoint1d.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/alias/dpoint1d.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/alias/dpoint2d.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/alias/dpoint2d.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/alias/dpoint2d.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/alias/dpoint3d.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/alias/dpoint3d.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/alias/dpoint3d.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/alias/point2d_h.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/alias/point2d_h.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/alias/point2d_h.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/alias/point3df.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/alias/point3df.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/alias/point3df.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/alias/dpoint2d_h.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/alias/dpoint2d_h.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/alias/dpoint2d_h.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/alias/window1d.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/alias/window1d.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/alias/window1d.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/alias/window3d.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/alias/window3d.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/alias/window3d.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/alias/point1d.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/alias/point1d.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/alias/point1d.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/alias/point2d.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/alias/point2d.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/alias/point2d.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/core/alias/point3d.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/alias/point3d.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/core/alias/point3d.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/math/abs.hh
===================================================================
--- branches/cleanup-2008/milena/mln/math/abs.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/math/abs.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/metal/abort.hh
===================================================================
--- branches/cleanup-2008/milena/mln/metal/abort.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/metal/abort.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/level/memset_.hh
===================================================================
--- branches/cleanup-2008/milena/mln/level/memset_.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/level/memset_.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/linear/gaussian.hh
===================================================================
--- branches/cleanup-2008/milena/mln/linear/gaussian.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/linear/gaussian.hh (revision 2838)
@@ -1,4 +1,4 @@
-// Copyright (C) 2001, 2002, 2003, 2004, 2008 EPITA Research and Development
+// Copyright (C) 2001, 2002, 2003, 2004, 2008 EPITA Research and
// Laboratory
//
// This file is part of the Olena Library. This library is free
Index: branches/cleanup-2008/milena/mln/tag/skeleton.hh
===================================================================
--- branches/cleanup-2008/milena/mln/tag/skeleton.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/tag/skeleton.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/accu/count_adjacent_vertices.hh
===================================================================
--- branches/cleanup-2008/milena/mln/accu/count_adjacent_vertices.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/accu/count_adjacent_vertices.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/accu/height.hh
===================================================================
--- branches/cleanup-2008/milena/mln/accu/height.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/accu/height.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/value/proxy.hh
===================================================================
--- branches/cleanup-2008/milena/mln/value/proxy.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/value/proxy.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/value/int_u_sat.hh
===================================================================
--- branches/cleanup-2008/milena/mln/value/int_u_sat.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/value/int_u_sat.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/value/stack.hh
===================================================================
--- branches/cleanup-2008/milena/mln/value/stack.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/value/stack.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/make/voronoi.hh
===================================================================
--- branches/cleanup-2008/milena/mln/make/voronoi.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/make/voronoi.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/border/fill.hh
===================================================================
--- branches/cleanup-2008/milena/mln/border/fill.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/border/fill.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/border/get.hh
===================================================================
--- branches/cleanup-2008/milena/mln/border/get.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/border/get.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/convert/to_upper_window.hh
===================================================================
--- branches/cleanup-2008/milena/mln/convert/to_upper_window.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/convert/to_upper_window.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/convert/to_p_array.hh
===================================================================
--- branches/cleanup-2008/milena/mln/convert/to_p_array.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/convert/to_p_array.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/convert/to_window.hh
===================================================================
--- branches/cleanup-2008/milena/mln/convert/to_window.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/convert/to_window.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/geom/seeds2tiling.hh
===================================================================
--- branches/cleanup-2008/milena/mln/geom/seeds2tiling.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/geom/seeds2tiling.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/geom/seeds2tiling_roundness.hh
===================================================================
--- branches/cleanup-2008/milena/mln/geom/seeds2tiling_roundness.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/geom/seeds2tiling_roundness.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/set/inter.hh
===================================================================
--- branches/cleanup-2008/milena/mln/set/inter.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/set/inter.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/morpho/closing_volume.hh
===================================================================
--- branches/cleanup-2008/milena/mln/morpho/closing_volume.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/morpho/closing_volume.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/morpho/closing_area.hh
===================================================================
--- branches/cleanup-2008/milena/mln/morpho/closing_area.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/morpho/closing_area.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/morpho/closing_height.hh
===================================================================
--- branches/cleanup-2008/milena/mln/morpho/closing_height.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/morpho/closing_height.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/morpho/opening_area_on_vertices.hh
===================================================================
--- branches/cleanup-2008/milena/mln/morpho/opening_area_on_vertices.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/morpho/opening_area_on_vertices.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/morpho/closing_attribute.hh
===================================================================
--- branches/cleanup-2008/milena/mln/morpho/closing_attribute.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/morpho/closing_attribute.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/morpho/opening_attribute.hh
===================================================================
--- branches/cleanup-2008/milena/mln/morpho/opening_attribute.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/morpho/opening_attribute.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/morpho/opening_volume.hh
===================================================================
--- branches/cleanup-2008/milena/mln/morpho/opening_volume.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/morpho/opening_volume.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/morpho/closing_area_on_vertices.hh
===================================================================
--- branches/cleanup-2008/milena/mln/morpho/closing_area_on_vertices.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/morpho/closing_area_on_vertices.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/morpho/opening_height.hh
===================================================================
--- branches/cleanup-2008/milena/mln/morpho/opening_height.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/morpho/opening_height.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/morpho/opening_area.hh
===================================================================
--- branches/cleanup-2008/milena/mln/morpho/opening_area.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/morpho/opening_area.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/canvas/morpho/algebraic_union_find.hh
===================================================================
--- branches/cleanup-2008/milena/mln/canvas/morpho/algebraic_union_find.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/canvas/morpho/algebraic_union_find.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/labeling/flat_zones.hh
===================================================================
--- branches/cleanup-2008/milena/mln/labeling/flat_zones.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/labeling/flat_zones.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/labeling/foreground.hh
===================================================================
--- branches/cleanup-2008/milena/mln/labeling/foreground.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/labeling/foreground.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/labeling/regional_minima.hh
===================================================================
--- branches/cleanup-2008/milena/mln/labeling/regional_minima.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/labeling/regional_minima.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/labeling/regional_maxima.hh
===================================================================
--- branches/cleanup-2008/milena/mln/labeling/regional_maxima.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/labeling/regional_maxima.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/labeling/background.hh
===================================================================
--- branches/cleanup-2008/milena/mln/labeling/background.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/labeling/background.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/util/greater_psite.hh
===================================================================
--- branches/cleanup-2008/milena/mln/util/greater_psite.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/util/greater_psite.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2005, 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2005, 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
Index: branches/cleanup-2008/milena/mln/util/ord_pair.hh
===================================================================
--- branches/cleanup-2008/milena/mln/util/ord_pair.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/util/ord_pair.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/util/graph.hh
===================================================================
--- branches/cleanup-2008/milena/mln/util/graph.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/util/graph.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/util/greater_point.hh
===================================================================
--- branches/cleanup-2008/milena/mln/util/greater_point.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/util/greater_point.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2005, 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2005, 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
Index: branches/cleanup-2008/milena/mln/util/internal/boost_graph_structure.hh
===================================================================
--- branches/cleanup-2008/milena/mln/util/internal/boost_graph_structure.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/util/internal/boost_graph_structure.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/util/internal/boost_graph_access.hh
===================================================================
--- branches/cleanup-2008/milena/mln/util/internal/boost_graph_access.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/util/internal/boost_graph_access.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/util/internal/graph_base.hh
===================================================================
--- branches/cleanup-2008/milena/mln/util/internal/graph_base.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/util/internal/graph_base.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/util/internal/boost_graph.hh
===================================================================
--- branches/cleanup-2008/milena/mln/util/internal/boost_graph.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/util/internal/boost_graph.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/mln/util/internal/boost_graph_property.hh
===================================================================
--- branches/cleanup-2008/milena/mln/util/internal/boost_graph_property.hh (revision 2837)
+++ branches/cleanup-2008/milena/mln/util/internal/boost_graph_property.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/sandbox/levillain/morpho/lower_completion.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/levillain/morpho/lower_completion.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/levillain/morpho/lower_completion.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2005, 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2005, 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
Index: branches/cleanup-2008/milena/sandbox/levillain/morpho/shortest_path_watershed.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/levillain/morpho/shortest_path_watershed.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/levillain/morpho/shortest_path_watershed.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2005, 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2005, 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
Index: branches/cleanup-2008/milena/sandbox/pellegrin/set/core/p_bgraph.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/pellegrin/set/core/p_bgraph.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/pellegrin/set/core/p_bgraph.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/sandbox/pellegrin/set/core/p_line_graph.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/pellegrin/set/core/p_line_graph.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/pellegrin/set/core/p_line_graph.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/sandbox/pellegrin/set/core/p_graph.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/pellegrin/set/core/p_graph.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/pellegrin/set/core/p_graph.hh (revision 2838)
@@ -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
Index: branches/cleanup-2008/milena/sandbox/nivault/dmap.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/nivault/dmap.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/nivault/dmap.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and
+// 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
Index: branches/cleanup-2008/milena/sandbox/jardonnet/array/old/nd.hh
===================================================================
Index: branches/cleanup-2008/milena/sandbox/jardonnet/array/old/1d.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/jardonnet/array/old/1d.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/jardonnet/array/old/1d.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 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
Index: branches/cleanup-2008/milena/sandbox/jardonnet/array/old/2d.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/jardonnet/array/old/2d.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/jardonnet/array/old/2d.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 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
Index: branches/cleanup-2008/milena/sandbox/jardonnet/array/old/3d.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/jardonnet/array/old/3d.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/jardonnet/array/old/3d.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development
+// 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
Index: branches/cleanup-2008/milena/sandbox/jardonnet/array/old/all.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/jardonnet/array/old/all.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/jardonnet/array/old/all.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003 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
Index: branches/cleanup-2008/milena/sandbox/jardonnet/array/old/objs.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/jardonnet/array/old/objs.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/jardonnet/array/old/objs.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003 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
Index: branches/cleanup-2008/milena/sandbox/garrigues/ocr/skeleton.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/garrigues/ocr/skeleton.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/garrigues/ocr/skeleton.hh (revision 2838)
@@ -83,11 +83,11 @@
initialize(is_crest, input);
level::fill(is_crest, false);
- mln_piter_(image2d<value::int_u8>) p(dist_map.domain());
+ mln_piter_(image2d<bool>) p(input.domain());
mln_niter_(neighb2d) n(nbh, p);
for_all(p)
{
- if (!input(p) || dist_map(p) < 10)
+ if (!input(p) || dist_map(p) < 0)
continue;
unsigned nb_eq = 0;
@@ -108,8 +108,12 @@
return is_crest;
}
+
image2d<bool>
- skeleton(const image2d<bool>& input, unsigned nbh_i)
+ skeleton_with_constraint(const image2d<bool>& input,
+ unsigned nbh_i,
+ const image2d<bool>& K,
+ const image2d<value::int_u8>& priority)
{
mln_assertion(nbh_i == 4 || nbh_i == 8);
@@ -117,24 +121,6 @@
image2d<bool> output;
initialize(output, input);
-
- int vals[] = { 0, 9, 0, 9, 0,
- 9, 6, 4, 6, 9,
- 0, 4, 0, 4, 0, // Values of distances.
- 9, 6, 4, 6, 9,
- 0, 9, 0, 9, 0 };
-
- image2d<value::int_u8> dist_map_n = transform::distance(value::int_u8(), logical::not_(input), nbh, make::w_window2d_int(vals));
- image2d<value::int_u8> dist_map = arith::revert(dist_map_n);
-
- io::pgm::save(dist_map, "distance.pgm");
- io::pgm::save(dist_map_n, "distance_n.pgm");
-
- // Make K
- image2d<bool> K = crest(input, dist_map_n, nbh);
-
- io::pbm::save(K, "K.pbm");
-
typedef mln_site_(image2d<bool>) P;
p_priority<value::int_u8, p_queue_fast<P> > q;
@@ -147,7 +133,7 @@
for_all(p)
if (!input(p) &&
is_simple_point2d(input, nbh_i, p)) // p is a simple point of background
- q.push(dist_map(p), p);
+ q.push(priority(p), p);
}
// Propagation.
@@ -169,7 +155,7 @@
{
output(n) = false; // Remove n from object
// save_state(output);
- q.push(dist_map(n), n);
+ q.push(priority(n), n);
}
}
}
@@ -177,6 +163,32 @@
return output;
}
+
+ image2d<bool>
+ skeleton(const image2d<bool>& input, unsigned nbh_i)
+ {
+ mln_assertion(nbh_i == 4 || nbh_i == 8);
+ neighb2d nbh = int_to_neighb(nbh_i);
+
+ int vals[] = { 0, 9, 0, 9, 0,
+ 9, 6, 4, 6, 9,
+ 0, 4, 0, 4, 0, // Values of distances.
+ 9, 6, 4, 6, 9,
+ 0, 9, 0, 9, 0 };
+
+ image2d<value::int_u8> dist_map_n = transform::distance(value::int_u8(), logical::not_(input), nbh, make::w_window2d_int(vals));
+ image2d<value::int_u8> dist_map = arith::revert(dist_map_n);
+
+ io::pgm::save(dist_map, "distance.pgm");
+ io::pgm::save(dist_map_n, "distance_n.pgm");
+
+ // Make K
+ image2d<bool> K = crest(input, dist_map_n, nbh);
+ io::pbm::save(K, "K.pbm");
+
+ return skeleton_with_constraint(input, nbh_i, K, dist_map);
+ }
+
} // end of namespace mln
#endif
Index: branches/cleanup-2008/milena/sandbox/garrigues/ocr/check.sh
===================================================================
--- branches/cleanup-2008/milena/sandbox/garrigues/ocr/check.sh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/garrigues/ocr/check.sh (revision 2838)
@@ -1,20 +1,23 @@
+output_dir=tmp/`date '+%y_%m_%d__%H_%M_%S'`
+mkdir $output_dir
for i in input/*.pbm ; do
echo "==========================================="
echo "--------- $i"
echo "==========================================="
ref="$i.txt"
+ echo "______________________________Reference"
cat $ref
sed -e 's/\(.\)/\1\n/g' $ref > tmp/ref
total=`cat tmp/ref | wc -l `
- ./ocr_without_preprocess $i tmp/`basename $i` > tmp/without
- echo "_______________without preprocessing"
+ echo "______________________________without preprocessing"
+ ./ocr_without_preprocess $i > tmp/without
cat tmp/without
cat tmp/without | sed -e 's/\(.\)/\1\n/g' > tmp/without
- ./ocr_with_preprocess $i tmp/`basename $i` > tmp/with
- echo "_______________with preprocessing"
+ echo "______________________________with preprocessing"
+ ./ocr_with_preprocess $i $output_dir/`basename $i` > tmp/with
cat tmp/with
cat tmp/with | sed -e 's/\(.\)/\1\n/g' > tmp/with
Index: branches/cleanup-2008/milena/sandbox/garrigues/ocr/ocr_with_preprocess.cc
===================================================================
--- branches/cleanup-2008/milena/sandbox/garrigues/ocr/ocr_with_preprocess.cc (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/garrigues/ocr/ocr_with_preprocess.cc (revision 2838)
@@ -50,6 +50,7 @@
#include <mln/labeling/regional_maxima.hh>
#include <mln/morpho/dilation.hh>
#include <mln/win/octagon2d.hh>
+#include <mln/border/resize.hh>
#include <mln/io/pgm/load.hh>
#include <mln/io/pgm/save.hh>
@@ -63,12 +64,13 @@
// _COMPILATION_
// g++ -DNDEBUG -O3 -I../../.. ocr.cc -L/usr/lib -ltesseract_full -lpthread
+// image2d<int_u8> tmp = clone(cast_image<int_u8>(Var)); \
+
#if 1
# define OCR_TEST(Var) \
{ \
- image2d<int_u8> tmp = clone(cast_image<int_u8>(Var)); \
float score = 0.f; \
- char* s = tesseract("fra", tmp, &score); \
+ char* s = tesseract("fra", Var, &score); \
std::cerr << #Var << ": " << score << std::endl << s; \
delete[] s; \
}
@@ -93,10 +95,11 @@
mln::border::thickness = 0;
io::pbm::load(input, argv[1]);
- OCR_TEST(input);
+// OCR_TEST(input);
// Resize
image2d<int_u8> enlarged = enlarge(logical::not_(input), 2);
+ image2d<bool> big = geom::resize(logical::not_(input), 4);
io::pgm::save(enlarged, std::string(argv[2]) + "_1_enlarge.pgm");
OCR_TEST(enlarged);
@@ -124,25 +127,9 @@
OCR_TEST(skel);
// Dilation
- image2d<bool> dilate;
win::octagon2d oct(5);
- { // FIXME?
-#if 1
- image2d<int_u8> tmp;
- initialize(tmp, skel);
- initialize(dilate, skel);
- mln_piter_(image2d<int_u8>) p(tmp.domain());
- for_all(p)
- tmp(p) = skel(p);
- tmp = morpho::dilation(tmp, oct);
- for_all(p)
- dilate(p) = tmp(p);
-#else
- // Should be using this but it doesn't work :(
- dilate = morpho::dilation(skel, oct);
-#endif
- }
-
+ image2d<bool> dilate = morpho::dilation(skel, oct);
+ border::resize(dilate, 0);
io::pbm::save(dilate, std::string(argv[2]) + "_5_dilation.pbm");
OCR_TEST(dilate);
@@ -153,6 +140,26 @@
io::pbm::save(subsampled, argv[2]);
+
+ image2d<bool> K = crest(big, blur, c4());
+ OCR_TEST(K);
+ io::pbm::save(K, std::string(argv[2]) + "_7_K.pbm");
+
+ image2d<bool> skel_on_gaussian = skeleton_with_constraint(big, 4, K, arith::revert(blur));
+ OCR_TEST(skel_on_gaussian);
+ io::pbm::save(skel_on_gaussian, std::string(argv[2]) + "_8_skeleton_on_blur.pbm");
+
+ // Dilation
+ image2d<bool> dilate_on_gaussian = morpho::dilation(skel_on_gaussian, oct);
+ border::resize(dilate_on_gaussian, 0);
+ io::pbm::save(dilate_on_gaussian, std::string(argv[2]) + "_9_dilation_on_gaussian.pbm");
+ OCR_TEST(dilate_on_gaussian);
+
+ // Subsampling
+ image2d<bool> subsampled_on_gaussian = subsampling::subsampling(dilate_on_gaussian, dpoint2d(1,1), 2);
+ io::pbm::save(subsampled_on_gaussian, std::string(argv[2]) + "_91_subsampling_on_gaussian.pbm");
+ OCR_TEST(subsampled_on_gaussian);
+
{
float score = 0;
char* s = tesseract("fra", subsampled, &score);
Index: branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbhsl.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbhsl.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbhsl.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbnrgb.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbnrgb.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbnrgb.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbxyz.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbxyz.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbxyz.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/convert/conversion.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/convert/conversion.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/convert/conversion.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/convert/cast.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/convert/cast.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/convert/cast.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbhsv.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbhsv.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbhsv.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbyiq.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbyiq.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbyiq.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/convert/force.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/convert/force.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/convert/force.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/convert/conversion_ng_se.hh
===================================================================
Index: branches/cleanup-2008/milena/sandbox/vigouroux/convert/nrgbxyz.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/convert/nrgbxyz.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/convert/nrgbxyz.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/convert/basics.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/convert/basics.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/convert/basics.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/convert/abstract/colorconv.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/convert/abstract/colorconv.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/convert/abstract/colorconv.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/convert/abstract/conversion.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/convert/abstract/conversion.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/convert/abstract/conversion.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/convert/bound.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/convert/bound.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/convert/bound.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/convert/stretch.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/convert/stretch.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/convert/stretch.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbyuv.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbyuv.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbyuv.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbhsi.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbhsi.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/convert/rgbhsi.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/color.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/color.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/color.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/color/hsi.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/color/hsi.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/color/hsi.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/color/yuv.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/color/yuv.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/color/yuv.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/color/hsl.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/color/hsl.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/color/hsl.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/color/nrgb.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/color/nrgb.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/color/nrgb.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/color/xyz.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/color/xyz.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/color/xyz.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/color/hsv.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/color/hsv.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/color/hsv.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/color/yiq.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/color/yiq.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/color/yiq.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/color/rgb.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/color/rgb.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/color/rgb.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003 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
Index: branches/cleanup-2008/milena/sandbox/vigouroux/color/color.hh
===================================================================
--- branches/cleanup-2008/milena/sandbox/vigouroux/color/color.hh (revision 2837)
+++ branches/cleanup-2008/milena/sandbox/vigouroux/color/color.hh (revision 2838)
@@ -1,4 +1,5 @@
-// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development Laboratory
+// Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and
+// 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
2
1
* apps/statues/mesh-complex-segm.cc,
* doc/benchmark/canvas.cc,
* doc/oldies/2006__tour_1.txt,
* doc/oldies/2006__tour_2.txt,
* doc/tutorial/examples/image_plain.cc,
* doc/tutorial/examples/sub_image.cc,
* doc/tutorial/samples/fill-call-1.cc,
* doc/tutorial/samples/fill-part-image.cc,
* doc/tutorial/samples/fill-subdomain-shorter.cc,
* doc/tutorial/samples/fill-subdomain.cc,
* doc/tutorial/samples/fill-subimage-cfun.cc,
* doc/tutorial/samples/ima2d-7.cc,
* doc/tutorial/samples/ima2d-rot.cc,
* doc/tutorial/samples/paste-call-1.cc,
* doc/tutorial/tutorial.tex: rename level::fill/paste as
data::fill/paste.
---
milena/ChangeLog | 21 ++++++++++++++++++++
milena/apps/statues/mesh-complex-segm.cc | 2 +-
milena/doc/benchmark/canvas.cc | 4 +-
milena/doc/oldies/2006__tour_1.txt | 10 ++++----
milena/doc/oldies/2006__tour_2.txt | 4 +-
milena/doc/tutorial/examples/image_plain.cc | 6 ++--
milena/doc/tutorial/examples/sub_image.cc | 4 +-
milena/doc/tutorial/samples/fill-call-1.cc | 4 +-
milena/doc/tutorial/samples/fill-part-image.cc | 4 +-
.../doc/tutorial/samples/fill-subdomain-shorter.cc | 4 +-
milena/doc/tutorial/samples/fill-subdomain.cc | 8 +++---
milena/doc/tutorial/samples/fill-subimage-cfun.cc | 4 +-
milena/doc/tutorial/samples/ima2d-7.cc | 2 +-
milena/doc/tutorial/samples/ima2d-rot.cc | 4 +-
milena/doc/tutorial/samples/paste-call-1.cc | 4 +-
milena/doc/tutorial/tutorial.tex | 20 +++++++++---------
16 files changed, 63 insertions(+), 42 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index e1a51ee..1ae05f4 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,26 @@
2008-12-29 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Update tutorial according to the last renamings.
+
+ * apps/statues/mesh-complex-segm.cc,
+ * doc/benchmark/canvas.cc,
+ * doc/oldies/2006__tour_1.txt,
+ * doc/oldies/2006__tour_2.txt,
+ * doc/tutorial/examples/image_plain.cc,
+ * doc/tutorial/examples/sub_image.cc,
+ * doc/tutorial/samples/fill-call-1.cc,
+ * doc/tutorial/samples/fill-part-image.cc,
+ * doc/tutorial/samples/fill-subdomain-shorter.cc,
+ * doc/tutorial/samples/fill-subdomain.cc,
+ * doc/tutorial/samples/fill-subimage-cfun.cc,
+ * doc/tutorial/samples/ima2d-7.cc,
+ * doc/tutorial/samples/ima2d-rot.cc,
+ * doc/tutorial/samples/paste-call-1.cc,
+ * doc/tutorial/tutorial.tex: rename level::fill/paste as
+ data::fill/paste.
+
+2008-12-29 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Fix compilation issues.
* tests/unit_test/Makefile.am,
diff --git a/milena/apps/statues/mesh-complex-segm.cc b/milena/apps/statues/mesh-complex-segm.cc
index 05fffe0..00c9d13 100644
--- a/milena/apps/statues/mesh-complex-segm.cc
+++ b/milena/apps/statues/mesh-complex-segm.cc
@@ -146,7 +146,7 @@ int main(int argc, char* argv[])
`---------*/
mln::rgb8_2complex_image3df output(wshed.domain());
- mln::level::fill(output, mln::literal::white);
+ mln::data::fill(output, mln::literal::white);
// FIXME: Use a colorize functor instead.
// Choose random colors for each basin number.
diff --git a/milena/doc/benchmark/canvas.cc b/milena/doc/benchmark/canvas.cc
index b40a6c3..fd7f698 100644
--- a/milena/doc/benchmark/canvas.cc
+++ b/milena/doc/benchmark/canvas.cc
@@ -110,10 +110,10 @@ namespace mln
labeling<F>::init()
{
initialize(deja_vu, f.input);
- mln::level::fill(deja_vu, false);
+ mln::data::fill(deja_vu, false);
initialize(parent, f.input);
initialize(output, f.input);
- mln::level::fill(output, L(literal::zero));
+ mln::data::fill(output, L(literal::zero));
nlabels = 0;
}
diff --git a/milena/doc/oldies/2006__tour_1.txt b/milena/doc/oldies/2006__tour_1.txt
index b083281..26be330 100644
--- a/milena/doc/oldies/2006__tour_1.txt
+++ b/milena/doc/oldies/2006__tour_1.txt
@@ -25,7 +25,7 @@ image1d<T> and image3d<T> are similarly constructed
char[] values = { 'a', 'b', 'c',
'd', 'e', 'f' };
image2d<char> ima(2, 3);
-level::fill(ima, values);
+data::fill(ima, values);
debug::print(ima.bbox());
// [(0, 0)..(1, 2)]
@@ -54,7 +54,7 @@ debug::print(ima, p);
bbox2d bb = set(from(1,5), to(2,7));
image2d<char> ima2(bb);
ima2.set_name("ima2");
-level::fill(ima2, values);
+data::fill(ima2, values);
debug::print(ima2);
// 5 6 7
@@ -127,7 +127,7 @@ int[] values = { 0, 1, 1, 1, 0,
0, 1, 1, 1, 0,
0, 0, 0, 0, 0 };
image2d<bool> ima(from(1,1), to(4,4));
-level::fill(ima, values);
+data::fill(ima, values);
debug::print(ima);
// 1 2 3 4 5
// - - - - -
@@ -145,7 +145,7 @@ debug::print(ima2);
// 3| 0 0 0 0 0
// 4| 0 0 0 0 0
-actually, after level::fill we have:
+actually, after data::fill we have:
// 0 1 2 3 4 5 6
// - - - - - - -
@@ -232,7 +232,7 @@ int[] values = { 0, 1, 1, 1, 0,
0, 1, 1, 1, 0,
0, 0, 0, 0, 0 };
image2d_without_border<bool> ima(from(1,1), to(4,4));
-level::fill(ima, values);
+data::fill(ima, values);
debug::print(ima);
// 1 2 3 4 5
// - - - - -
diff --git a/milena/doc/oldies/2006__tour_2.txt b/milena/doc/oldies/2006__tour_2.txt
index e4d7011..ea06530 100644
--- a/milena/doc/oldies/2006__tour_2.txt
+++ b/milena/doc/oldies/2006__tour_2.txt
@@ -21,7 +21,7 @@ T: value type
int[] values = { 'a', 'b', 'c',
'd', 'e', 'f' };
image2d<char> ima(2, 3);
-level::fill(ima, values);
+data::fill(ima, values);
debug::print(ima.bbox());
// [(0, 0)..(1, 2)]
@@ -51,7 +51,7 @@ debug::print(ima, p);
bbox2d bb = set(from(1,5), to(2,7));
image2d<char> ima2(bb);
ima2.set_name("ima2");
-level::fill(ima2, values);
+data::fill(ima2, values);
debug::print(ima2);
// 5 6 7
diff --git a/milena/doc/tutorial/examples/image_plain.cc b/milena/doc/tutorial/examples/image_plain.cc
index 94ad5c6..4bfdf79 100644
--- a/milena/doc/tutorial/examples/image_plain.cc
+++ b/milena/doc/tutorial/examples/image_plain.cc
@@ -2,7 +2,7 @@
# include <mln/core/image/plain.hh>
# include <mln/debug/println.hh>
# include <mln/debug/iota.hh>
-# include <mln/level/fill_with_value.hh>
+# include <mln/data/fill_with_value.hh>
# include <mln/opt/at.hh>
@@ -36,7 +36,7 @@ int main()
debug::println(ima);
image2d<I_> mos(2, 2);
- level::fill_with_value(mos, ima);
- level::fill_with_value(opt::at(mos, 1,1), 0);
+ data::fill_with_value(mos, ima);
+ data::fill_with_value(opt::at(mos, 1,1), 0);
picture(mos);
}
diff --git a/milena/doc/tutorial/examples/sub_image.cc b/milena/doc/tutorial/examples/sub_image.cc
index 533ffe7..0321d30 100644
--- a/milena/doc/tutorial/examples/sub_image.cc
+++ b/milena/doc/tutorial/examples/sub_image.cc
@@ -6,7 +6,7 @@
# include <mln/debug/println.hh>
# include <mln/morpho/elementary/gradient.hh>
-# include <mln/level/fill_with_value.hh>
+# include <mln/data/fill_with_value.hh>
int main()
@@ -22,7 +22,7 @@ int main()
debug::println(sub);
debug::println(morpho::elementary::gradient(sub, c4()));
- level::fill_with_value((ima | box2d(2,3)).rw(), 0);
+ data::fill_with_value((ima | box2d(2,3)).rw(), 0);
debug::println(ima);
trait::image::print(sub);
diff --git a/milena/doc/tutorial/samples/fill-call-1.cc b/milena/doc/tutorial/samples/fill-call-1.cc
index d41a5d9..1afba03 100644
--- a/milena/doc/tutorial/samples/fill-call-1.cc
+++ b/milena/doc/tutorial/samples/fill-call-1.cc
@@ -8,11 +8,11 @@ int main()
// \}
// \{
- level::fill(imga, 'a');
+ data::fill(imga, 'a');
// \}
// \{
- level::fill((imga | box2d(1,2)).rw(), 'a');
+ data::fill((imga | box2d(1,2)).rw(), 'a');
// \}
}
diff --git a/milena/doc/tutorial/samples/fill-part-image.cc b/milena/doc/tutorial/samples/fill-part-image.cc
index 0c90f35..e3ad3a2 100644
--- a/milena/doc/tutorial/samples/fill-part-image.cc
+++ b/milena/doc/tutorial/samples/fill-part-image.cc
@@ -29,13 +29,13 @@ int main()
// contained in arr and fill these ones
// with 0.
// We must call "rw()" here.
- level::fill((ima | arr).rw(), 0);
+ data::fill((ima | arr).rw(), 0);
debug::println((ima | arr));
mln_VAR(ima2, ima | arr);
// We do not need to call "rw()" here.
- level::fill(ima2, 0);
+ data::fill(ima2, 0);
// \}
debug::println(ima2);
diff --git a/milena/doc/tutorial/samples/fill-subdomain-shorter.cc b/milena/doc/tutorial/samples/fill-subdomain-shorter.cc
index 7526682..fc4d725 100644
--- a/milena/doc/tutorial/samples/fill-subdomain-shorter.cc
+++ b/milena/doc/tutorial/samples/fill-subdomain-shorter.cc
@@ -26,8 +26,8 @@ int main()
image2d<rgb8> ima2;
initialize(ima2, ima);
- level::fill(ima2, literal::black);
+ data::fill(ima2, literal::black);
- level::fill((ima2 | (pw::value(lab) == pw::cst(2u))).rw(), literal::red);
+ data::fill((ima2 | (pw::value(lab) == pw::cst(2u))).rw(), literal::red);
// \}
}
diff --git a/milena/doc/tutorial/samples/fill-subdomain.cc b/milena/doc/tutorial/samples/fill-subdomain.cc
index efe8d58..a5ec65e 100644
--- a/milena/doc/tutorial/samples/fill-subdomain.cc
+++ b/milena/doc/tutorial/samples/fill-subdomain.cc
@@ -36,8 +36,8 @@ int main()
image2d<label_8> tmp;
initialize(tmp, lbl);
- level::fill(tmp, 0);
- level::fill((tmp | lbl_2.domain()).rw(), 1);
+ data::fill(tmp, 0);
+ data::fill((tmp | lbl_2.domain()).rw(), 1);
doc::ppmsave(debug::colorize(rgb8(), tmp, 1), "fill-subdomain");
// Create a black image from ima.
@@ -45,9 +45,9 @@ int main()
// \{
image2d<rgb8> ima2;
initialize(ima2, ima);
- level::fill(ima2, literal::black);
+ data::fill(ima2, literal::black);
- level::fill((ima2 | lbl_2.domain()).rw(), literal::red);
+ data::fill((ima2 | lbl_2.domain()).rw(), literal::red);
// \}
doc::ppmsave(ima2, "fill-subdomain");
diff --git a/milena/doc/tutorial/samples/fill-subimage-cfun.cc b/milena/doc/tutorial/samples/fill-subimage-cfun.cc
index 6f3a4dd..2ff6c6c 100644
--- a/milena/doc/tutorial/samples/fill-subimage-cfun.cc
+++ b/milena/doc/tutorial/samples/fill-subimage-cfun.cc
@@ -30,9 +30,9 @@ int main()
// \{
image2d<rgb8> ima2;
initialize(ima2, ima);
- level::fill(ima2, literal::black);
+ data::fill(ima2, literal::black);
- level::fill((ima2 | row_oddity).rw(), literal::red);
+ data::fill((ima2 | row_oddity).rw(), literal::red);
// \}
doc::ppmsave(ima2, "fill-subimage-cfun");
diff --git a/milena/doc/tutorial/samples/ima2d-7.cc b/milena/doc/tutorial/samples/ima2d-7.cc
index d15d3b9..3f4cd35 100644
--- a/milena/doc/tutorial/samples/ima2d-7.cc
+++ b/milena/doc/tutorial/samples/ima2d-7.cc
@@ -8,6 +8,6 @@ int main()
image2d<value::int_u8> img2b;
initialize(img2b, img2a);
- level::fill(img2b, img2a);
+ data::fill(img2b, img2a);
// \}
}
diff --git a/milena/doc/tutorial/samples/ima2d-rot.cc b/milena/doc/tutorial/samples/ima2d-rot.cc
index 84cd1ad..6463a5c 100644
--- a/milena/doc/tutorial/samples/ima2d-rot.cc
+++ b/milena/doc/tutorial/samples/ima2d-rot.cc
@@ -12,14 +12,14 @@ int main()
// Declare the image to be rotated.
image2d<value::rgb8> ima1_(220, 220);
- level::fill(ima1_, literal::cyan);
+ data::fill(ima1_, literal::cyan);
border::fill(ima1_, literal::yellow);
// Set an infinite extension.
mln_VAR(ima1, extend(ima1_, pw::cst(literal::yellow)));
// Declare the output image.
image2d<value::rgb8> ima2(220, 220);
- level::fill(ima2, literal::cyan);
+ data::fill(ima2, literal::cyan);
border::fill(ima2, literal::yellow);
box2d extended_domain= ima1.domain();
diff --git a/milena/doc/tutorial/samples/paste-call-1.cc b/milena/doc/tutorial/samples/paste-call-1.cc
index 88d4f88..01a8bc5 100644
--- a/milena/doc/tutorial/samples/paste-call-1.cc
+++ b/milena/doc/tutorial/samples/paste-call-1.cc
@@ -9,10 +9,10 @@ int main()
image2d<unsigned char> imga(imgb.domain());
// Initialize the image values.
- level::fill(imgb, 'b');
+ data::fill(imgb, 'b');
// Paste the content of imgb in imga.
- level::paste(imgb, imga);
+ data::paste(imgb, imga);
debug::println(imga);
// \}
diff --git a/milena/doc/tutorial/tutorial.tex b/milena/doc/tutorial/tutorial.tex
index f8e758b..a2affa1 100644
--- a/milena/doc/tutorial/tutorial.tex
+++ b/milena/doc/tutorial/tutorial.tex
@@ -1031,7 +1031,7 @@ Sometimes, you may want to initialize an image from another one:
\var{img2b} is declared without specifying a domain. Its border size is set to
the default one, e.g 0. By using \code{initialize} \var{img2b} is initialized
with the same domain and border/extension as \var{img2a}. The data is not
- copied though. Other routines like \code{level::fill} can be called in order to
+ copied though. Other routines like \code{data::fill} can be called in order to
do so (See also \doxyref{fillop}).
@@ -1405,7 +1405,7 @@ passed as parameter. These macros can be used with any container like images or
site sets.
Here follow an example with the implemantions of the most basic routines which
-use the \code{for\_all} loop: \code{level::fill()} and \code{level::paste()}.
+use the \code{for\_all} loop: \code{data::fill()} and \code{data::paste()}.
\doxycode{fill}
@@ -1474,9 +1474,9 @@ Routine name & Description \\ \hline
level::clone() & creates a deep copy of an object. Any shared data is
duplicated. \\
-level::fill() & fill an object with a value. \\
+data::fill() & fill an object with a value. \\
-level::paste() & paste object data to another object. \\
+data::paste() & paste object data to another object. \\
labeling::blobs() & find and label the different components of an image. \\
@@ -1497,17 +1497,17 @@ have not been initialized yet. So we fill \var{imga} with the value 'a':
\doxycode[2]{fill-call-1}
-The ``\code{fill}'' algorithm is located in the sub-namespace "\namespace{mln::level}" since this
-algorithm deals with the ``level'' of site values.
+The ``\code{fill}'' algorithm is located in the sub-namespace "\namespace{mln::data}" since this
+algorithm deals with the site values.
Note that the term "level" refers to the fact that an image can be considered as
a landscape where the elevation at a particular location/site is given by
the corresponding site value.
-The full name of this routine is ``\namespace{mln::level::fill}''.
+The full name of this routine is ``\namespace{mln::data::fill}''.
To access to a particular algorithm, the proper file shall be included.
The file names of algorithms strictly map their C++ name; so
-\namespace{mln::level::fill} is defined in the file \header{mln/level/fill.hh}.
+\namespace{mln::data::fill} is defined in the file \header{mln/data/fill.hh}.
%----------------
\subsection*{Note}
@@ -1515,7 +1515,7 @@ Most algorithms in Olena are constructed following the classical scheme: "output
algo(input)", where the input image is only read. However some few algorithms
take an input image in order to modify it. To enforce this particular feature,
the user shall explicitly state that the image is provided so that its data is
-modified "read/write". The algorithm call shall be ``\code{level::fill(ima.rw(),
+modified "read/write". The algorithm call shall be ``\code{data::fill(ima.rw(),
val)}''. When forgetting the ``\code{rw()}'' call it does not compile.
\doxycode[3]{fill-call-1}
@@ -1551,7 +1551,7 @@ Gives:
The notion of site sets plays an important role in Olena. Many tests are
performed at run-time to ensure that the program is correct.
-For instance, the algorithm level::paste tests that the set of sites of imgb
+For instance, the algorithm data::paste tests that the set of sites of imgb
(whose values are to be pasted) is a subset of the destination image.
--
1.5.6.5
1
0
* configure.ac: here.
* INSTALL: fix content about DNDEBUG.
---
ChangeLog | 8 ++++++++
INSTALL | 17 ++++++++---------
configure.ac | 1 +
3 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 25aeb2a..5f2cd3b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-12-22 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Fix configure.ac and INSTALL files.
+
+ * configure.ac: here.
+
+ * INSTALL: fix content about DNDEBUG.
+
2008-12-19 Guillaume Lazzara <z(a)lrde.epita.fr>
Enable the generation of version.hh.
diff --git a/INSTALL b/INSTALL
index 354f7c0..9a6bba1 100644
--- a/INSTALL
+++ b/INSTALL
@@ -143,15 +143,14 @@ for Olena. This is a problem for GCC 2.95 and probably other compilers.
need other flags. If you know these flags, add them to `CXXFLAGS'.
-1.3.3 Debugging flags make Olena slow
--------------------------------------
-
-Because Olena depends on C++ optimizations to provide the best
-performance, and enabling debugging flags often disable optimizations,
-you are advised to override the `CXXFLAGS_OPTIMIZE' with any options
-that gives the best optimization/conformance tradeoff. However, note
-that passing `-DNDEBUG' disable many sanity checks, while providing
-only a poor performance improvement.
+1.3.3 Debugging flags
+---------------------
+
+All over the code, many sanity checks are enabled by default. They are
+convenient since they make sure nothing wrong is passed to the functions.
+However, once the program is stable they may not be necessary anymore.
+Passing `-DNDEBUG' to the CXXFLAGS disable many sanity checks, while providing
+*high* performance improvement.
diff --git a/configure.ac b/configure.ac
index 1d5ca57..5d7b719 100644
--- a/configure.ac
+++ b/configure.ac
@@ -191,6 +191,7 @@ AC_CONFIG_FILES([
milena/tests/core/other/Makefile
milena/tests/core/routine/Makefile
milena/tests/core/site_set/Makefile
+ milena/tests/data/Makefile
milena/tests/debug/Makefile
milena/tests/display/Makefile
milena/tests/draw/Makefile
--
1.5.6.5
1
0
* tests/unit_test/Makefile.am,
* headers.mk: remove entries related to non-commited files.
* mln/convert/impl/from_image_to_site_set.hh,
* mln/convert/from_to.hh: Use forward declarations.
* mln/core/routine/init.hh: fix wrong include.
* mln/core/site_set/operators.hh: add a missing forward declaration.
---
milena/ChangeLog | 14 ++++++++++++++
milena/headers.mk | 5 -----
milena/mln/convert/from_to.hh | 19 +++++++++++--------
milena/mln/convert/impl/from_image_to_site_set.hh | 7 +++++--
milena/mln/core/routine/init.hh | 2 +-
milena/mln/core/site_set/operators.hh | 9 +++++----
milena/tests/unit_test/Makefile.am | 6 ------
7 files changed, 36 insertions(+), 26 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index c713b83..e1a51ee 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,19 @@
2008-12-29 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Fix compilation issues.
+
+ * tests/unit_test/Makefile.am,
+ * headers.mk: remove entries related to non-commited files.
+
+ * mln/convert/impl/from_image_to_site_set.hh,
+ * mln/convert/from_to.hh: Use forward declarations.
+
+ * mln/core/routine/init.hh: fix wrong include.
+
+ * mln/core/site_set/operators.hh: add a missing forward declaration.
+
+2008-12-29 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Propagate renaming level::fill/paste as data::fill/paste (again).
* doc/examples/erosion.cc,
diff --git a/milena/headers.mk b/milena/headers.mk
index 24043ff..7111d16 100644
--- a/milena/headers.mk
+++ b/milena/headers.mk
@@ -777,7 +777,6 @@ mln/core/category.hh \
mln/core/macros.hh \
mln/core/box_runstart_piter.hh \
mln/core/tags.hh \
-mln/core/w_window.hh.orig \
mln/core/dpoint.hh \
mln/core/alias/dpoint2d_h.hh \
mln/core/alias/p_run2d.hh \
@@ -841,14 +840,12 @@ mln/core/concept/weighted_window.hh \
mln/core/concept/all.hh \
mln/core/concept/gpoint.hh \
mln/core/concept/site_iterator.hh \
-mln/core/concept/window.hh.LOCAL.2903.hh \
mln/core/concept/point.hh \
mln/core/concept/literal.hh \
mln/core/concept/pixel_iterator.hh \
mln/core/concept/README \
mln/core/concept/value_iterator.hh \
mln/core/concept/meta_accumulator.hh \
-mln/core/concept/window.hh.BASE.2903.hh \
mln/core/concept/gdpoint.hh \
mln/core/concept/regular_grid.hh \
mln/core/concept/mesh.hh \
@@ -864,8 +861,6 @@ mln/core/concept/meta_fun.hh \
mln/core/concept/delta_point_site.hh \
mln/core/concept/status.txt \
mln/core/concept/neighborhood.hh \
-mln/core/concept/window.hh.orig \
-mln/core/concept/window.hh.REMOTE.2903.hh \
mln/core/concept/browsing.hh \
mln/core/pixel.hh \
mln/core/clock_neighb2d.hh \
diff --git a/milena/mln/convert/from_to.hh b/milena/mln/convert/from_to.hh
index ceaada6..149b115 100644
--- a/milena/mln/convert/from_to.hh
+++ b/milena/mln/convert/from_to.hh
@@ -33,25 +33,27 @@
/// General conversion procedure between two objects.
///
/// \todo Test the effectiveness of guards.
-/// \todo Add fwd decls.
/// \todo Dispatch code in appropriate files.
-# include <mln/core/concept/object.hh>
-# include <mln/core/concept/gpoint.hh>
-# include <mln/value/concept/all.hh>
-
# include <mln/convert/impl/all.hh>
# include <mln/convert/from_to.hxx>
-# include <mln/algebra/vec.hh>
-# include <mln/metal/is.hh>
# include <mln/metal/abort.hh>
+# include <mln/metal/converts_to.hh>
+# include <mln/metal/is.hh>
+# include <mln/metal/is_a.hh>
namespace mln
{
+ // Forward declarations.
+ template <typename E> struct Object;
+ template <typename E> struct Value;
+ template <typename E> struct Site_Set;
+ template <typename E> struct Image;
+
namespace convert
{
@@ -149,7 +151,8 @@ namespace mln
from_to_dispatch(metal::true_, const F& from,
metal::true_, T& to)
{
- internal::from_to_dispatch(typename mlc_converts_to(F, T)::eval(),
+ typedef mlc_converts_to(F, T) F_converts_to_T;
+ internal::from_to_dispatch(F_converts_to_T(),
exact(from), exact(to));
}
diff --git a/milena/mln/convert/impl/from_image_to_site_set.hh b/milena/mln/convert/impl/from_image_to_site_set.hh
index 0af1a7a..6304117 100644
--- a/milena/mln/convert/impl/from_image_to_site_set.hh
+++ b/milena/mln/convert/impl/from_image_to_site_set.hh
@@ -37,8 +37,6 @@
/// \todo Add (?) the case p_run-based -> site set.
# include <utility>
-# include <mln/core/concept/image.hh>
-# include <mln/core/concept/site_set.hh>
# include <mln/core/site_set/p_run.hh>
# include <mln/metal/converts_to.hh>
@@ -47,6 +45,11 @@
namespace mln
{
+ // Forward declarations.
+ template <typename E> struct Site_Set;
+ template <typename E> struct Image;
+ template <typename E> struct Gpoint;
+
namespace convert
{
diff --git a/milena/mln/core/routine/init.hh b/milena/mln/core/routine/init.hh
index 476c374..03bf405 100644
--- a/milena/mln/core/routine/init.hh
+++ b/milena/mln/core/routine/init.hh
@@ -37,7 +37,7 @@
# include <mln/geom/bbox.hh>
# include <mln/border/find.hh>
-# include <core/routine/init.hxx>
+# include <mln/core/routine/init.hxx>
namespace mln
diff --git a/milena/mln/core/site_set/operators.hh b/milena/mln/core/site_set/operators.hh
index 4c34368..fd2b7b7 100644
--- a/milena/mln/core/site_set/operators.hh
+++ b/milena/mln/core/site_set/operators.hh
@@ -37,6 +37,7 @@
# include <algorithm>
+# include <mln/convert/from_to.hh>
# include <mln/core/concept/site_set.hh>
@@ -122,7 +123,7 @@ namespace mln
sym_diff_std_set(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs)
{
typedef mln_site(Sl) P;
- mlc_converts_to(mln_psite(Sr), P)::check();
+ mlc_converts_to(mln_psite(Sr), P)::check();
std::set< P, util::ord<P> > sl, sr, sd;
convert::from_to(lhs, sl);
convert::from_to(rhs, sr);
@@ -149,7 +150,7 @@ namespace mln
leq_std_set(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs)
{
typedef mln_site(Sl) P;
- mlc_converts_to(mln_psite(Sr), P)::check();
+ mlc_converts_to(mln_psite(Sr), P)::check();
std::set< P, util::ord<P> > sl, sr;
convert::from_to(lhs, sl);
convert::from_to(rhs, sr);
@@ -172,7 +173,7 @@ namespace mln
++n;
return n;
}
-
+
template <typename S>
inline
unsigned set_card_dispatch_(mln::trait::site_set::nsites::known,
@@ -180,7 +181,7 @@ namespace mln
{
return s.nsites();
}
-
+
template <typename S>
inline
unsigned set_card(const Site_Set<S>& s)
diff --git a/milena/tests/unit_test/Makefile.am b/milena/tests/unit_test/Makefile.am
index c8fc350..a3c3035 100644
--- a/milena/tests/unit_test/Makefile.am
+++ b/milena/tests/unit_test/Makefile.am
@@ -814,13 +814,11 @@ mln_core_concept_weighted_window \
mln_core_concept_all \
mln_core_concept_gpoint \
mln_core_concept_site_iterator \
-mln_core_concept_window_LOCAL_2903.cc \
mln_core_concept_point \
mln_core_concept_literal \
mln_core_concept_pixel_iterator \
mln_core_concept_value_iterator \
mln_core_concept_meta_accumulator \
-mln_core_concept_window_BASE_2903.cc \
mln_core_concept_gdpoint \
mln_core_concept_regular_grid \
mln_core_concept_mesh \
@@ -834,7 +832,6 @@ mln_core_concept_object \
mln_core_concept_meta_fun \
mln_core_concept_delta_point_site \
mln_core_concept_neighborhood \
-mln_core_concept_window_REMOTE_2903.cc \
mln_core_concept_browsing \
mln_core_pixel \
mln_core_clock_neighb2d \
@@ -1820,13 +1817,11 @@ mln_core_concept_weighted_window_SOURCES = mln_core_concept_weighted_window.cc
mln_core_concept_all_SOURCES = mln_core_concept_all.cc
mln_core_concept_gpoint_SOURCES = mln_core_concept_gpoint.cc
mln_core_concept_site_iterator_SOURCES = mln_core_concept_site_iterator.cc
-mln_core_concept_window_LOCAL_2903_SOURCES = mln_core_concept_window.cc_LOCAL_2903.cc
mln_core_concept_point_SOURCES = mln_core_concept_point.cc
mln_core_concept_literal_SOURCES = mln_core_concept_literal.cc
mln_core_concept_pixel_iterator_SOURCES = mln_core_concept_pixel_iterator.cc
mln_core_concept_value_iterator_SOURCES = mln_core_concept_value_iterator.cc
mln_core_concept_meta_accumulator_SOURCES = mln_core_concept_meta_accumulator.cc
-mln_core_concept_window_BASE_2903_SOURCES = mln_core_concept_window.cc_BASE_2903.cc
mln_core_concept_gdpoint_SOURCES = mln_core_concept_gdpoint.cc
mln_core_concept_regular_grid_SOURCES = mln_core_concept_regular_grid.cc
mln_core_concept_mesh_SOURCES = mln_core_concept_mesh.cc
@@ -1840,7 +1835,6 @@ mln_core_concept_object_SOURCES = mln_core_concept_object.cc
mln_core_concept_meta_fun_SOURCES = mln_core_concept_meta_fun.cc
mln_core_concept_delta_point_site_SOURCES = mln_core_concept_delta_point_site.cc
mln_core_concept_neighborhood_SOURCES = mln_core_concept_neighborhood.cc
-mln_core_concept_window_REMOTE_2903_SOURCES = mln_core_concept_window.cc_REMOTE_2903.cc
mln_core_concept_browsing_SOURCES = mln_core_concept_browsing.cc
mln_core_pixel_SOURCES = mln_core_pixel.cc
mln_core_clock_neighb2d_SOURCES = mln_core_clock_neighb2d.cc
--
1.5.6.5
1
0
3085: Propagate renaming level::fill/paste as data::fill/paste (again).
by Guillaume Lazzara 29 Dec '08
by Guillaume Lazzara 29 Dec '08
29 Dec '08
* doc/examples/erosion.cc,
* doc/examples/labeling_algo.cc,
* doc/examples/tuto_bis.cc,
* doc/oldies/2008__tour1.cc,
* doc/oldies/2008__tour3.cc,
* doc/tutorial/examples/box.cc,
* doc/tutorial/examples/for_Z.cc,
* doc/tutorial/examples/image_safe.cc,
* doc/tutorial/examples/p_array.2.cc,
* doc/tutorial/examples/p_array.cc,
* doc/tutorial/examples/p_image.cc,
* doc/tutorial/examples/p_key.cc,
* doc/tutorial/examples/p_line2d.cc,
* doc/tutorial/examples/p_queue.cc,
* doc/tutorial/examples/p_vaccess.cc,
* doc/tutorial/examples/proxy.cc,
* doc/tutorial/examples/sub_image_if.cc,
* tools/seed2tiling.cc: update
---
milena/ChangeLog | 23 ++++++++++++++++++++++
milena/doc/examples/erosion.cc | 6 +---
milena/doc/examples/labeling_algo.cc | 4 +-
milena/doc/examples/tuto_bis.cc | 16 +++++++-------
milena/doc/oldies/2008__tour1.cc | 27 ++++++++++---------------
milena/doc/oldies/2008__tour3.cc | 4 +-
milena/doc/tutorial/examples/box.cc | 4 +-
milena/doc/tutorial/examples/for_Z.cc | 6 ++--
milena/doc/tutorial/examples/image_safe.cc | 8 +++---
milena/doc/tutorial/examples/p_array.2.cc | 6 ++--
milena/doc/tutorial/examples/p_array.cc | 4 +-
milena/doc/tutorial/examples/p_image.cc | 4 +-
milena/doc/tutorial/examples/p_key.cc | 4 +-
milena/doc/tutorial/examples/p_line2d.cc | 6 ++--
milena/doc/tutorial/examples/p_queue.cc | 4 +-
milena/doc/tutorial/examples/p_vaccess.cc | 14 ++++++------
milena/doc/tutorial/examples/proxy.cc | 4 +-
milena/doc/tutorial/examples/sub_image_if.cc | 4 +-
milena/tools/seed2tiling.cc | 9 +++----
19 files changed, 86 insertions(+), 71 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 5936533..c713b83 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,28 @@
2008-12-29 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Propagate renaming level::fill/paste as data::fill/paste (again).
+
+ * doc/examples/erosion.cc,
+ * doc/examples/labeling_algo.cc,
+ * doc/examples/tuto_bis.cc,
+ * doc/oldies/2008__tour1.cc,
+ * doc/oldies/2008__tour3.cc,
+ * doc/tutorial/examples/box.cc,
+ * doc/tutorial/examples/for_Z.cc,
+ * doc/tutorial/examples/image_safe.cc,
+ * doc/tutorial/examples/p_array.2.cc,
+ * doc/tutorial/examples/p_array.cc,
+ * doc/tutorial/examples/p_image.cc,
+ * doc/tutorial/examples/p_key.cc,
+ * doc/tutorial/examples/p_line2d.cc,
+ * doc/tutorial/examples/p_queue.cc,
+ * doc/tutorial/examples/p_vaccess.cc,
+ * doc/tutorial/examples/proxy.cc,
+ * doc/tutorial/examples/sub_image_if.cc,
+ * tools/seed2tiling.cc: update
+
+2008-12-29 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Add forward declarations for all init_() functions.
* core/routine/init.hh: include init.hxx.
diff --git a/milena/doc/examples/erosion.cc b/milena/doc/examples/erosion.cc
index 8d0d51c..7903f6e 100644
--- a/milena/doc/examples/erosion.cc
+++ b/milena/doc/examples/erosion.cc
@@ -39,7 +39,6 @@
# include <mln/binarization/threshold.hh>
# include <mln/morpho/hit_or_miss.hh>
-# include <mln/level/fill.hh>
# include <mln/border/fill.hh>
# include <mln/io/pbm/load.hh>
# include <mln/io/pgm/load.hh>
@@ -49,9 +48,8 @@
# include <mln/morpho/opening.hh>
# include <mln/trait/value_.hh>
# include <mln/value/int_u8.hh>
-# include <mln/level/paste.hh>
+# include <mln/data/paste.hh>
# include <mln/labeling/blobs.hh>
-# include <mln/level/fill.hh>
# include <mln/pw/all.hh>
# include <mln/convert/to_fun.hh>
# include <mln/geom/bbox.hh>
@@ -69,7 +67,7 @@ void clean_lines(mln::image2d<bool>& in,
for (unsigned i = nlabels; i > 0; --i)
{
- level::paste(pw::cst(false)
+ data::paste(pw::cst(false)
| geom::bbox(lbl | (pw::value(lbl) == pw::cst(i))),//.to_larger(bbox_larger),
in);
}
diff --git a/milena/doc/examples/labeling_algo.cc b/milena/doc/examples/labeling_algo.cc
index 6cf27b0..3891e36 100644
--- a/milena/doc/examples/labeling_algo.cc
+++ b/milena/doc/examples/labeling_algo.cc
@@ -33,7 +33,7 @@
# include <mln/core/image/sub_image.hh>
# include <mln/core/alias/neighb2d.hh>
# include <mln/value/int_u8.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
# include <mln/level/stretch.hh>
# include <mln/border/fill.hh>
# include <mln/io/pbm/load.hh>
@@ -60,7 +60,7 @@ int main()
std::vector<int_u8> vec;
image2d<int> input(in.domain());
- level::fill(input, lab);
+ data::fill(input, lab);
opt::at(lab, 0,0) = 0;
image2d<unsigned> inte = geom::seeds2tiling(lab, c4 ());
diff --git a/milena/doc/examples/tuto_bis.cc b/milena/doc/examples/tuto_bis.cc
index 3dd2c09..bfacf7d 100644
--- a/milena/doc/examples/tuto_bis.cc
+++ b/milena/doc/examples/tuto_bis.cc
@@ -18,8 +18,8 @@
# include <mln/fun/i2v/array.hh>
# include <mln/fun/p2v/iota.hh>
-# include <mln/level/paste.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/paste.hh>
+# include <mln/data/fill.hh>
# include <mln/level/transform.hh>
# include <mln/extension/fill.hh>
@@ -144,7 +144,7 @@ int main()
mln_VAR(ima, ima_ | domain);
mln_VAR(cell, ima | is_cell);
- level::fill(cell, fun::p2v::iota());
+ data::fill(cell, fun::p2v::iota());
debug::println(cell);
// 1 2 3
//
@@ -152,7 +152,7 @@ int main()
mln_VAR(edge, extend((ima | is_edge).rw(), ima));
- level::paste(morpho::gradient(edge, e2c.win()), edge);
+ data::paste(morpho::gradient(edge, e2c.win()), edge);
// ^^^
// edge -> neighboring cells
debug::println(edge);
@@ -161,7 +161,7 @@ int main()
// 1 1
image2d<unsigned> label(domain, 0);
- level::fill(label, 9);
+ data::fill(label, 9);
debug::println(label);
// 9 9 9 9 9
// 9 9 9 9 9
@@ -176,7 +176,7 @@ int main()
unsigned nbasins;
- level::fill(wst, morpho::meyer_wst(edge, e2e, nbasins));
+ data::fill(wst, morpho::meyer_wst(edge, e2e, nbasins));
// ^^^
// edge -> neighboring edges
debug::println(wst);
@@ -230,7 +230,7 @@ int main()
// 9 9 9
- level::paste(morpho::dilation(extend(lab, label),
+ data::paste(morpho::dilation(extend(lab, label),
c4().win()),
label);
@@ -263,7 +263,7 @@ int main()
for (unsigned i = 1; i <= nbasins; ++i)
std::cout << "mean value of basin #" << i << " is " << m(i) << std::endl;
-// level::fill(cell, level::transform(lab, m));
+// data::fill(cell, level::transform(lab, m));
// debug::println(cell);
// // 2 2 2
// //
diff --git a/milena/doc/oldies/2008__tour1.cc b/milena/doc/oldies/2008__tour1.cc
index 4d148c8..94e8fcb 100644
--- a/milena/doc/oldies/2008__tour1.cc
+++ b/milena/doc/oldies/2008__tour1.cc
@@ -32,8 +32,8 @@
#include <oln/arith/plus.hh> // arith
-#include <oln/level/fill.hh> // level
-#include <oln/level/paste.hh>
+#include <oln/data/fill.hh> // data
+#include <oln/data/paste.hh>
#include <oln/debug/println.hh> // debug
@@ -166,20 +166,15 @@ int main()
// Memory has been allocated so data can be stored but pixel values
// have not been initialized yet. So we fill img3a, that is, all
// pixels of img3a, with the value 'a':
- level::fill(img3a, 'a');
+ data::fill(img3a, 'a');
- // The "fill" algorithm is located in the sub-namespace "level"
- // since this algorithm deals with the "level" of pixel values.
+ // The "fill" algorithm is located in the sub-namespace "data"
+ // since this algorithm deals with the "data" of pixel values.
- // Note that the term "level" refers to the fact that an
- // image can be considered as a landscape where the
- // elevation at a particular location/point is given by the
- // corresponding pixel value.
-
- // The full name of this routine is "oln::level::fill". To access
+ // The full name of this routine is "oln::data::fill". To access
// to a particular algorithm, the proper file shall be included.
// The file names of algorithms strictly map their C++ name; so
- // oln::level::fill is defined in the file "oln/level/fill.hh".
+ // oln::data::fill is defined in the file "oln/data/fill.hh".
// Most algorithms in Olena are constructed following the classical
// scheme: "output algo(input)", where the input image is only read.
@@ -190,7 +185,7 @@ int main()
// Obsolete: explicitly state that the image is provided so that its data is
// Obsolete: modified "inplace".
- // Obsolete: The algorithm call shall be "level::fill(inplace(ima), val)".
+ // Obsolete: The algorithm call shall be "data::fill(inplace(ima), val)".
// Obsolete: When forgetting the "inplace(..)" statement it does not compile.
@@ -201,10 +196,10 @@ int main()
image1d<char> img3b(5, 14);
// We initialize the image values.
- level::fill(img3b, 'b');
+ data::fill(img3b, 'b');
// Last we now paste the contents of img3b in img3a...
- level::paste(img3b, img3a);
+ data::paste(img3b, img3a);
// ...and print the result.
debug::println(img3a);
@@ -242,7 +237,7 @@ int main()
// tests are performed at run-time to ensure that the program is
// correct.
- // For instance, the algorithm level::paste tests that the set of
+ // For instance, the algorithm data::paste tests that the set of
// points of img3b (whose values are to be pasted) is a subset of
// the destination image. We can reproduce this same test:
diff --git a/milena/doc/oldies/2008__tour3.cc b/milena/doc/oldies/2008__tour3.cc
index 4c6ef19..7d1f63f 100644
--- a/milena/doc/oldies/2008__tour3.cc
+++ b/milena/doc/oldies/2008__tour3.cc
@@ -36,7 +36,7 @@
#include <oln/core/gen/pw_value.hh>
#include <oln/core/gen/fun_ops.hh>
-#include <oln/level/fill.hh>
+#include <oln/data/fill.hh>
#include <oln/debug/fill.hh>
#include <oln/debug/println.hh>
@@ -138,7 +138,7 @@ int main()
// And now for a little test: what is the result of this code?
{
image2d<int> test(ima.points());
- level::fill(test, ima);
+ data::fill(test, ima);
(test + c4).at(1, 1) = 9;
debug::println(test);
}
diff --git a/milena/doc/tutorial/examples/box.cc b/milena/doc/tutorial/examples/box.cc
index 9d4b9d6..7f92bdc 100644
--- a/milena/doc/tutorial/examples/box.cc
+++ b/milena/doc/tutorial/examples/box.cc
@@ -1,6 +1,6 @@
# include <mln/core/image/image2d.hh>
# include <mln/debug/println.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
template <typename B>
@@ -9,7 +9,7 @@ void picture(const B& b)
using namespace mln;
image2d<char> ima(5, 5);
- level::fill(ima, '-');
+ data::fill(ima, '-');
unsigned i = 0;
mln_piter(B) p(b);
diff --git a/milena/doc/tutorial/examples/for_Z.cc b/milena/doc/tutorial/examples/for_Z.cc
index c06fb59..3b34a72 100644
--- a/milena/doc/tutorial/examples/for_Z.cc
+++ b/milena/doc/tutorial/examples/for_Z.cc
@@ -17,7 +17,7 @@
# include <mln/convert/to_fun.hh>
# include <mln/debug/println.hh>
# include <mln/labeling/blobs.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
# include <mln/geom/bbox.hh>
@@ -205,9 +205,9 @@ int main()
// image2d<rgb8> cool(ima.domain());
-// level::fill(cool, literal::black);
+// data::fill(cool, literal::black);
-// level::fill( (cool | (pw::value(lab) == 1u)).rw(),
+// data::fill( (cool | (pw::value(lab) == 1u)).rw(),
// literal::red );
// debug::println(cool);
diff --git a/milena/doc/tutorial/examples/image_safe.cc b/milena/doc/tutorial/examples/image_safe.cc
index 158b591..ddad1f9 100644
--- a/milena/doc/tutorial/examples/image_safe.cc
+++ b/milena/doc/tutorial/examples/image_safe.cc
@@ -2,8 +2,8 @@
# include <mln/core/site_set/p_line2d.hh>
# include <mln/core/image/safe.hh>
# include <mln/debug/println.hh>
-# include <mln/level/fill.hh>
-# include <mln/level/paste.hh>
+# include <mln/data/fill.hh>
+# include <mln/data/paste.hh>
# include <mln/pw/all.hh>
@@ -14,10 +14,10 @@ int main()
typedef image2d<int> I;
I ima(3, 3);
- level::fill(ima, 0);
+ data::fill(ima, 0);
safe_image<I> ima_(ima);
- level::paste(pw::cst(8) | p_line2d(point2d(-1,-1),
+ data::paste(pw::cst(8) | p_line2d(point2d(-1,-1),
point2d( 3, 3)),
ima_);
debug::println(ima);
diff --git a/milena/doc/tutorial/examples/p_array.2.cc b/milena/doc/tutorial/examples/p_array.2.cc
index 68d3ab2..182e293 100644
--- a/milena/doc/tutorial/examples/p_array.2.cc
+++ b/milena/doc/tutorial/examples/p_array.2.cc
@@ -3,7 +3,7 @@
# include <mln/core/window.hh>
# include <mln/debug/println.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
template <typename A>
@@ -12,8 +12,8 @@ mln::image2d<char> picture(const A& arr)
using namespace mln;
image2d<char> ima(5, 5);
- level::fill(ima, '-');
-
+ data::fill(ima, '-');
+
unsigned i = 0;
mln_piter(A) p(arr);
for_all(p)
diff --git a/milena/doc/tutorial/examples/p_array.cc b/milena/doc/tutorial/examples/p_array.cc
index 4a94f9b..3a4186a 100644
--- a/milena/doc/tutorial/examples/p_array.cc
+++ b/milena/doc/tutorial/examples/p_array.cc
@@ -1,7 +1,7 @@
# include <mln/core/image/image2d.hh>
# include <mln/core/site_set/p_array.hh>
# include <mln/debug/println.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
template <typename A>
@@ -10,7 +10,7 @@ void picture(const A& arr)
using namespace mln;
image2d<char> ima(5, 5);
- level::fill(ima, '-');
+ data::fill(ima, '-');
unsigned i = 0;
mln_piter(A) p(arr);
diff --git a/milena/doc/tutorial/examples/p_image.cc b/milena/doc/tutorial/examples/p_image.cc
index c360293..462ba61 100644
--- a/milena/doc/tutorial/examples/p_image.cc
+++ b/milena/doc/tutorial/examples/p_image.cc
@@ -2,7 +2,7 @@
# include <mln/core/site_set/p_array.hh>
# include <mln/core/site_set/p_image.hh>
# include <mln/debug/println.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
template <typename A>
@@ -11,7 +11,7 @@ void picture(const A& arr)
using namespace mln;
image2d<char> ima(5, 5);
- level::fill(ima, '-');
+ data::fill(ima, '-');
unsigned i = 0;
mln_piter(A) p(arr);
diff --git a/milena/doc/tutorial/examples/p_key.cc b/milena/doc/tutorial/examples/p_key.cc
index b4292d6..bcf58eb 100644
--- a/milena/doc/tutorial/examples/p_key.cc
+++ b/milena/doc/tutorial/examples/p_key.cc
@@ -1,7 +1,7 @@
# include <mln/core/image/image2d.hh>
# include <mln/core/site_set/p_key.hh>
# include <mln/debug/println.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
# include <mln/fun/v2v/inc.hh>
# include <mln/fun/v2v/dec.hh>
@@ -13,7 +13,7 @@ void picture(const S& s)
using namespace mln;
image2d<char> ima(5, 5);
- level::fill(ima, '-');
+ data::fill(ima, '-');
mln_piter(S) p(s);
for_all(p)
diff --git a/milena/doc/tutorial/examples/p_line2d.cc b/milena/doc/tutorial/examples/p_line2d.cc
index 75bec49..928c908 100644
--- a/milena/doc/tutorial/examples/p_line2d.cc
+++ b/milena/doc/tutorial/examples/p_line2d.cc
@@ -5,7 +5,7 @@
# include <mln/core/site_set/p_set.hh>
# include <mln/core/image/sub_image.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
# include <mln/debug/println.hh>
@@ -15,13 +15,13 @@ int main()
using namespace mln;
image2d<char> ima(6, 11);
- level::fill(ima, '.');
+ data::fill(ima, '.');
p_line2d line(point2d(4,10),
point2d(1,1));
std::cout << line << std::endl;
- level::fill((ima | line).rw(), 'x');
+ data::fill((ima | line).rw(), 'x');
debug::println(ima);
p_set<point2d> s;
diff --git a/milena/doc/tutorial/examples/p_queue.cc b/milena/doc/tutorial/examples/p_queue.cc
index 099fa6d..5701961 100644
--- a/milena/doc/tutorial/examples/p_queue.cc
+++ b/milena/doc/tutorial/examples/p_queue.cc
@@ -2,7 +2,7 @@
# include <mln/core/site_set/p_queue.hh>
# include <mln/core/site_set/p_queue_fast.hh>
# include <mln/debug/println.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
# include <mln/core/site_set/p_priority.hh>
@@ -14,7 +14,7 @@ void picture(const S& s)
using namespace mln;
image2d<char> ima(5, 5);
- level::fill(ima, '-');
+ data::fill(ima, '-');
unsigned i = 0;
mln_piter(S) p(s);
diff --git a/milena/doc/tutorial/examples/p_vaccess.cc b/milena/doc/tutorial/examples/p_vaccess.cc
index 0e0f841..051edfb 100644
--- a/milena/doc/tutorial/examples/p_vaccess.cc
+++ b/milena/doc/tutorial/examples/p_vaccess.cc
@@ -2,8 +2,8 @@
# include <mln/core/alias/neighb2d.hh>
# include <mln/value/int_u8.hh>
-# include <mln/level/fill.hh>
-# include <mln/level/paste.hh>
+# include <mln/data/fill.hh>
+# include <mln/data/paste.hh>
# include <mln/debug/println.hh>
# include <mln/util/timer.hh>
# include <mln/labeling/blobs.hh>
@@ -121,19 +121,19 @@ int main()
{
image2d<int> ima_(arr.bbox());
- level::fill(ima_, 0);
+ data::fill(ima_, 0);
for (unsigned l = 1; l <= nlabels; ++l)
for (unsigned r = 0; r < arr(l).nelements(); ++r)
- level::paste(pw::cst(10 * l + r) | arr(l)[r], ima_);
+ data::paste(pw::cst(10 * l + r) | arr(l)[r], ima_);
debug::println(ima_);
}
{
image2d<int> ima_(arr.bbox());
- level::fill(ima_, 0);
+ data::fill(ima_, 0);
for (unsigned l = 1; l <= nlabels; ++l)
if (arr(l).nsites() > 1)
- level::paste(pw::cst(l) | arr(l), ima_);
+ data::paste(pw::cst(l) | arr(l), ima_);
debug::println(ima_);
}
}
@@ -144,7 +144,7 @@ int main()
// mln_assertion(rs.bbox() == ima.bbox());
// image2d<int_u8> ima_(ima.domain());
-// level::fill(ima_, 0);
+// data::fill(ima_, 0);
// for (unsigned r = 0; r < rs.nelements(); ++r)
// {
// mln_piter_(p_run2d) p(rs[r]);
diff --git a/milena/doc/tutorial/examples/proxy.cc b/milena/doc/tutorial/examples/proxy.cc
index 053a824..0437b1c 100644
--- a/milena/doc/tutorial/examples/proxy.cc
+++ b/milena/doc/tutorial/examples/proxy.cc
@@ -1,7 +1,7 @@
# include <mln/core/image/image2d.hh>
# include <mln/core/site_set/p_array.hh>
# include <mln/debug/println.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
template <typename A>
@@ -10,7 +10,7 @@ void picture(const A& arr)
using namespace mln;
image2d<char> ima(5, 5);
- level::fill(ima, '-');
+ data::fill(ima, '-');
unsigned i = 0;
mln_piter(A) p(arr);
diff --git a/milena/doc/tutorial/examples/sub_image_if.cc b/milena/doc/tutorial/examples/sub_image_if.cc
index 5bcb740..e5a69f3 100644
--- a/milena/doc/tutorial/examples/sub_image_if.cc
+++ b/milena/doc/tutorial/examples/sub_image_if.cc
@@ -11,7 +11,7 @@
# include <mln/labeling/blobs.hh>
# include <mln/geom/bbox.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
# include <mln/debug/println.hh>
@@ -47,7 +47,7 @@ void foo(const I& input)
O output;
initialize(output, input);
- level::fill(output, 9);
+ data::fill(output, 9);
std::cout << geom::bbox(output) << std::endl;
debug::println(output);
diff --git a/milena/tools/seed2tiling.cc b/milena/tools/seed2tiling.cc
index 4ebda1b..3f4efeb 100644
--- a/milena/tools/seed2tiling.cc
+++ b/milena/tools/seed2tiling.cc
@@ -36,7 +36,6 @@
# include <mln/core/image/sub_image.hh>
# include <mln/core/alias/neighb2d.hh>
# include <mln/value/int_u8.hh>
-# include <mln/level/fill.hh>
# include <mln/level/stretch.hh>
# include <mln/border/fill.hh>
# include <mln/io/pbm/load.hh>
@@ -71,22 +70,22 @@ int main(int argc, char* argv[])
image2d<bool> input = io::pbm::load(argv[1]);
{
- const w_window2d_int& w_win = make::mk_chamfer_3x3_int<2,3> ();
+ const w_window2d_int& w_win = make::mk_chamfer_3x3_int<2,3>();
unsigned n;
image2d<unsigned> lab = labeling::foreground(input, c4(), n);
std::cout << "number of labels = " << n << std::endl;
- image2d<unsigned> inte = geom::seeds2tiling(lab, c4 ());
- border::fill (inte, 0);
+ image2d<unsigned> inte = geom::seeds2tiling(lab, c4());
+ border::fill(inte, 0);
image2d<int_u8> inte2 = level::stretch(int_u8(), inte);
io::pgm::save(inte2, "ima1.pgm");
std::cout << "ima1 generate with seeds2tiling"
<< std::endl;
- inte = geom::seeds2tiling_roundness(lab, w_win, max, c4 ());
+ inte = geom::seeds2tiling_roundness(lab, w_win, max, c4());
border::fill(inte, 0);
inte2 = level::stretch(int_u8(), inte);
--
1.5.6.5
1
0