2861: Various small fixes.
* mln/accu/all.hh, * mln/accu/bbox.hh, * mln/accu/compute.hh, * mln/accu/convolve.hh, * mln/accu/count.hh, * mln/accu/count_adjacent_vertices.hh, * mln/accu/essential.hh, * mln/accu/height.hh, * mln/accu/histo.hh, * mln/accu/internal/base.hh, * mln/accu/land.hh, * mln/accu/line.hh, * mln/accu/maj_h.hh, * mln/accu/max.hh, * mln/accu/max_h.hh, * mln/accu/mean.hh, * mln/accu/median_alt.hh, * mln/accu/median_h.hh, * mln/accu/min.hh, * mln/accu/min_h.hh, * mln/accu/min_max.hh, * mln/accu/nil.hh, * mln/accu/p.hh, * mln/accu/pair.hh, * mln/accu/rank.hh, * mln/accu/rank_bool.hh, * mln/accu/rank_high_quant.hh, * mln/accu/snake_2d.hh, * mln/accu/sum.hh, * mln/accu/take.hh, * mln/accu/transform.hh, * mln/accu/tuple.hh, * mln/accu/v.hh, * mln/accu/volume.hh: Update comments and add missing unmeta. * mln/morpho/elementary/like_ero_fun.hh, * mln/algebra/quat.hh: Fix warnings. * mln/geom/essential.hh, * mln/value/essential.hh: Fix includes. * tests/accu/rank.cc: Use a new constructor for accu::meta::rank. --- milena/ChangeLog | 47 ++++++++++++++++++++++++++ milena/mln/accu/all.hh | 19 +++++----- milena/mln/accu/bbox.hh | 13 +++---- milena/mln/accu/compute.hh | 8 ++-- milena/mln/accu/convolve.hh | 17 ++++----- milena/mln/accu/count.hh | 6 ++-- milena/mln/accu/count_adjacent_vertices.hh | 6 ++-- milena/mln/accu/essential.hh | 10 ++--- milena/mln/accu/height.hh | 17 +++++---- milena/mln/accu/histo.hh | 20 +++++----- milena/mln/accu/internal/base.hh | 15 ++++---- milena/mln/accu/land.hh | 10 +++--- milena/mln/accu/line.hh | 2 +- milena/mln/accu/maj_h.hh | 14 ++++---- milena/mln/accu/max.hh | 16 ++++----- milena/mln/accu/max_h.hh | 14 +++---- milena/mln/accu/mean.hh | 17 ++++----- milena/mln/accu/median_alt.hh | 26 ++++++++++---- milena/mln/accu/median_h.hh | 20 +++++------ milena/mln/accu/min.hh | 4 +- milena/mln/accu/min_h.hh | 18 ++++------ milena/mln/accu/min_max.hh | 17 ++++----- milena/mln/accu/nil.hh | 16 ++++----- milena/mln/accu/p.hh | 16 ++++----- milena/mln/accu/pair.hh | 22 ++++++------ milena/mln/accu/rank.hh | 12 ++++-- milena/mln/accu/rank_bool.hh | 22 +++++------ milena/mln/accu/rank_high_quant.hh | 25 ++++++++++--- milena/mln/accu/snake_2d.hh | 2 +- milena/mln/accu/sum.hh | 12 +++--- milena/mln/accu/take.hh | 14 ++++---- milena/mln/accu/transform.hh | 10 +++--- milena/mln/accu/tuple.hh | 14 ++++---- milena/mln/accu/v.hh | 19 +++++----- milena/mln/accu/volume.hh | 15 ++++---- milena/mln/algebra/quat.hh | 1 + milena/mln/geom/essential.hh | 10 +++++ milena/mln/morpho/elementary/like_ero_fun.hh | 2 +- milena/mln/value/essential.hh | 4 +- milena/tests/accu/rank.cc | 4 +-- 40 files changed, 309 insertions(+), 247 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 7b16037..2e64654 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,52 @@ 2008-11-12 Guillaume Lazzara <z@lrde.epita.fr> + Various small fixes. + + * mln/accu/all.hh, + * mln/accu/bbox.hh, + * mln/accu/compute.hh, + * mln/accu/convolve.hh, + * mln/accu/count.hh, + * mln/accu/count_adjacent_vertices.hh, + * mln/accu/essential.hh, + * mln/accu/height.hh, + * mln/accu/histo.hh, + * mln/accu/internal/base.hh, + * mln/accu/land.hh, + * mln/accu/line.hh, + * mln/accu/maj_h.hh, + * mln/accu/max.hh, + * mln/accu/max_h.hh, + * mln/accu/mean.hh, + * mln/accu/median_alt.hh, + * mln/accu/median_h.hh, + * mln/accu/min.hh, + * mln/accu/min_h.hh, + * mln/accu/min_max.hh, + * mln/accu/nil.hh, + * mln/accu/p.hh, + * mln/accu/pair.hh, + * mln/accu/rank.hh, + * mln/accu/rank_bool.hh, + * mln/accu/rank_high_quant.hh, + * mln/accu/snake_2d.hh, + * mln/accu/sum.hh, + * mln/accu/take.hh, + * mln/accu/transform.hh, + * mln/accu/tuple.hh, + * mln/accu/v.hh, + * mln/accu/volume.hh: Update comments and add missing unmeta. + + * mln/morpho/elementary/like_ero_fun.hh, + * mln/algebra/quat.hh: Fix warnings. + + * mln/geom/essential.hh, + * mln/value/essential.hh: Fix includes. + + * tests/accu/rank.cc: Use a new constructor for accu::meta::rank. + +2008-11-12 Guillaume Lazzara <z@lrde.epita.fr> + Update tutorial. * doc/Doxyfile.in: Add new example/include paths. diff --git a/milena/mln/accu/all.hh b/milena/mln/accu/all.hh index 76b09d9..6f9e7a5 100644 --- a/milena/mln/accu/all.hh +++ b/milena/mln/accu/all.hh @@ -29,16 +29,15 @@ #ifndef MLN_ACCU_ALL_HH # define MLN_ACCU_ALL_HH -/*! \file mln/accu/all.hh - * - * \brief File that includes all accumulator types. - * - * \todo Update accumulators s.a. count so that they are like min_/min. - * - * \todo Propagate those updates to mln/estim/. - * - * \todo Update the include list... - */ +/// \file mln/accu/all.hh +/// +/// File that includes all accumulator types. +/// +/// \todo Update accumulators s.a. count so that they are like min_/min. +/// +/// \todo Propagate those updates to mln/estim/. +/// +/// \todo Update the include list... namespace mln diff --git a/milena/mln/accu/bbox.hh b/milena/mln/accu/bbox.hh index 4066428..90c2e5d 100644 --- a/milena/mln/accu/bbox.hh +++ b/milena/mln/accu/bbox.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007, 2008 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 +28,9 @@ #ifndef MLN_ACCU_BBOX_HH # define MLN_ACCU_BBOX_HH -/*! \file mln/accu/bbox.hh - * - * \brief Define an accumulator that computes a bbox. - */ +/// \file mln/accu/bbox.hh +/// +/// Define an accumulator that computes a bbox. # include <mln/core/site_set/box.hh> # include <mln/core/concept/meta_accumulator.hh> @@ -45,8 +44,8 @@ namespace mln { - /*! \brief Generic bbox accumulator class. - * + /// Generic bbox accumulator class. + /*! * The parameter \c P is the type of points. */ template <typename P> diff --git a/milena/mln/accu/compute.hh b/milena/mln/accu/compute.hh index ad40de3..3da8d5f 100644 --- a/milena/mln/accu/compute.hh +++ b/milena/mln/accu/compute.hh @@ -47,8 +47,8 @@ namespace mln namespace accu { - /*! \brief Make an accumulator compute the pixels of the image \p input. - * + /// Make an accumulator compute the pixels of the image \p input. + /*! * \param[in] input The input image. * * This routine runs: \n @@ -62,8 +62,8 @@ namespace mln compute(const Accumulator<A>& a, const Image<I>& input); - /*! \brief Make an accumulator compute the pixels of the image \p input. - * + /// Make an accumulator compute the pixels of the image \p input. + /*! * \param[in] input The input image. * * This routine runs: \n diff --git a/milena/mln/accu/convolve.hh b/milena/mln/accu/convolve.hh index bad43c7..91db932 100644 --- a/milena/mln/accu/convolve.hh +++ b/milena/mln/accu/convolve.hh @@ -28,10 +28,9 @@ #ifndef MLN_ACCU_CONVOLVE_HH # define MLN_ACCU_CONVOLVE_HH -/*! \file mln/accu/convolve.hh - * - * \brief Define an accumulator that computes a convolution. - */ +/// \file mln/accu/convolve.hh +/// +/// Define an accumulator that computes a convolution. # include <mln/accu/internal/base.hh> # include <mln/value/ops.hh> @@ -45,11 +44,11 @@ namespace mln { - /*! \brief Generic convolution accumulator class. - * - * Parameters \c T1 and \c T2 are the type of values to be - * convolved. Parameter \c R is the result type. - */ + /// Generic convolution accumulator class. + /// + /// Parameters \c T1 and \c T2 are the type of values to be + /// convolved. Parameter \c R is the result type. + /// template <typename T1, typename T2, typename R = mln_sum_x(T1, T2)> struct convolve : public mln::accu::internal::base< R, convolve<T1,T2,R> >, diff --git a/milena/mln/accu/count.hh b/milena/mln/accu/count.hh index da5fd21..9d68fec 100644 --- a/milena/mln/accu/count.hh +++ b/milena/mln/accu/count.hh @@ -31,7 +31,7 @@ /// \file mln/accu/count.hh /// -/// \brief Define an accumulator that counts. +/// Define an accumulator that counts. # include <mln/accu/internal/base.hh> # include <mln/core/concept/meta_accumulator.hh> @@ -43,7 +43,7 @@ namespace mln namespace accu { - /// \brief Generic counter accumulator class. + /// Generic counter accumulator class. /// The parameter \a T is the type to be count. template <typename T> struct count : public mln::accu::internal::base< unsigned , count<T> > @@ -81,7 +81,7 @@ namespace mln namespace meta { - /// \brief Meta accumulator for count. + /// Meta accumulator for count. struct count : public Meta_Accumulator< count > { template <typename T> diff --git a/milena/mln/accu/count_adjacent_vertices.hh b/milena/mln/accu/count_adjacent_vertices.hh index 69e8530..6d32509 100644 --- a/milena/mln/accu/count_adjacent_vertices.hh +++ b/milena/mln/accu/count_adjacent_vertices.hh @@ -30,7 +30,7 @@ # define MLN_ACCU_COUNT_ADJACENT_VERTICES_HH /// \file mln/accu/count_adjacent_vertices.hh -/// \brief Define an accumulator that counts the vertices adjacent to a +/// Define an accumulator that counts the vertices adjacent to a /// set of line graph psite. # include <mln/accu/internal/base.hh> @@ -44,7 +44,7 @@ namespace mln namespace accu { - /// \brief Accumulator class counting the number of vertices + /// Accumulator class counting the number of vertices /// adjacent to a set of mln::line_graph_psite (i.e., a set of /// edges). /// @@ -90,7 +90,7 @@ namespace mln namespace meta { - /// \brief Meta accumulator for count_adjacent_vertices. + /// Meta accumulator for count_adjacent_vertices. struct count_adjacent_vertices : public Meta_Accumulator< count_adjacent_vertices > { diff --git a/milena/mln/accu/essential.hh b/milena/mln/accu/essential.hh index 34124ba..18498f2 100644 --- a/milena/mln/accu/essential.hh +++ b/milena/mln/accu/essential.hh @@ -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,11 +28,9 @@ #ifndef MLN_ACCU_ESSENTIAL_HH_ # define MLN_ACCU_ESSENTIAL_HH_ -/*! \file mln/accu/essential.hh - * - * \brief File that includes the most useful accumulator types. - * - */ +/// \file mln/accu/essential.hh +/// +/// File that includes the most useful accumulator types. # include <mln/accu/bbox.hh> # include <mln/accu/count.hh> diff --git a/milena/mln/accu/height.hh b/milena/mln/accu/height.hh index f3dc59b..90eead5 100644 --- a/milena/mln/accu/height.hh +++ b/milena/mln/accu/height.hh @@ -29,17 +29,18 @@ #ifndef MLN_ACCU_HEIGHT_HH # define MLN_ACCU_HEIGHT_HH -/** \file mln/accu/height.hh - \brief Define an accumulator that computes the height of a - component through one of its pixels. - +/// \file mln/accu/height.hh +/// Define an accumulator that computes the height of a +/// component through one of its pixels. +/* This accumulator uses an mln::util::pix (pixel) to update the height information of the component. The class mln/accu/height is not a general-purpose accumulator; it is used to implement height-based connected filters. \see mln::morpho::closing_height - \see mln::morpho::opening_height */ + \see mln::morpho::opening_height +*/ # include <mln/accu/internal/base.hh> # include <mln/core/concept/meta_accumulator.hh> @@ -54,7 +55,7 @@ namespace mln namespace accu { - /// \brief Height accumulator class. + /// Height accumulator class. /// /// The parameter \p I is the image type on which the accumulator /// of pixels is built. @@ -62,7 +63,7 @@ namespace mln struct height : public mln::accu::internal::base< unsigned , height<I> > { - /// \brief The accumulated data type. + /// The accumulated data type. /// /// The height of component is represented by the height of its /// root pixel. See mln::morpho::closing_height and @@ -104,7 +105,7 @@ namespace mln namespace meta { - /// \brief Meta accumulator for height. + /// Meta accumulator for height. struct height : public Meta_Accumulator< height > { template <typename I> diff --git a/milena/mln/accu/histo.hh b/milena/mln/accu/histo.hh index 8468e4e..d4cc29a 100644 --- a/milena/mln/accu/histo.hh +++ b/milena/mln/accu/histo.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007, 2008 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 +28,12 @@ #ifndef MLN_ACCU_HISTO_HH # define MLN_ACCU_HISTO_HH -/*! \file mln/accu/histo.hh - * - * \brief Define a generic histogram accumulator class. - * - * \todo Use histo::data instead of std::vector! - */ +/// \file mln/accu/histo.hh +/// +/// Define a generic histogram accumulator class. +/// +/// \todo Use histo::data instead of std::vector! + # include <vector> # include <algorithm> @@ -51,9 +51,9 @@ namespace mln { - /*! - * \brief Generic histogram class over a value set with type \c V. - */ + /// + /// Generic histogram class over a value set with type \c V. + /// template <typename V> struct histo : public mln::accu::internal::base<const std::vector<unsigned>& , diff --git a/milena/mln/accu/internal/base.hh b/milena/mln/accu/internal/base.hh index ed9528f..50d38c4 100644 --- a/milena/mln/accu/internal/base.hh +++ b/milena/mln/accu/internal/base.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,11 +29,10 @@ #ifndef MLN_ACCU_INTERNAL_BASE_HH # define MLN_ACCU_INTERNAL_BASE_HH -/*! \file mln/accu/internal/base.hh - * - * \brief Define a base class for implementation of accumulator - * classes. - */ +/// \file mln/accu/internal/base.hh +/// +/// Define a base class for implementation of accumulator +/// classes. # include <mln/core/concept/accumulator.hh> @@ -46,9 +46,8 @@ namespace mln namespace internal { - /*! Generic min accumulator class. - * Base class for implementation of accumulator classes. - */ + /// Generic min accumulator class. + /// Base class for implementation of accumulator classes. template <typename R, typename E> class base : public Accumulator<E>, public mln::internal::proxy_impl< R, E > diff --git a/milena/mln/accu/land.hh b/milena/mln/accu/land.hh index be7bb4d..c0b0171 100644 --- a/milena/mln/accu/land.hh +++ b/milena/mln/accu/land.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007, 2008 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 +28,10 @@ #ifndef MLN_ACCU_LAND_HH # define MLN_ACCU_LAND_HH -/*! \file mln/accu/land.hh - * - * \brief Define a 'logical-and' accumulator. - */ +/// \file mln/accu/land.hh +/// +/// Define a 'logical-and' accumulator. +/// # include <mln/accu/internal/base.hh> diff --git a/milena/mln/accu/line.hh b/milena/mln/accu/line.hh index cb484d7..f7a3da3 100644 --- a/milena/mln/accu/line.hh +++ b/milena/mln/accu/line.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007, 2008 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 diff --git a/milena/mln/accu/maj_h.hh b/milena/mln/accu/maj_h.hh index ffd545d..f73b216 100644 --- a/milena/mln/accu/maj_h.hh +++ b/milena/mln/accu/maj_h.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007, 2008 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 +28,10 @@ #ifndef MLN_ACCU_MAJ_H_HH # define MLN_ACCU_MAJ_H_HH -/*! \file mln/accu/maj_h.hh - * - * \brief Define an accumulator that computes a maj_h. - */ +/// \file mln/accu/maj_h.hh +/// +/// Define an accumulator that computes a maj_h. + # include <mln/core/concept/meta_accumulator.hh> # include <mln/accu/internal/base.hh> @@ -48,8 +48,8 @@ namespace mln { - /*! \brief Generic maj_h accumulator class. - * + /// Generic maj_h accumulator class. + /*! * The parameter \c T is the type of values. */ template <typename T> diff --git a/milena/mln/accu/max.hh b/milena/mln/accu/max.hh index 0cacbed..99de2e4 100644 --- a/milena/mln/accu/max.hh +++ b/milena/mln/accu/max.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007, 2008 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 +28,9 @@ #ifndef MLN_ACCU_MAX_HH # define MLN_ACCU_MAX_HH -/*! \file mln/accu/max.hh - * - * \brief Define an accumulator that computes a max. - */ +/// \file mln/accu/max.hh +/// +/// Define an accumulator that computes a max. # include <mln/core/concept/meta_accumulator.hh> # include <mln/accu/internal/base.hh> @@ -46,10 +45,9 @@ namespace mln { - /*! \brief Generic max accumulator class. - * - * The parameter \c T is the type of values. - */ + /// Generic max accumulator class. + /// + /// The parameter \c T is the type of values. template <typename T> struct max : public mln::accu::internal::base< const T& , max<T> > { diff --git a/milena/mln/accu/max_h.hh b/milena/mln/accu/max_h.hh index ece814a..dd3a3dc 100644 --- a/milena/mln/accu/max_h.hh +++ b/milena/mln/accu/max_h.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007, 2008 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 +28,9 @@ #ifndef MLN_ACCU_MAX_H_HH # define MLN_ACCU_MAX_H_HH -/*! \file mln/accu/max_h.hh - * - * \brief Define a generic max accumulator class based on histogram. - */ +/// \file mln/accu/max_h.hh +/// +/// Define a generic max accumulator class based on histogram. # include <mln/accu/internal/base.hh> # include <mln/accu/histo.hh> @@ -45,9 +44,8 @@ namespace mln { - /*! \brief Generic max function based on histogram over a value set with - * type \c V. - */ + /// Generic max function based on histogram over a value set with + /// type \c V. template <typename V> struct max_h : public mln::accu::internal::base< const V&, max_h<V> > { diff --git a/milena/mln/accu/mean.hh b/milena/mln/accu/mean.hh index b58c100..c508ce1 100644 --- a/milena/mln/accu/mean.hh +++ b/milena/mln/accu/mean.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007, 2008 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 +28,11 @@ #ifndef MLN_ACCU_MEAN_HH # define MLN_ACCU_MEAN_HH -/*! \file mln/accu/mean.hh - * - * \brief Define an accumulator that computes a mean. - * - * \todo Use accu::pair just like in accu::min_max. - */ +/// \file mln/accu/mean.hh +/// +/// Define an accumulator that computes a mean. +/// +/// \todo Use accu::pair just like in accu::min_max. # include <mln/accu/internal/base.hh> # include <mln/accu/count.hh> @@ -47,8 +46,8 @@ namespace mln { - /*! \brief Generic mean accumulator class. - * + /// Generic mean accumulator class. + /*! * Parameter \c T is the type of values that we sum. Parameter \c * S is the type to store the sum of values; the default type of * \c S is the summation type (property) of \c T. Parameter \c M diff --git a/milena/mln/accu/median_alt.hh b/milena/mln/accu/median_alt.hh index 66bc5c5..98d0cac 100644 --- a/milena/mln/accu/median_alt.hh +++ b/milena/mln/accu/median_alt.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007, 2008 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 +28,9 @@ #ifndef MLN_ACCU_MEDIAN_ALT_HH # define MLN_ACCU_MEDIAN_ALT_HH -/*! \file mln/accu/median_alt.hh - * - * \brief Define alternative generic median accumulator class. - */ +/// \file mln/accu/median_alt.hh +/// +/// Define alternative generic median accumulator class. # include <mln/accu/internal/base.hh> # include <mln/accu/histo.hh> @@ -44,9 +43,8 @@ namespace mln { - /*! \brief Generic median_alt function based on histogram over a - * value set with type \c S. - */ + /// Generic median_alt function based on histogram over a + /// value set with type \c S. template <typename S> struct median_alt : public mln::accu::internal::base< const mln_value(S)&, median_alt<S> > { @@ -103,17 +101,29 @@ namespace mln struct median_alt : public Meta_Accumulator< median_alt > { + median_alt(const Value_Set<S>& s_) : s(s_) {} + template <typename V> struct with { typedef accu::median_alt<V> ret; }; + + Value_Set<S> s; }; } // end of namespace mln::accu::meta template <typename T> + median_alt<T> unmeta(const meta::median_alt& m, T) + { + median_alt<T> a(m.s); + return a; + } + + + template <typename T> struct median_alt_on : public median_alt< value::set<T> > { median_alt_on() diff --git a/milena/mln/accu/median_h.hh b/milena/mln/accu/median_h.hh index 0c04e24..c7ea0e8 100644 --- a/milena/mln/accu/median_h.hh +++ b/milena/mln/accu/median_h.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007, 2008 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 +28,9 @@ #ifndef MLN_ACCU_MEDIAN_H_HH # define MLN_ACCU_MEDIAN_H_HH -/*! \file mln/accu/median_h.hh - * - * \brief Define a generic median accumulator class. - */ +/// \file mln/accu/median_h.hh +/// +/// Define a generic median accumulator class. # include <mln/accu/internal/base.hh> # include <mln/accu/histo.hh> @@ -45,9 +44,8 @@ namespace mln { - /*! \brief Generic median function based on histogram over a value - * set with type \c V. - */ + /// Generic median function based on histogram over a value + /// set with type \c V. template <typename V> struct median_h : public mln::accu::internal::base< const V&, median_h<V> > { @@ -77,13 +75,13 @@ namespace mln protected: mutable accu::histo<V> h_; - const value::set<V>& s_; // derived from h_ + const value::set<V>& s_; // derived from h_ mutable unsigned sum_minus_, sum_plus_; mutable bool valid_; - mutable unsigned i_; // the median_h index - mutable argument t_; // the median_h value + mutable unsigned i_; // the median_h index + mutable argument t_; // the median_h value // Auxiliary methods void update_() const; diff --git a/milena/mln/accu/min.hh b/milena/mln/accu/min.hh index 83e6804..1825c7f 100644 --- a/milena/mln/accu/min.hh +++ b/milena/mln/accu/min.hh @@ -46,8 +46,8 @@ namespace mln { - /*! \brief Generic min accumulator class. - * + /// Generic min accumulator class. + /*! * The parameter \c T is the type of values. */ template <typename T> diff --git a/milena/mln/accu/min_h.hh b/milena/mln/accu/min_h.hh index fd3706e..e4e8fee 100644 --- a/milena/mln/accu/min_h.hh +++ b/milena/mln/accu/min_h.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007, 2008 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 +28,9 @@ #ifndef MLN_ACCU_MIN_H_HH # define MLN_ACCU_MIN_H_HH -/*! \file mln/accu/min_h.hh - * - * \brief Define a generic min accumulator class based on histogram. - */ +/// \file mln/accu/min_h.hh +/// +/// Define a generic min accumulator class based on histogram. # include <mln/accu/internal/base.hh> # include <mln/accu/histo.hh> @@ -46,9 +45,8 @@ namespace mln { - /*! \brief Generic min function based on histogram over a value - * set with type \c V. - */ + /// Generic min function based on histogram over a value + /// set with type \c V. template <typename V> struct min_h : public mln::accu::internal::base< const V& , min_h<V> > { @@ -102,9 +100,7 @@ namespace mln namespace meta { - /*! - * \brief Meta accumulator for min. - */ + /// Meta accumulator for min. struct min_h : public Meta_Accumulator< min_h > { template <typename T> diff --git a/milena/mln/accu/min_max.hh b/milena/mln/accu/min_max.hh index 11b1a33..6f90560 100644 --- a/milena/mln/accu/min_max.hh +++ b/milena/mln/accu/min_max.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007, 2008 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 +28,11 @@ #ifndef MLN_ACCU_MIN_MAX_HH # define MLN_ACCU_MIN_MAX_HH -/*! \file mln/accu/min_max.hh - * - * \brief Define an accumulator that computes a min and a max. - * - * \todo A macro to create such accumulators. - */ +/// \file mln/accu/min_max.hh +/// +/// Define an accumulator that computes a min and a max. +/// +/// \todo A macro to create such accumulators. # include <utility> @@ -50,8 +49,8 @@ namespace mln namespace accu { - /*! \brief Generic min and max accumulator class. - * + /// Generic min and max accumulator class. + /*! * The parameter \c V is the type of values. */ template <typename V> diff --git a/milena/mln/accu/nil.hh b/milena/mln/accu/nil.hh index 0887715..e085deb 100644 --- a/milena/mln/accu/nil.hh +++ b/milena/mln/accu/nil.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_ACCU_NIL_HH # define MLN_ACCU_NIL_HH -/*! \file mln/accu/nil.hh - * - * \brief Define an accumulator that does nothing. - * - * \todo A macro to generate the meta version. - */ +/// \file mln/accu/nil.hh +/// +/// Define an accumulator that does nothing. +/// +/// \todo A macro to generate the meta version. # include <mln/core/concept/meta_accumulator.hh> # include <mln/accu/internal/base.hh> @@ -47,9 +47,7 @@ namespace mln namespace accu { - /*! - * \brief Define an accumulator that does nothing. - */ + /// Define an accumulator that does nothing. template <typename T> struct nil : public mln::accu::internal::base< util::ignore , nil<T> > { diff --git a/milena/mln/accu/p.hh b/milena/mln/accu/p.hh index bcb36c2..dc3f41f 100644 --- a/milena/mln/accu/p.hh +++ b/milena/mln/accu/p.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,9 @@ #ifndef MLN_ACCU_P_HH # define MLN_ACCU_P_HH -/*! \file mln/accu/p.hh - * - * \brief Define an accumulator that computes a min and a max. - */ +/// \file mln/accu/p.hh +/// +/// Define an accumulator that computes a min and a max. # include <mln/core/concept/meta_accumulator.hh> @@ -46,11 +46,9 @@ namespace mln { - /*! - * \brief Generic p of accumulators. - * - * The parameter \c V is the type of values. - */ + ///Generic p of accumulators. + /// + /// The parameter \c V is the type of values. template <typename A> struct p : public mln::accu::internal::base< const mln_result(A)& , p<A> > { diff --git a/milena/mln/accu/pair.hh b/milena/mln/accu/pair.hh index b431742..a1bdbd7 100644 --- a/milena/mln/accu/pair.hh +++ b/milena/mln/accu/pair.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,9 @@ #ifndef MLN_ACCU_PAIR_HH # define MLN_ACCU_PAIR_HH -/*! \file mln/accu/pair.hh - * - * \brief Define a pair of accumulators. - */ +/// \file mln/accu/pair.hh +/// +/// Define a pair of accumulators. # include <utility> @@ -49,12 +49,11 @@ namespace mln { - /*! \brief Generic pair of accumulators. - * - * The parameter \c T is the type of values. - * - * \todo Check that, when T is not provided, A1 and A2 have the same value. - */ + /// Generic pair of accumulators. + /// + /// The parameter \c T is the type of values. + /// + /// \todo Check that, when T is not provided, A1 and A2 have the same value. template <typename A1, typename A2, typename T = mln_argument(A1)> struct pair : public mln::accu::internal::base< std::pair<mln_result(A1), mln_result(A2)>, pair<A1,A2,T> > @@ -65,7 +64,8 @@ namespace mln typedef mln_result(A2) result_2; pair(); - pair(const A1& a1, const A2& a2); +// FIXME: not implemented. Do we want it? +// pair(const A1& a1, const A2& a2); /// Manipulators. /// \{ diff --git a/milena/mln/accu/rank.hh b/milena/mln/accu/rank.hh index 7d7ce17..bdd4df0 100644 --- a/milena/mln/accu/rank.hh +++ b/milena/mln/accu/rank.hh @@ -50,8 +50,8 @@ namespace mln { - /*! \brief Generic rank accumulator class. - * + /// Generic rank accumulator class. + /*! * The parameter \c T is the type of values. */ template <typename T> @@ -82,7 +82,7 @@ namespace mln /// Give the rank. unsigned k() const; - /// Give the total number of elements. + /// Give the total number of elements. unsigned n() const; protected: @@ -116,12 +116,16 @@ namespace mln struct rank : public Meta_Accumulator< rank > { + rank(unsigned k_, unsigned n_) : k(k_), n(n_) {} + template <typename T> struct with { typedef accu::rank<T> ret; }; - unsigned k, n; + + unsigned k; + unsigned n; }; } // end of namespace mln::accu::meta diff --git a/milena/mln/accu/rank_bool.hh b/milena/mln/accu/rank_bool.hh index 6fec53a..f5e9b07 100644 --- a/milena/mln/accu/rank_bool.hh +++ b/milena/mln/accu/rank_bool.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,15 +29,14 @@ #ifndef MLN_ACCU_RANK_BOOL_HH # define MLN_ACCU_RANK_BOOL_HH -/*! \file mln/accu/rank_bool.hh - * - * \brief Define an rank accumulator. - * - * \todo There is no-arg-ctor so this accumulator does not support - * deferred initialization! - * - * \todo Add untake routines... - */ +/// \file mln/accu/rank_bool.hh +/// +/// Define an rank accumulator. +/// +/// \todo There is no-arg-ctor so this accumulator does not support +/// deferred initialization! +/// +/// \todo Add untake routines... # include <mln/accu/internal/base.hh> @@ -50,9 +50,7 @@ namespace mln // Fwd declaration. template <typename T> struct rank; - /*! \brief rank accumulator class for Boolean. - * - */ + /// rank accumulator class for Boolean. template <> struct rank<bool> : public mln::accu::internal::base< bool, rank<bool> > { diff --git a/milena/mln/accu/rank_high_quant.hh b/milena/mln/accu/rank_high_quant.hh index b4d69a1..0f002cd 100644 --- a/milena/mln/accu/rank_high_quant.hh +++ b/milena/mln/accu/rank_high_quant.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,9 @@ #ifndef MLN_ACCU_RANK_HH # define MLN_ACCU_RANK_HH -/*! \file mln/accu/rank.hh - * - * \brief Define an rank accumulator. - */ +/// \file mln/accu/rank.hh +/// +/// Define an rank accumulator. # include <vector> # include <mln/accu/internal/base.hh> @@ -47,8 +47,8 @@ namespace mln { - /*! \brief Generic rank accumulator class. - * + /// Generic rank accumulator class. + /*! * The parameter \c T is the type of values. */ template <typename T> @@ -93,16 +93,29 @@ namespace mln struct rank : public Meta_Accumulator< rank > { + rank(unsigned k_, unsigned n_) : k(k_), n(n_) {} + template <typename T> struct with { typedef accu::rank<T> ret; }; + + unsigned k; + unsigned n; }; } + template <typename T> + rank<T> unmeta(const meta::rank& m, T) + { + rank<T> a(m.k, m.n); + return a; + } + + # ifndef MLN_INCLUDE_ONLY template <typename T> diff --git a/milena/mln/accu/snake_2d.hh b/milena/mln/accu/snake_2d.hh index 27e4d5f..c055a90 100644 --- a/milena/mln/accu/snake_2d.hh +++ b/milena/mln/accu/snake_2d.hh @@ -75,7 +75,7 @@ namespace mln mln_precondition(input.has_data()); mln_precondition(! win.is_empty()); // mln_precondition(! win.is_valid()); - + (void) input; (void) win; } diff --git a/milena/mln/accu/sum.hh b/milena/mln/accu/sum.hh index fcfc3ba..d330590 100644 --- a/milena/mln/accu/sum.hh +++ b/milena/mln/accu/sum.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,9 @@ #ifndef MLN_ACCU_SUM_HH # define MLN_ACCU_SUM_HH -/*! \file mln/accu/sum.hh - * - * \brief Define an accumulator that computes a sum. - */ +/// \file mln/accu/sum.hh +/// +/// Define an accumulator that computes a sum. # include <mln/core/concept/meta_accumulator.hh> # include <mln/accu/internal/base.hh> @@ -50,8 +50,8 @@ namespace mln { - /*! \brief Generic sum accumulator class. - * + /// Generic sum accumulator class. + /*! * Parameter \c T is the type of values that we sum. Parameter \c * S is the type to store the value sum; the default type of * \c S is the summation type (property) of \c T. diff --git a/milena/mln/accu/take.hh b/milena/mln/accu/take.hh index deadcaf..5b7f3e8 100644 --- a/milena/mln/accu/take.hh +++ b/milena/mln/accu/take.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_ACCU_TAKE_HH # define MLN_ACCU_TAKE_HH -/*! \file mln/accu/take.hh - * - * \brief Define an accumulator that takes image pixels. - */ +/// \file mln/accu/take.hh +/// +/// Define an accumulator that takes image pixels. # include <mln/core/concept/accumulator.hh> # include <mln/core/concept/image.hh> @@ -44,8 +44,8 @@ namespace mln namespace accu { - /*! \brief Make an accumulator take the pixels of the image \p input. - * + /// Make an accumulator take the pixels of the image \p input. + /*! * \param[in] input The input image. * \param[in,out] a The accumulator. * diff --git a/milena/mln/accu/transform.hh b/milena/mln/accu/transform.hh index 275ac21..3829432 100644 --- a/milena/mln/accu/transform.hh +++ b/milena/mln/accu/transform.hh @@ -49,13 +49,13 @@ namespace mln template <typename I, typename A, typename W> mln_ch_value(I, mln_result(A)) - transform(const Image<I>& input, + transform(const Image<I>& input, const Accumulator<A>& a, const Window<W>& win); template <typename I, typename A, typename W> mln_ch_value(I, mln_accu_with(A, mln_value(I))::result) - transform(const Image<I>& input, + transform(const Image<I>& input, const Meta_Accumulator<A>& a, const Window<W>& win); @@ -69,7 +69,7 @@ namespace mln namespace generic { - + template <typename I, typename A, typename W> mln_ch_value(I, mln_result(A)) transform(const Image<I>& input_, @@ -86,7 +86,7 @@ namespace mln // mln_precondition(win.is_valid()); extension::adjust(input, win); - + mln_ch_value(I, mln_result(A)) output; initialize(output, input); @@ -105,7 +105,7 @@ namespace mln } } // end of namespace mln::accu::impl::generic - + } // end of namespace mln::accu::impl diff --git a/milena/mln/accu/tuple.hh b/milena/mln/accu/tuple.hh index f70882b..3ad7be2 100644 --- a/milena/mln/accu/tuple.hh +++ b/milena/mln/accu/tuple.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,10 @@ #ifndef MLN_ACCU_TUPLE_HH # define MLN_ACCU_TUPLE_HH -/*! \file mln/accu/tuple.hh - * - * \brief Define a tuple of accumulators. - */ +/// \file mln/accu/tuple.hh +/// +/// Define a tuple of accumulators. + # include <utility> @@ -65,10 +66,9 @@ namespace mln template <unsigned n, typename T> struct tuplehelper; } - /*! \brief Generic tuple of accumulators. - * + /// Generic tuple of accumulators. + /*! * The parameter \c T is the type of values. - * */ template <typename A, unsigned n, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(10, typename T, boost::tuples::null_type)> struct tuple diff --git a/milena/mln/accu/v.hh b/milena/mln/accu/v.hh index a7f4cdf..bb522b7 100644 --- a/milena/mln/accu/v.hh +++ b/milena/mln/accu/v.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_ACCU_V_HH # define MLN_ACCU_V_HH -/*! \file mln/accu/v.hh - * - * \brief Define an accumulator that computes a min and a max. - */ +/// \file mln/accu/v.hh +/// +/// Define an accumulator that computes a min and a max. + # include <mln/core/concept/meta_accumulator.hh> # include <mln/accu/internal/base.hh> @@ -89,11 +90,11 @@ namespace mln struct val : public Meta_Accumulator< val<mA> > { template <typename V> - struct with - { - typedef mln_accu_with(mA, mln_value(V)) A; - typedef val<A> ret; - }; + struct with + { + typedef mln_accu_with(mA, mln_value(V)) A; + typedef val<A> ret; + }; }; } diff --git a/milena/mln/accu/volume.hh b/milena/mln/accu/volume.hh index 705434b..9ace873 100644 --- a/milena/mln/accu/volume.hh +++ b/milena/mln/accu/volume.hh @@ -28,17 +28,18 @@ #ifndef MLN_ACCU_VOLUME_HH # define MLN_ACCU_VOLUME_HH -/** \file mln/accu/volume.hh - \brief Define an accumulator that computes the volume of a - component through one of its pixels. - +/// \file mln/accu/volume.hh +/// Define an accumulator that computes the volume of a +/// component through one of its pixels. +/*! This accumulator uses an mln::util::pix (pixel) to update the reference level, area and volume information of the component. The class mln/accu/volume is not a general-purpose accumulator; it is used to implement volume-based connected filters. \see mln::morpho::closing_volume - \see mln::morpho::opening_volume */ + \see mln::morpho::opening_volume +*/ # include <mln/accu/internal/base.hh> # include <mln/core/concept/meta_accumulator.hh> @@ -53,7 +54,7 @@ namespace mln namespace accu { - /// \brief Volume accumulator class. + /// Volume accumulator class. /// /// The parameter \p I is the image type on which the accumulator /// of pixels is built. @@ -61,7 +62,7 @@ namespace mln struct volume : public mln::accu::internal::base< unsigned , volume<I> > { - /// \brief The accumulated data type. + /// The accumulated data type. /// /// The volume of component is represented by the volume of its /// root pixel. See mln::morpho::closing_volume and diff --git a/milena/mln/algebra/quat.hh b/milena/mln/algebra/quat.hh index 4e44e90..f786ac1 100644 --- a/milena/mln/algebra/quat.hh +++ b/milena/mln/algebra/quat.hh @@ -448,6 +448,7 @@ namespace mln quat::quat(unsigned one, float theta, const algebra::vec<3,float>& uv) { mln_precondition(one == 1); + (void) one; set_unit(theta, uv); } diff --git a/milena/mln/geom/essential.hh b/milena/mln/geom/essential.hh index 41d1fd9..cd9297a 100644 --- a/milena/mln/geom/essential.hh +++ b/milena/mln/geom/essential.hh @@ -54,4 +54,14 @@ namespace mln # include <mln/geom/size3d.hh> # include <mln/geom/nsites.hh> +# include <mln/geom/max_col.hh> +# include <mln/geom/max_ind.hh> +# include <mln/geom/max_row.hh> +# include <mln/geom/max_sli.hh> + +# include <mln/geom/min_col.hh> +# include <mln/geom/min_ind.hh> +# include <mln/geom/min_row.hh> +# include <mln/geom/min_sli.hh> + #endif // ! MLN_GEOM_ESSENTIAL_HH diff --git a/milena/mln/morpho/elementary/like_ero_fun.hh b/milena/mln/morpho/elementary/like_ero_fun.hh index 39399d8..772259f 100644 --- a/milena/mln/morpho/elementary/like_ero_fun.hh +++ b/milena/mln/morpho/elementary/like_ero_fun.hh @@ -61,7 +61,7 @@ namespace mln struct f_accu { template <typename V, typename A> - V operator()(const V& input_p, const A& a) const + V operator()(const V& /*input_p*/, const A& a) const { return a.to_result(); } diff --git a/milena/mln/value/essential.hh b/milena/mln/value/essential.hh index 7ba742a..e537eff 100644 --- a/milena/mln/value/essential.hh +++ b/milena/mln/value/essential.hh @@ -39,8 +39,8 @@ # include <mln/value/float01_8.hh> # include <mln/value/float01_16.hh> -# include <mln/value/gl8.hh> -# include <mln/value/gl16.hh> +//# include <mln/value/gl8.hh> +//# include <mln/value/gl16.hh> # include <mln/value/int_s8.hh> # include <mln/value/int_s16.hh> diff --git a/milena/tests/accu/rank.cc b/milena/tests/accu/rank.cc index 2f4061c..9c334a9 100644 --- a/milena/tests/accu/rank.cc +++ b/milena/tests/accu/rank.cc @@ -55,9 +55,7 @@ int main() using value::int_u8; { - accu::meta::rank r; - r.k = 4; - r.n = 9; + accu::meta::rank r(4, 9); accu::rank<int_u8> a = accu::unmeta(r, int_u8()); mln_assertion(a.k() == 4 && a.n() == 9); // Meta_Accumulator<accu::meta::rank>& R = r; -- 1.5.6.5
participants (1)
-
Guillaume Lazzara