* doc/Doxyfile.in: add more macro definitions.
* mln/data/compute.hh,
* mln/data/convert.hh,
* mln/data/fill_with_image.hh,
* mln/data/fill_with_value.hh,
* mln/data/paste.hh,
* mln/data/stretch.hh,
* mln/data/transform,
* mln/data/transform.hh,
* mln/data/transform_inplace.hh,
* mln/data/update.hh,
* mln/geom/seeds2tiling.hh,
* mln/io/plot/load.hh,
* mln/labeling/compute.hh,
* mln/make/influence_zone_adjacency_graph.hh,
* mln/morpho/reconstruction/by_dilation/all.hh,
* mln/morpho/reconstruction/by_erosion/all.hh,
* mln/morpho/tree/propagate_if.hh,
* mln/morpho/tree/propagate_node.hh,
* mln/set/compute_with_weights.hh,
* mln/util/object_id.hh,
* tests/accu/tuple.cc,
* tests/core/image/dmorph/sub_image.cc,
* tests/io/pbm/pbm_ascii.cc,
* tests/io/pgm/pgm_ascii.cc,
* tests/morpho/Rd.cc: Fix documentation.
---
milena/ChangeLog | 32 +++++++++++
milena/doc/Doxyfile.in | 14 ++++--
milena/mln/data/compute.hh | 6 +-
milena/mln/data/convert.hh | 4 +-
milena/mln/data/fill_with_image.hh | 9 ++--
milena/mln/data/fill_with_value.hh | 10 +++-
milena/mln/data/paste.hh | 4 +-
milena/mln/data/stretch.hh | 8 ++-
milena/mln/data/transform.hh | 16 +++++-
milena/mln/data/transform_inplace.hh | 11 ++++
milena/mln/data/update.hh | 22 ++++++--
milena/mln/geom/seeds2tiling.hh | 22 +++++---
milena/mln/io/plot/load.hh | 6 +-
milena/mln/labeling/compute.hh | 30 ++++++++++-
milena/mln/make/influence_zone_adjacency_graph.hh | 7 +++
.../mln/morpho/reconstruction/by_dilation/all.hh | 2 +-
milena/mln/morpho/reconstruction/by_erosion/all.hh | 2 +-
milena/mln/morpho/tree/propagate_if.hh | 58 ++++++++++----------
milena/mln/morpho/tree/propagate_node.hh | 45 ++++++++--------
milena/mln/set/compute_with_weights.hh | 39 ++++++++++++--
milena/mln/util/object_id.hh | 2 +-
milena/tests/accu/tuple.cc | 10 ++--
milena/tests/core/image/dmorph/sub_image.cc | 2 +-
milena/tests/io/pbm/pbm_ascii.cc | 2 +-
milena/tests/io/pgm/pgm_ascii.cc | 2 +-
milena/tests/morpho/Rd.cc | 2 +-
26 files changed, 260 insertions(+), 107 deletions(-)
create mode 100644 milena/mln/data/transform
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 8c2f8b3..1a2d91b 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,35 @@
+2009-06-08 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+
+ Fix several doxygen warnings.
+
+ * doc/Doxyfile.in: add more macro definitions.
+
+ * mln/data/compute.hh,
+ * mln/data/convert.hh,
+ * mln/data/fill_with_image.hh,
+ * mln/data/fill_with_value.hh,
+ * mln/data/paste.hh,
+ * mln/data/stretch.hh,
+ * mln/data/transform,
+ * mln/data/transform.hh,
+ * mln/data/transform_inplace.hh,
+ * mln/data/update.hh,
+ * mln/geom/seeds2tiling.hh,
+ * mln/io/plot/load.hh,
+ * mln/labeling/compute.hh,
+ * mln/make/influence_zone_adjacency_graph.hh,
+ * mln/morpho/reconstruction/by_dilation/all.hh,
+ * mln/morpho/reconstruction/by_erosion/all.hh,
+ * mln/morpho/tree/propagate_if.hh,
+ * mln/morpho/tree/propagate_node.hh,
+ * mln/set/compute_with_weights.hh,
+ * mln/util/object_id.hh,
+ * tests/accu/tuple.cc,
+ * tests/core/image/dmorph/sub_image.cc,
+ * tests/io/pbm/pbm_ascii.cc,
+ * tests/io/pgm/pgm_ascii.cc,
+ * tests/morpho/Rd.cc: Fix documentation.
+
2009-06-09 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Fix the last couple of warnings with g++-3.3.
diff --git a/milena/doc/Doxyfile.in b/milena/doc/Doxyfile.in
index 1f2e17b..651a2fc 100644
--- a/milena/doc/Doxyfile.in
+++ b/milena/doc/Doxyfile.in
@@ -198,7 +198,12 @@ EXPAND_ONLY_PREDEF = YES
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
-PREDEFINED = "mlc_unqualif(T)=typename
mln::metal::unqualif<T>::ret" \
+PREDEFINED = "for_all(x)=for(x.start(); x.is_valid(); x.next())" \
+ "for_all_2(x1, x2)=for(x1.start(), x2.start(); x1.is_valid(); x1.next(),
x2.next())" \
+ "for_all_3(x1, x2, x3)=for(x1.start(), x2.start(), x3.start(); x1.is_valid();
x1.next(), x2.next(), x3.next())" \
+ "for_all_remaining(x)=if (! x.is_valid()) {} else while (x.next(),
x.is_valid())" \
+ "mlc_unqualif(T)=typename mln::metal::unqualif<T>::ret" \
+ "mlc_equal(T1,T2)=mln::metal::equal<T1,T2>" \
"mln_piter(T)=typename T::piter" \
"mln_fwd_piter(T)=typename T::fwd_piter" \
"mln_bkd_piter(T)=typename T::bkd_piter" \
@@ -226,11 +231,12 @@ PREDEFINED = "mlc_unqualif(T)=typename
mln::metal::unqualif<T>::ret"
"mln_psite(T)=typename T::psite" \
"mln_dpsite(T)=typename T::dpsite" \
"mln_accu_with(A, T)=typename A::template with< T
>::ret" \
- "mln_trait_op_plus(L, R)=typename mln::trait::op::plus<
L , R >::ret" \
- "mln_trait_op_minus(L, R)=typename
mln::trait::op::minus< L , R >::ret" \
- "mln_trait_op_times(L, R)=typename
mln::trait::op::times< L , R >::ret" \
"mln_trait_op_div(L, R)=typename mln::trait::op::div< L
, R >::ret" \
+ "mln_trait_op_less(L, R)=typename mln::trait::op::less<
L , R >::ret" \
+ "mln_trait_op_minus(L, R)=typename
mln::trait::op::minus< L , R >::ret" \
"mln_trait_op_mod(L, R)=typename mln::trait::op::mod< L
, R >::ret" \
+ "mln_trait_op_plus(L, R)=typename mln::trait::op::plus<
L , R >::ret" \
+ "mln_trait_op_times(L, R)=typename
mln::trait::op::times< L , R >::ret" \
"mln_trait_op_uminus(T)=typename mln::trait::op::uminus<
T >::ret" \
"mln_ch_value(I, V)=typename mln::trait::ch_value< I, V >::ret" \
"mlc_unqualif_(T)=mln::metal::unqualif<T>::ret" \
diff --git a/milena/mln/data/compute.hh b/milena/mln/data/compute.hh
index 2177199..53f471f 100644
--- a/milena/mln/data/compute.hh
+++ b/milena/mln/data/compute.hh
@@ -46,15 +46,15 @@ namespace mln
/// Compute an accumulator onto the pixel values of the image \p input.
///
- /// \param[in] a An accumulator.
+ /// \param[in] a_ An accumulator.
/// \param[in] input The input image.
/// \return The accumulator result.
///
/// It fully relies on data::update.
- ///
+ //
template <typename A, typename I>
mln_result(A)
- compute(const Accumulator<A>& a, const Image<I>& input);
+ compute(const Accumulator<A>& a_, const Image<I>& input);
/// Compute an accumulator onto the pixel values of the image \p input.
diff --git a/milena/mln/data/convert.hh b/milena/mln/data/convert.hh
index dea6c58..26ea0ec 100644
--- a/milena/mln/data/convert.hh
+++ b/milena/mln/data/convert.hh
@@ -50,10 +50,10 @@ namespace mln
///
/// \param[in] v A value of the destination type.
/// \param[in] input The input image.
- /// \param[out] output The result image.
+ //
template <typename V, typename I>
mln_ch_value(I, V)
- convert(const V&, const Image<I>& input);
+ convert(const V& v, const Image<I>& input);
diff --git a/milena/mln/data/fill_with_image.hh b/milena/mln/data/fill_with_image.hh
index ea7ac67..ea70da4 100644
--- a/milena/mln/data/fill_with_image.hh
+++ b/milena/mln/data/fill_with_image.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Milena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -57,10 +58,8 @@ namespace mln
///
/// \pre \p ima.domain <= \p data.domain.
///
- /// \{
template <typename I, typename J>
void fill_with_image(Image<I>& ima, const Image<J>& data);
- /// \}
@@ -97,8 +96,8 @@ namespace mln
/// Generic implementation.
///
- /// \param[in,out] ima The image to be filled.
- /// \param[in] data The image.
+ /// \param[in,out] ima_ The image to be filled.
+ /// \param[in] data_ The image.
//
template <typename I, typename J>
void fill_with_image(Image<I>& ima_, const Image<J>& data_)
diff --git a/milena/mln/data/fill_with_value.hh b/milena/mln/data/fill_with_value.hh
index c5c7d3b..4ccd571 100644
--- a/milena/mln/data/fill_with_value.hh
+++ b/milena/mln/data/fill_with_value.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of the Milena Library. This library is free
@@ -93,6 +93,14 @@ namespace mln
namespace generic
{
+ /// Fill the whole image \p ima with the single value \p v.
+ ///
+ /// \param[in,out] ima_ The image to be filled.
+ /// \param[in] val The value to assign to all sites.
+ ///
+ /// \pre \p ima has to be initialized.
+ ///
+ //
template <typename I, typename V>
void fill_with_value(Image<I>& ima_, const V& val)
{
diff --git a/milena/mln/data/paste.hh b/milena/mln/data/paste.hh
index 6a53d17..2ac03fa 100644
--- a/milena/mln/data/paste.hh
+++ b/milena/mln/data/paste.hh
@@ -105,8 +105,8 @@ namespace mln
/// Generic implementation of data::paste.
///
- /// \param[in] input The input image providing pixels values.
- /// \param[in,out] output The image in which values are
+ /// \param[in] input_ The input image providing pixels values.
+ /// \param[in,out] output_ The image in which values are
/// assigned.
//
template <typename I, typename J>
diff --git a/milena/mln/data/stretch.hh b/milena/mln/data/stretch.hh
index 07e3ea6..d0d7a91 100644
--- a/milena/mln/data/stretch.hh
+++ b/milena/mln/data/stretch.hh
@@ -64,7 +64,7 @@ namespace mln
*/
template <typename V, typename I>
mln_ch_value(I, V)
- stretch(V v, const Image<I>& input);
+ stretch(const V& v, const Image<I>& input);
# ifndef MLN_INCLUDE_ONLY
@@ -82,10 +82,11 @@ namespace mln
template <typename V, typename I>
inline
mln_ch_value(I, V)
- stretch(V, const Image<I>& input)
+ stretch(const V& v, const Image<I>& input)
{
trace::entering("data::impl::stretch");
+ (void) v;
mlc_converts_to(float, V)::check();
mln_ch_value(I, V) output;
@@ -126,10 +127,11 @@ namespace mln
template <typename V, typename I>
inline
mln_ch_value(I, V)
- stretch(V, const Image<I>& input)
+ stretch(const V& v, const Image<I>& input)
{
trace::entering("data::stretch");
+ (void) v;
mln_precondition(exact(input).is_valid());
mln_ch_value(I, V) output = impl::stretch(V(), input);
diff --git a/milena/mln/data/transform b/milena/mln/data/transform
new file mode 100644
index 0000000..e69de29
diff --git a/milena/mln/data/transform.hh b/milena/mln/data/transform.hh
index 46c8df3..982deaa 100644
--- a/milena/mln/data/transform.hh
+++ b/milena/mln/data/transform.hh
@@ -131,6 +131,10 @@ namespace mln
{
/// Generic implementation of data::transform.
+ ///
+ /// \param[in] input_ The input image.
+ /// \param[in] f_ The function.
+ //
template <typename I, typename F>
mln_ch_value(I, mln_result(F))
transform(const Image<I>& input_, const Function_v2v<F>& f_)
@@ -154,11 +158,17 @@ namespace mln
}
+ /// Generic implementation of data::transform.
+ ///
+ /// \param[in] input1_ The 1st input image.
+ /// \param[in] input2_ The 2nd input image.
+ /// \param[in] f_ The function.
+ //
template <typename I1, typename I2, typename F>
mln_ch_value(I1, mln_result(F))
- transform(const Image<I1>& input1_,
- const Image<I2>& input2_,
- const Function_vv2v<F>& f_)
+ transform(const Image<I1>& input1_,
+ const Image<I2>& input2_,
+ const Function_vv2v<F>& f_)
{
trace::entering("data::impl::generic::transform");
diff --git a/milena/mln/data/transform_inplace.hh b/milena/mln/data/transform_inplace.hh
index 59afaa8..63bed41 100644
--- a/milena/mln/data/transform_inplace.hh
+++ b/milena/mln/data/transform_inplace.hh
@@ -142,6 +142,11 @@ namespace mln
namespace generic
{
+ /// Generic implementation of transform_inplace.
+ ///
+ /// \param[in,out] ima_ The image to be transformed.
+ /// \param[in] f_ The function.
+ //
template <typename I, typename F>
void
transform_inplace(Image<I>& ima_, const Function_v2v<F>& f_)
@@ -163,6 +168,12 @@ namespace mln
trace::exiting("data::impl::generic::transform_inplace");
}
+ /// Generic implementation of transform_inplace.
+ ///
+ /// \param[in] ima_ The image to be transformed.
+ /// \param[in] aux_ The auxiliary image.
+ /// \param[in] f_ The function.
+ //
template <typename I1, typename I2, typename F>
void
transform_inplace(Image<I1>& ima_, const Image<I2>& aux_,
diff --git a/milena/mln/data/update.hh b/milena/mln/data/update.hh
index 036801a..b62e3b1 100644
--- a/milena/mln/data/update.hh
+++ b/milena/mln/data/update.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Milena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,10 +29,9 @@
#ifndef MLN_LEVEL_UPDATE_HH
# define MLN_LEVEL_UPDATE_HH
-/*! \file mln/data/update.hh
- *
- * \brief Update an accumulator with image pixel values.
- */
+/// \file mln/data/update.hh
+///
+/// \brief Update an accumulator with image pixel values.
# include <mln/core/concept/accumulator.hh>
# include <mln/core/concept/image.hh>
@@ -91,6 +91,12 @@ namespace mln
{
/// Generic implementation of data::update.
+ ///
+ /// \param[in] a_ The accumulator.
+ /// \param[in] input_ The input image.
+ ///
+ /// \return The accumulator result.
+ //
template <typename A, typename I>
inline
mln_result(A)
@@ -114,6 +120,12 @@ namespace mln
/// Fastest implementation of data::update.
+ ///
+ /// \param[in] a_ The accumulator.
+ /// \param[in] input_ The input image.
+ ///
+ /// \return The accumulator result.
+ //
template <typename A, typename I>
inline
mln_result(A)
diff --git a/milena/mln/geom/seeds2tiling.hh b/milena/mln/geom/seeds2tiling.hh
index a9b8f43..c958975 100644
--- a/milena/mln/geom/seeds2tiling.hh
+++ b/milena/mln/geom/seeds2tiling.hh
@@ -60,7 +60,8 @@ namespace mln
/// \pre \p ima_ has to be initialized.
//
template <typename I, typename N>
- I seeds2tiling (Image<I>& ima_, const Neighborhood<N>& nbh);
+ mln_concrete(I) seeds2tiling (const Image<I>& ima_,
+ const Neighborhood<N>& nbh);
# ifndef MLN_INCLUDE_ONLY
@@ -71,18 +72,21 @@ namespace mln
/// Generic implementation of geom::seed2tiling.
///
/// \param[in,out] ima_ The labeled image with seed.
- /// \param[in] nbh The neighborhood to use on this algorithm.
+ /// \param[in] nbh_ The neighborhood to use on this algorithm.
//
template <typename I, typename N>
inline
- I
- seeds2tiling (Image<I>& ima_,
+ mln_concrete(I)
+ seeds2tiling (const Image<I>& ima_,
const Neighborhood<N>& nbh_)
{
trace::entering("geom::impl::seed2tiling");
+ mln_precondition(exact(ima_).is_valid());
+ mln_precondition(exact(nbh_).is_valid());
+
I& ima = exact(ima_);
- I out = duplicate(ima_);
+ mln_concrete(I) out = duplicate(ima_);
const N& nbh = exact(nbh_);
p_queue<mln_psite(I)> q;
@@ -127,15 +131,19 @@ namespace mln
} // end of namespace mln::geom::impl
+
// Facade
+
template <typename I, typename N>
inline
- I seeds2tiling(Image<I>& ima_, const Neighborhood<N>& nbh)
+ mln_concrete(I) seeds2tiling(const Image<I>& ima_, const
Neighborhood<N>& nbh)
{
trace::entering("geom::seed2tiling");
mln_precondition(exact(ima_).is_valid());
- I output = impl::seeds2tiling(ima_, nbh);
+ mln_precondition(exact(nbh).is_valid());
+
+ mln_concrete(I) output = impl::seeds2tiling(ima_, nbh);
trace::exiting("geom::seed2tiling");
return output;
diff --git a/milena/mln/io/plot/load.hh b/milena/mln/io/plot/load.hh
index 86b2cb1..dddd9f5 100644
--- a/milena/mln/io/plot/load.hh
+++ b/milena/mln/io/plot/load.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of the Milena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -62,12 +62,12 @@ namespace mln
void load(image1d<I>& ima,
const std::string& filename);*/
+
+
/*! Load a Milena array from a plot file.
*
* \param[in] arr A reference to the array to load.
* \param[out] filename The output file.
- * \param[in] start_value The start index value of the plot
- * (optional).
*/
template <typename I>
void load(util::array<I>& arr,
diff --git a/milena/mln/labeling/compute.hh b/milena/mln/labeling/compute.hh
index 87934fc..940d1f7 100644
--- a/milena/mln/labeling/compute.hh
+++ b/milena/mln/labeling/compute.hh
@@ -189,6 +189,15 @@ namespace mln
namespace generic
{
+
+ /// Generic implementation of labeling::compute.
+ ///
+ /// \param[in] a_ An accumulator.
+ /// \param[in] label_ The labeled image.
+ /// \param[in] nlabels The number of labels in \p label.
+ ///
+ /// \return A mln::p_array of accumulator result (one result per label).
+ //
template <typename A, typename L>
inline
util::array<mln_result(A)>
@@ -216,6 +225,15 @@ namespace mln
}
+ /// Generic implementation of labeling::compute.
+ ///
+ /// \param[in] a_ An accumulator.
+ /// \param[in] input_ The input image.
+ /// \param[in] label_ The labeled image.
+ /// \param[in] nlabels The number of labels in \p label.
+ ///
+ /// \return A mln::p_array of accumulator result (one result per label).
+ //
template <typename A, typename I, typename L>
inline
util::array<mln_result(A)>
@@ -244,6 +262,16 @@ namespace mln
return res;
}
+
+ /// Generic implementation of labeling::compute.
+ ///
+ /// \param[in] accus An array of accumulators.
+ /// \param[in] input_ The input image.
+ /// \param[in] label_ The labeled image.
+ /// \param[in] nlabels The number of labels in \p label.
+ ///
+ /// \return A mln::p_array of accumulator result (one result per label).
+ //
template <typename A, typename I, typename L>
inline
util::array<mln_result(A)>
@@ -323,7 +351,7 @@ namespace mln
- /// Facades.
+ // Facades.
template <typename A, typename I, typename L>
inline
diff --git a/milena/mln/make/influence_zone_adjacency_graph.hh
b/milena/mln/make/influence_zone_adjacency_graph.hh
index 359feeb..6c64c7d 100644
--- a/milena/mln/make/influence_zone_adjacency_graph.hh
+++ b/milena/mln/make/influence_zone_adjacency_graph.hh
@@ -97,6 +97,13 @@ namespace mln
{
/// Generic implementation of make::influence_zone_adjacency_graph.
+ ///
+ /// \param[in] iz_ influence zone image.
+ /// \param[in] nbh_ A neighborhood.
+ /// \param[in] nlabels number of influence zone in \p iz.
+ ///
+ /// \return util::graph Graph based on the adjacency of the influence zones.
+ //
template <typename I, typename N>
util::graph
influence_zone_adjacency_graph(const Image<I>& iz_,
diff --git a/milena/mln/morpho/reconstruction/by_dilation/all.hh
b/milena/mln/morpho/reconstruction/by_dilation/all.hh
index d83c1a0..20dca34 100644
--- a/milena/mln/morpho/reconstruction/by_dilation/all.hh
+++ b/milena/mln/morpho/reconstruction/by_dilation/all.hh
@@ -29,7 +29,7 @@
# define MLN_MORPHO_RECONSTRUCTION_BY_DILATION_ALL_HH
-/// \file mln/morpho/reconstruction by dilation/all.hh
+/// \file mln/morpho/reconstruction/by_dilation/all.hh
///
/// File that includes all morphological reconstruction by dilation routines.
diff --git a/milena/mln/morpho/reconstruction/by_erosion/all.hh
b/milena/mln/morpho/reconstruction/by_erosion/all.hh
index 5652a6d..8e4a386 100644
--- a/milena/mln/morpho/reconstruction/by_erosion/all.hh
+++ b/milena/mln/morpho/reconstruction/by_erosion/all.hh
@@ -29,7 +29,7 @@
# define MLN_MORPHO_RECONSTRUCTION_BY_EROSION_ALL_HH
-/// \file mln/morpho/reconstruction by erosion/all.hh
+/// \file mln/morpho/reconstruction/by_erosion/all.hh
///
/// File that includes all morphological reconstruction by erosion routines.
diff --git a/milena/mln/morpho/tree/propagate_if.hh
b/milena/mln/morpho/tree/propagate_if.hh
index c9fd40b..89c62a0 100644
--- a/milena/mln/morpho/tree/propagate_if.hh
+++ b/milena/mln/morpho/tree/propagate_if.hh
@@ -29,12 +29,10 @@
#ifndef MLN_MORPHO_TREE_PROPAGATE_IF_HH
# define MLN_MORPHO_TREE_PROPAGATE_IF_HH
-/**
-** \file mln/morpho/tree/propagate_if.hh
-**
-** \brief Routines to handle propagation with predicate.
-**
-*/
+/// \file
+///
+/// \brief Routines to handle propagation with predicate.
+
# include <mln/morpho/tree/data.hh>
# include <mln/morpho/tree/propagate_node.hh>
@@ -56,62 +54,62 @@ namespace mln
struct desc_propagation : way_of_propagation <desc_propagation> {};
struct asc_propagation : way_of_propagation <asc_propagation> {};
- /**
+ /*!
** Propagate nodes checking the predicate \p pred in the way
** defined by \p way_of_propagation.
**
- ** \param tree Component tree used for propagation.
- ** \param a_ Attributed image where values are propagated.
- ** \param way_of_propagation Propagate node in acsendant or
- ** descendant way.
- ** \param pred Predicate that node must check to be propagated.
- ** \param v Value to be propagated. (By default \p v is the value
- ** at the node being propagated).
+ ** \param tree Component tree used for propagation.
+ ** \param a_ Attributed image where values are propagated.
+ ** \param prop_ Propagate node in acsendant or descendant way.
+ ** \param pred_ Predicate that node must check to be propagated.
+ ** \param v Value to be propagated. (By default \p v is the value
+ ** at the node being propagated).
*/
template <typename T, typename A, typename P, typename W>
inline
void
propagate_if(const T& tree,
Image<A>& a_,
- const way_of_propagation<W>&,
- const Function_v2b<P>& pred,
+ const way_of_propagation<W>& prop_,
+ const Function_v2b<P>& pred_,
const mln_value(A)& v);
+ /// \overload
template <typename T, typename A, typename P>
inline
void
propagate_if(const T& tree,
Image<A>& a_,
- const desc_propagation&,
- const Function_v2b<P>& pred);
+ const desc_propagation& prop_,
+ const Function_v2b<P>& pred_);
- /**
+ /*!
** Propagate nodes having the value v in the way
** defined by \p way_of_propagation.
**
- ** \param tree Component tree used for propagation.
- ** \param a_ Attributed image where values are propagated.
- ** \param way_of_propagation Propagate node in acsendant or
- ** descendant way.
- ** \param v Value that node must have to be propagated.
- ** \param v_prop Value to propagate (By default it is the value
- ** at the node being propagated).
+ ** \param tree Component tree used for propagation.
+ ** \param a_ Attributed image where values are propagated.
+ ** \param prop_ Propagate node in acsendant or descendant way.
+ ** \param v Value that node must have to be propagated.
+ ** \param v_prop Value to propagate (By default it is the value at the
+ ** node being propagated).
*/
template <typename T, typename A, typename W>
inline
void
propagate_if_value(const T& tree,
Image<A>& a_,
- const way_of_propagation<W>&,
+ const way_of_propagation<W>& prop_,
const mln_value(A)& v,
const mln_value(A)& v_prop);
+ /// \overload
template <typename T, typename A, typename W>
inline
void
propagate_if_value(const T& tree,
Image<A>& a_,
- const way_of_propagation<W>&,
+ const way_of_propagation<W>& prop,
const mln_value(A)& v);
@@ -259,7 +257,7 @@ namespace mln
} // end of namespace mln::morpho::tree::internal
- /* Facades */
+ // Facades
template <typename T, typename A, typename W>
inline
@@ -291,6 +289,7 @@ namespace mln
internal::propagate_if(tree, a, prop, pw::value(a) == pw::cst(v), v);
}
+
template <typename T, typename A, typename P, typename W>
inline
void
@@ -307,6 +306,7 @@ namespace mln
internal::propagate_if(tree, a, prop, pred, v);
}
+
template <typename T, typename A, typename P>
inline
void
diff --git a/milena/mln/morpho/tree/propagate_node.hh
b/milena/mln/morpho/tree/propagate_node.hh
index f3c1b59..a37af12 100644
--- a/milena/mln/morpho/tree/propagate_node.hh
+++ b/milena/mln/morpho/tree/propagate_node.hh
@@ -37,6 +37,7 @@
///
/// Functions to propagate node in the tree.
+
namespace mln
{
@@ -46,14 +47,14 @@ namespace mln
namespace tree
{
- /**
+ /*!
** Propagate a value \p v from a node \p n to its descendants.
**
- ** \param n[in] Node to propagate.
- ** \param t[in] Component tree used for propagation.
- ** \param a_[in] Attribute image where values are propagated.
- ** \param v[in] Value to propagate.
- ** \param nb_leaves[out] Optional. Store the number of leaves in
+ ** \param[in] n Node to propagate.
+ ** \param[in] t Component tree used for propagation.
+ ** \param[in] a_ Attribute image where values are propagated.
+ ** \param[in] v Value to propagate.
+ ** \param[out] nb_leaves Optional. Store the number of leaves in
** the component.
*/
template <typename T, typename A>
@@ -64,13 +65,13 @@ namespace mln
const mln_value(A)& v,
unsigned* nb_leaves = 0);
- /**
+ /*!
** Propagate the node's value to its descendants.
**
- ** \param n[in] Node to propagate.
- ** \param t[in] Component tree used for propagation.
- ** \param a_[in] Attribute image where values are propagated.
- ** \param nb_leaves[out] Optional. Store the number of leaves in
+ ** \param[in] n Node to propagate.
+ ** \param[in] t Component tree used for propagation.
+ ** \param[in] a_ Attribute image where values are propagated.
+ ** \param[out] nb_leaves Optional. Store the number of leaves in
** the component.
*/
template <typename T, typename A>
@@ -82,13 +83,13 @@ namespace mln
unsigned* nb_leaves = 0);
- /**
+ /*!
** Propagate a value \p v from a node \p n to its ancestors.
**
- ** \param n Node to propagate.
- ** \param t Component tree used for propagation.
- ** \param a_ Attribute image where values are propagated.
- ** \param v Value to propagate.
+ ** \param[in] n Node to propagate.
+ ** \param[in] t Component tree used for propagation.
+ ** \param[in] a_ Attribute image where values are propagated.
+ ** \param[in] v Value to propagate.
*/
template <typename T, typename A>
void
@@ -97,12 +98,12 @@ namespace mln
Image<A>& a_,
const mln_value(A)& v);
- /**
+ /*!
** Propagate the node's value to its ancestors.
**
- ** \param n Node to propagate.
- ** \param t Component tree used for propagation.
- ** \param a_ Attribute image where values are propagated.
+ ** \param[in] n Node to propagate.
+ ** \param[in] t Component tree used for propagation.
+ ** \param[in,out] a_ Attribute image where values are propagated.
*/
template <typename T, typename A>
inline
@@ -112,7 +113,7 @@ namespace mln
Image<A>& a_);
- # ifndef MLN_INCLUDE_ONLY
+# ifndef MLN_INCLUDE_ONLY
/* Descendants propagation */
@@ -204,7 +205,7 @@ namespace mln
propagate_node_to_ancestors(n, t, a, a(n));
}
- # endif // ! MLN_INCLUDE_ONLY
+# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::morpho::tree
diff --git a/milena/mln/set/compute_with_weights.hh
b/milena/mln/set/compute_with_weights.hh
index 8ab828b..dfe4eda 100644
--- a/milena/mln/set/compute_with_weights.hh
+++ b/milena/mln/set/compute_with_weights.hh
@@ -59,6 +59,15 @@ namespace mln
compute_with_weights(const Accumulator<A>& a, const Image<I>&
w);
+ /// Compute an accumulator on every labeled sub-site-sets.
+ ///
+ /// \param[in] a An accumulator.
+ /// \param[in] w An image of weights (a site -> a weight).
+ /// \param[in] label A label image.
+ /// \param[in] nlabels The number of labels in \p label.
+ ///
+ /// \return An array of accumulator result. One per label.
+ //
template <typename A, typename I, typename L>
util::array<mln_result(A)>
compute_with_weights(const Accumulator<A>& a,
@@ -70,9 +79,9 @@ namespace mln
/// Compute an accumulator on a site set described by an image.
///
/// \param[in] a A meta-accumulator.
- /// \param[in] s A site set.
- // \return The accumulator result.
- ///
+ /// \param[in] w An image of weights (a site -> a weight).
+ /// \return The accumulator result.
+ //
template <typename A, typename I>
mln_accu_with(A, mln_site(I))::result
compute_with_weights(const Meta_Accumulator<A>& a, const
Image<I>& w);
@@ -97,11 +106,11 @@ namespace mln
const A& a = exact(a_);
const I& w = exact(w_);
const L& label = exact(label_);
-
+
mln_precondition(w.is_valid());
mln_precondition(label.is_valid());
mln_precondition(w.domain() <= label.domain());
-
+
(void) a;
(void) w;
(void) label;
@@ -120,6 +129,14 @@ namespace mln
namespace generic
{
+ /// Generic implementation that Computes an accumulator on a site
+ /// set described by an image.
+ ///
+ /// \param[in] a_ An accumulator.
+ /// \param[in] w_ An image of weights (a site -> a weight).
+ ///
+ /// \return The accumulator result.
+ //
template <typename A, typename I>
inline
mln_result(A)
@@ -142,6 +159,18 @@ namespace mln
return a.to_result();
}
+
+
+ /// Generic implementation that computes an accumulator on every
+ /// labeled sub-site-sets.
+ ///
+ /// \param[in] a_ An accumulator.
+ /// \param[in] w_ An image of weights (a site -> a weight).
+ /// \param[in] label_ A label image.
+ /// \param[in] nlabels The number of labels in \p label.
+ ///
+ /// \return An array of accumulator result. One per label.
+ //
template <typename A, typename I, typename L>
util::array<mln_result(A)>
compute_with_weights(const Accumulator<A>& a_,
diff --git a/milena/mln/util/object_id.hh b/milena/mln/util/object_id.hh
index 48dd4f2..9a5f69e 100644
--- a/milena/mln/util/object_id.hh
+++ b/milena/mln/util/object_id.hh
@@ -30,7 +30,7 @@
#ifndef MLN_UTIL_OBJECT_ID_HH
# define MLN_UTIL_OBJECT_ID_HH
-/// \file mln/core/concept/object_id.hh
+/// \file mln/util/object_id.hh
///
/// Base class of an object id.
diff --git a/milena/tests/accu/tuple.cc b/milena/tests/accu/tuple.cc
index 967765c..ed30f92 100644
--- a/milena/tests/accu/tuple.cc
+++ b/milena/tests/accu/tuple.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Milena 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/accu/tuple.cc
- *
- * \brief Tests on mln::accu::tuple.
- */
+/// \file tests/accu/tuple.cc
+///
+/// \brief Tests on mln::accu::tuple.
#include <iostream>
diff --git a/milena/tests/core/image/dmorph/sub_image.cc
b/milena/tests/core/image/dmorph/sub_image.cc
index 0969516..fa0373c 100644
--- a/milena/tests/core/image/dmorph/sub_image.cc
+++ b/milena/tests/core/image/dmorph/sub_image.cc
@@ -26,7 +26,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/core/image/sub_image.cc
+/// \file tests/core/image/dmorph/sub_image.cc
///
/// Tests on mln::sub_image.
diff --git a/milena/tests/io/pbm/pbm_ascii.cc b/milena/tests/io/pbm/pbm_ascii.cc
index 43bab66..c5c3e54 100644
--- a/milena/tests/io/pbm/pbm_ascii.cc
+++ b/milena/tests/io/pbm/pbm_ascii.cc
@@ -26,7 +26,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/io/pbm/pbm_asci.cc
+/// \file tests/io/pbm/pbm_ascii.cc
///
/// Test on mln::io::pbm::load and mln::io::pbm::save.
diff --git a/milena/tests/io/pgm/pgm_ascii.cc b/milena/tests/io/pgm/pgm_ascii.cc
index a086eb0..70fbdfe 100644
--- a/milena/tests/io/pgm/pgm_ascii.cc
+++ b/milena/tests/io/pgm/pgm_ascii.cc
@@ -26,7 +26,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/io/pgm/pgm_asci.cc
+/// \file tests/io/pgm/pgm_ascii.cc
///
/// Test on mln::io::pgm::load and mln::io::pgm::save.
diff --git a/milena/tests/morpho/Rd.cc b/milena/tests/morpho/Rd.cc
index b336586..b331732 100644
--- a/milena/tests/morpho/Rd.cc
+++ b/milena/tests/morpho/Rd.cc
@@ -26,7 +26,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/morpho/rd.cc
+/// \file tests/morpho/Rd.cc
///
/// Test on mln::morpho::Rd.
--
1.5.6.5