* doc/examples/mk_graph.cc: use int_u16 instead of int_u8.
* mln/debug/colorize.hh,
* mln/debug/draw_graph.hh,
* mln/level/compute.hh,
* mln/literal/zero.hh,
* mln/value/concept/symbolic.hh,
* mln/value/int_u.hh,
* mln/value/internal/value_like.hh: Cleanup comments.
* tests/core/image/graph_image.cc: Fix includes.
---
milena/ChangeLog | 17 +++++++++++++++
milena/doc/examples/mk_graph.cc | 12 +++++-----
milena/mln/debug/colorize.hh | 20 +++++++++--------
milena/mln/debug/draw_graph.hh | 7 ++---
milena/mln/level/compute.hh | 24 ++++++++++----------
milena/mln/literal/zero.hh | 14 ++++++------
milena/mln/value/concept/symbolic.hh | 12 +++++-----
milena/mln/value/int_u.hh | 35 +++++++++++++++----------------
milena/mln/value/internal/value_like.hh | 34 +++++++++++++----------------
milena/tests/core/image/graph_image.cc | 2 +-
10 files changed, 95 insertions(+), 82 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 3dfa998..7c72bd2 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,22 @@
2008-11-20 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Cleanup various files.
+
+ * doc/examples/mk_graph.cc: use int_u16 instead of int_u8.
+
+ * mln/debug/colorize.hh,
+ * mln/debug/draw_graph.hh,
+ * mln/level/compute.hh,
+ * mln/literal/zero.hh,
+ * mln/value/concept/symbolic.hh,
+ * mln/value/int_u.hh,
+ * mln/value/internal/value_like.hh: Cleanup comments.
+
+ * tests/core/image/graph_image.cc: Fix includes.
+
+
+2008-11-20 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Update unit tests.
* tests/unit_test/Makefile.am: update list of tests.
diff --git a/milena/doc/examples/mk_graph.cc b/milena/doc/examples/mk_graph.cc
index 18b7a86..eff6433 100644
--- a/milena/doc/examples/mk_graph.cc
+++ b/milena/doc/examples/mk_graph.cc
@@ -47,7 +47,7 @@
int main(int argc, char *argv[])
{
using namespace mln;
- using value::int_u8;
+ using value::int_u16;
if (argc < 2)
{
@@ -59,13 +59,13 @@ int main(int argc, char *argv[])
logical::not_inplace(ima);
// Create a label image and compute the influence zones.
- int_u8 nlabels;
- image2d<int_u8> lbl = labeling::blobs(ima, c8(), nlabels);
+ int_u16 nlabels;
+ image2d<int_u16> lbl = labeling::blobs(ima, c8(), nlabels);
io::ppm::save(debug::colorize< image2d<value::rgb8> >(lbl, nlabels),
"1_blobs.ppm");
- image2d<int_u8> iz = transform::influence_zone_geodesic(lbl,
- c8(),
- lbl.ncols());
+ image2d<int_u16> iz = transform::influence_zone_geodesic(lbl,
+ c8(),
+ lbl.ncols());
io::ppm::save(debug::colorize< image2d<value::rgb8> >(iz, nlabels),
"2_influence_zone_geodesic.ppm");
diff --git a/milena/mln/debug/colorize.hh b/milena/mln/debug/colorize.hh
index c997921..f764278 100644
--- a/milena/mln/debug/colorize.hh
+++ b/milena/mln/debug/colorize.hh
@@ -1,4 +1,5 @@
// 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 +29,9 @@
#ifndef MLN_DEBUG_COLORIZE_HH
# define MLN_DEBUG_COLORIZE_HH
-/*! \file mln/debug/colorize.hh
- *
- * \brief Fill an image with successive values.
- */
+/// \file mln/debug/colorize.hh
+///
+/// Fill an image with successive values.
# include <mln/core/concept/image.hh>
# include <mln/fun/i2v/array.hh>
@@ -64,8 +64,8 @@ namespace mln
* \param[in] labeled_image A labeled image (\sa labeling::blobs).
* \param[in] nlabels Number of labels.
*/
- template <typename I, typename J>
- mln_concrete(I) colorize(const Image<J>& labeled_image, mln_value(J)
nlabels);
+ template <typename I, typename L>
+ mln_concrete(I) colorize(const Image<L>& labeled_image, mln_value(L)
nlabels);
# ifndef MLN_INCLUDE_ONLY
@@ -93,10 +93,10 @@ namespace mln
}
- template <typename I, typename J>
+ template <typename I, typename L>
inline
mln_concrete(I)
- colorize(const Image<J>& input, mln_value(J) nlabels)
+ colorize(const Image<L>& input, mln_value(L) nlabels)
{
trace::entering("debug::colorize");
mln_precondition(exact(input).has_data());
@@ -109,8 +109,10 @@ namespace mln
unsigned i = f.size() + diff_size;
// We want to treat comp 0 differently since it is the background.
if (i == 0)
+ {
i = 1;
- f(0) = literal::black;
+ f(0) = literal::black;
+ }
for (; i < f.size(); ++i)
f(i) = internal::random_color();
}
diff --git a/milena/mln/debug/draw_graph.hh b/milena/mln/debug/draw_graph.hh
index 159b974..a891534 100644
--- a/milena/mln/debug/draw_graph.hh
+++ b/milena/mln/debug/draw_graph.hh
@@ -29,16 +29,15 @@
#ifndef MLN_DEBUG_DRAW_GRAPH_HH
# define MLN_DEBUG_DRAW_GRAPH_HH
-/// \file mln/debug/graph.hh
+/// \file mln/debug/draw_graph.hh
///
/// \brief Draw an (classical) image from a mln::graph_image.
///
/// \todo write a version for graph images.
-# include <mln/pw/image.hh>
-# include <mln/level/fill.hh>
-# include <mln/draw/line.hh>
# include <mln/core/site_set/p_vertices.hh>
+# include <mln/draw/line.hh>
+# include <mln/level/fill.hh>
namespace mln
{
diff --git a/milena/mln/level/compute.hh b/milena/mln/level/compute.hh
index 776ee66..888120f 100644
--- a/milena/mln/level/compute.hh
+++ b/milena/mln/level/compute.hh
@@ -45,24 +45,24 @@ namespace mln
{
/// Compute an accumulator onto the pixel values of the image \p input.
- /*!
- * \param[in] a An accumulator.
- * \param[in] input The input image.
- * \return The accumulator result.
- *
- * It fully relies on level::update.
- */
+ ///
+ /// \param[in] a An accumulator.
+ /// \param[in] input The input image.
+ /// \return The accumulator result.
+ ///
+ /// It fully relies on level::update.
+ ///
template <typename A, typename I>
mln_result(A)
compute(const Accumulator<A>& a, const Image<I>& input);
/// Compute an accumulator onto the pixel values of the image \p input.
- /*!
- * \param[in] a A meta-accumulator.
- * \param[in] input The input image.
- * \return The accumulator result.
- */
+ ///
+ /// \param[in] a A meta-accumulator.
+ /// \param[in] input The input image.
+ /// \return The accumulator result.
+ ///
template <typename A, typename I>
mln_accu_with(A, mln_value(I))::result
compute(const Meta_Accumulator<A>& a, const Image<I>& input);
diff --git a/milena/mln/literal/zero.hh b/milena/mln/literal/zero.hh
index 8762ec1..b6b4e48 100644
--- a/milena/mln/literal/zero.hh
+++ b/milena/mln/literal/zero.hh
@@ -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,11 @@
#ifndef MLN_LITERAL_ZERO_HH
# define MLN_LITERAL_ZERO_HH
-/*! \file mln/literal/zero.hh
- *
- * \brief Definition of the literal of mln::zero.
- *
- * \todo Macro-ification of similar code (when no trivial conversion ops are involved).
- */
+/// \file mln/literal/zero.hh
+///
+/// Definition of the literal of mln::zero.
+///
+/// \todo Macro-ification of similar code (when no trivial conversion ops are involved).
# include <mln/core/concept/literal.hh>
# include <mln/metal/converts_to.hh>
diff --git a/milena/mln/value/concept/symbolic.hh b/milena/mln/value/concept/symbolic.hh
index ad171d9..b4d0d98 100644
--- a/milena/mln/value/concept/symbolic.hh
+++ b/milena/mln/value/concept/symbolic.hh
@@ -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_CONCEPT_SYMBOLIC_HH
# define MLN_VALUE_CONCEPT_SYMBOLIC_HH
-/*! \file mln/value/concept/symbolic.hh
- *
- * \brief Define a generic class for symbolic values.
- */
+/// \file mln/value/concept/symbolic.hh
+///
+/// Define a generic class for symbolic values.
# include <mln/core/concept/value.hh>
@@ -39,7 +39,7 @@
namespace mln
{
- // Fwd decl.
+ // Forward declaration.
namespace value { template <typename E> struct Symbolic; }
diff --git a/milena/mln/value/int_u.hh b/milena/mln/value/int_u.hh
index 10d6526..e5589fe 100644
--- a/milena/mln/value/int_u.hh
+++ b/milena/mln/value/int_u.hh
@@ -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_U_HH
# define MLN_VALUE_INT_U_HH
-/*! \file mln/value/int_u.hh
- *
- * \brief Define a generic class for unsigned integers.
- */
+/// \file mln/value/int_u.hh
+///
+/// Define a generic class for unsigned integers.
# include <mln/trait/all.hh> // FIXME!
@@ -51,13 +51,13 @@ namespace mln
namespace value
{
- // Fwd decls.
+ // Forward declaration.
template <unsigned n> struct int_u;
}
namespace literal
{
- // Fwd decls.
+ // Forward declarations.
struct zero_t;
struct one_t;
}
@@ -104,10 +104,9 @@ namespace mln
namespace value
{
- /*! \brief Unsigned integer value class.
- *
- * The parameter is \c n the number of encoding bits.
- */
+ /// Unsigned integer value class.
+ ///
+ /// The parameter is \c n the number of encoding bits.
template <unsigned n>
struct int_u
:
@@ -154,13 +153,13 @@ namespace mln
- /*! \brief Print an unsigned integer \p i into the output stream \p ostr.
- *
- * \param[in,out] ostr An output stream.
- * \param[in] i An unsigned integer.
- *
- * \return The modified output stream \p ostr.
- */
+ /// \brief Print an unsigned integer \p i into the output stream \p ostr.
+ ///
+ /// \param[in,out] ostr An output stream.
+ /// \param[in] i An unsigned integer.
+ ///
+ /// \return The modified output stream \p ostr.
+ ///
template <unsigned n>
std::ostream& operator<<(std::ostream& ostr, const int_u<n>&
i);
diff --git a/milena/mln/value/internal/value_like.hh
b/milena/mln/value/internal/value_like.hh
index 7a52e80..6159ee5 100644
--- a/milena/mln/value/internal/value_like.hh
+++ b/milena/mln/value/internal/value_like.hh
@@ -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,9 @@
#ifndef MLN_VALUE_INTERNAL_VALUE_LIKE_HH
# define MLN_VALUE_INTERNAL_VALUE_LIKE_HH
-/*! \file mln/value/internal/value_like.hh
- *
- * \brief Factor code for value classes defined over another type.
- *
- *
- */
+/// \file mln/value/internal/value_like.hh
+///
+/// Factor code for value classes defined over another type.
# include <mln/core/concept/value.hh>
# include <mln/core/internal/force_exact.hh>
@@ -48,10 +46,10 @@ namespace mln
namespace internal
{
- /*! Base class for value classes defined over another
- * type. Parameters are \c V the equivalent value type and
- * \c E the exact value type.
- */
+ /// Base class for value classes defined over another
+ /// type. Parameters are \c V the equivalent value type and
+ /// \c E the exact value type.
+ ///
template < typename V, // Equivalent.
typename C, // Encoding.
typename N, // Interoperation.
@@ -85,18 +83,16 @@ namespace mln
};
- /*! General definition of the "equal to" operator between
- * value-like types.
- *
- */
+ /// General definition of the "equal to" operator between
+ /// value-like types.
+ ///
template <typename V, typename C, typename N, typename E>
bool operator==(const value_like_<V,C,N,E>& lhs, const
value_like_<V,C,N,E>& rhs);
- /*! General definition of the "less than" operator
- * between value-like types.
- *
- */
+ /// General definition of the "less than" operator
+ /// between value-like types.
+ ///
template <typename V, typename C, typename N, typename E>
bool operator<(const value_like_<V,C,N,E>& lhs, const
value_like_<V,C,N,E>& rhs);
diff --git a/milena/tests/core/image/graph_image.cc
b/milena/tests/core/image/graph_image.cc
index 9fc556c..3614807 100644
--- a/milena/tests/core/image/graph_image.cc
+++ b/milena/tests/core/image/graph_image.cc
@@ -49,7 +49,7 @@
#include <mln/util/graph.hh>
-#include <mln/debug/graph.hh>
+#include <mln/debug/draw_graph.hh>
#include <mln/debug/println.hh>
#include <mln/core/concept/function.hh>
--
1.5.6.5