2973: Fix more tests.
* mln/accu/count_adjacent_vertices.hh: make it work with the new graph images. * mln/accu/median_alt.hh: fix compilation issue. * mln/util/multi_site.hh, * mln/util/vertex.hh, * mln/util/internal/graph_nbh_iter.hh, * mln/core/internal/pixel_impl.hh, * mln/core/internal/set_of.hh, * mln/core/site_set/box_piter.hh, * mln/core/site_set/p_centered.hh, * mln/fun/p2b/has.hh, * mln/fun/x2p/closest_point.hh, * mln/geom/seeds2tiling_roundness.hh, * mln/io/txt/save.hh, * mln/metal/vec.hh, * mln/morpho/internal/elementary.hh, * mln/morpho/tree/data.hh, * mln/registration/get_rot.hh, * mln/registration/get_rtransf.hh, * mln/registration/multiscale.hh, * mln/topo/face.hh, * mln/topo/face_iter.hh, * mln/topo/n_face.hh, * mln/trait/op/ord.hh, * mln/util/edge.hh, * mln/core/dpoints_pixter.hh, * mln/core/internal/check/image_all.hh, * mln/core/internal/check/image_fastest.hh, * mln/core/internal/graph_neighborhood_base.hh, * mln/core/internal/graph_window_base.hh, * mln/core/concept/graph.hh, * mln/canvas/browsing/snake_generic.hh, * mln/accu/rank_high_quant.hh: fix includes. * mln/border/resize.hh: avoid a warning. * mln/core/internal/image_if_base.hh: removed since it is unused and not updated. * mln/util/internal/graph_edge_impl.hh: rename as... * mln/util/internal/edge_impl.hh: ... this. * mln/util/internal/graph_vertex_impl.hh: rename as... * mln/util/internal/vertex_impl.hh: ... this. * tests/morpho/Makefile.am: disable more tests. * tests/unit_test/build_unit_test.sh: do not include mln/core/doc headers. --- milena/ChangeLog | 57 ++++++ milena/mln/accu/count_adjacent_vertices.hh | 56 +++--- milena/mln/accu/median_alt.hh | 12 +- milena/mln/accu/rank_high_quant.hh | 2 +- milena/mln/border/resize.hh | 2 + milena/mln/canvas/browsing/snake_generic.hh | 1 + milena/mln/core/concept/graph.hh | 2 + milena/mln/core/dpoints_pixter.hh | 1 + milena/mln/core/internal/check/image_all.hh | 10 +- milena/mln/core/internal/check/image_fastest.hh | 45 +++-- .../mln/core/internal/graph_neighborhood_base.hh | 3 + milena/mln/core/internal/graph_window_base.hh | 1 + milena/mln/core/internal/image_if_base.hh | 202 -------------------- milena/mln/core/internal/pixel_impl.hh | 24 +-- milena/mln/core/internal/set_of.hh | 10 +- milena/mln/core/site_set/box_piter.hh | 49 +++--- milena/mln/core/site_set/p_centered.hh | 1 + milena/mln/fun/p2b/has.hh | 10 +- milena/mln/fun/x2p/closest_point.hh | 3 +- milena/mln/geom/seeds2tiling_roundness.hh | 10 +- milena/mln/io/txt/save.hh | 25 +-- milena/mln/metal/vec.hh | 12 +- milena/mln/morpho/internal/elementary.hh | 1 + milena/mln/morpho/tree/data.hh | 2 +- milena/mln/registration/get_rot.hh | 3 + milena/mln/registration/get_rtransf.hh | 3 + milena/mln/registration/multiscale.hh | 4 + milena/mln/topo/face.hh | 9 +- milena/mln/topo/face_iter.hh | 1 + milena/mln/topo/n_face.hh | 10 +- milena/mln/trait/op/ord.hh | 2 +- milena/mln/util/edge.hh | 4 +- .../internal/{graph_edge_impl.hh => edge_impl.hh} | 8 +- milena/mln/util/internal/graph_nbh_iter.hh | 2 + .../{graph_vertex_impl.hh => vertex_impl.hh} | 8 +- milena/mln/util/multi_site.hh | 1 + milena/mln/util/vertex.hh | 5 +- milena/tests/morpho/Makefile.am | 8 +- milena/tests/unit_test/build_unit_test.sh | 2 +- 39 files changed, 247 insertions(+), 364 deletions(-) delete mode 100644 milena/mln/core/internal/image_if_base.hh rename milena/mln/util/internal/{graph_edge_impl.hh => edge_impl.hh} (91%) rename milena/mln/util/internal/{graph_vertex_impl.hh => vertex_impl.hh} (91%) diff --git a/milena/ChangeLog b/milena/ChangeLog index 3b7e923..7416910 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,3 +1,60 @@ +2008-11-28 Guillaume Lazzara <z@lrde.epita.fr> + + Fix more tests. + + * mln/accu/count_adjacent_vertices.hh: make it work with the +new graph images. + + * mln/accu/median_alt.hh: fix compilation issue. + + * mln/util/multi_site.hh, + * mln/util/vertex.hh, + * mln/util/internal/graph_nbh_iter.hh, + * mln/core/internal/pixel_impl.hh, + * mln/core/internal/set_of.hh, + * mln/core/site_set/box_piter.hh, + * mln/core/site_set/p_centered.hh, + * mln/fun/p2b/has.hh, + * mln/fun/x2p/closest_point.hh, + * mln/geom/seeds2tiling_roundness.hh, + * mln/io/txt/save.hh, + * mln/metal/vec.hh, + * mln/morpho/internal/elementary.hh, + * mln/morpho/tree/data.hh, + * mln/registration/get_rot.hh, + * mln/registration/get_rtransf.hh, + * mln/registration/multiscale.hh, + * mln/topo/face.hh, + * mln/topo/face_iter.hh, + * mln/topo/n_face.hh, + * mln/trait/op/ord.hh, + * mln/util/edge.hh, + * mln/core/dpoints_pixter.hh, + * mln/core/internal/check/image_all.hh, + * mln/core/internal/check/image_fastest.hh, + * mln/core/internal/graph_neighborhood_base.hh, + * mln/core/internal/graph_window_base.hh, + * mln/core/concept/graph.hh, + * mln/canvas/browsing/snake_generic.hh, + * mln/accu/rank_high_quant.hh: fix includes. + + * mln/border/resize.hh: avoid a warning. + + * mln/core/internal/image_if_base.hh: removed since it is unused and + not updated. + + * mln/util/internal/graph_edge_impl.hh: rename as... + * mln/util/internal/edge_impl.hh: ... this. + + * mln/util/internal/graph_vertex_impl.hh: rename as... + * mln/util/internal/vertex_impl.hh: ... this. + + * tests/morpho/Makefile.am: disable more tests. + + * tests/unit_test/build_unit_test.sh: do not include mln/core/doc + headers. + + 2008-11-28 Thierry Geraud <thierry.geraud@lrde.epita.fr> Make morpho erosion rely on a general code. diff --git a/milena/mln/accu/count_adjacent_vertices.hh b/milena/mln/accu/count_adjacent_vertices.hh index 6d32509..164a150 100644 --- a/milena/mln/accu/count_adjacent_vertices.hh +++ b/milena/mln/accu/count_adjacent_vertices.hh @@ -31,11 +31,11 @@ /// \file mln/accu/count_adjacent_vertices.hh /// Define an accumulator that counts the vertices adjacent to a -/// set of line graph psite. +/// set of p_edges psites. # include <mln/accu/internal/base.hh> # include <mln/core/concept/meta_accumulator.hh> -# include <mln/core/image/line_graph_image.hh> +# include <mln/pw/image.hh> # include <mln/util/pix.hh> namespace mln @@ -45,20 +45,20 @@ namespace mln { /// Accumulator class counting the number of vertices - /// adjacent to a set of mln::line_graph_psite (i.e., a set of + /// adjacent to a set of mln::p_edges_psite (i.e., a set of /// edges). /// - /// The type to be count is mln::util::pix< mln::line_graph_image<P, V> > - /// where \p P and \p V are the parameters of this class. + /// The type to be count is mln::util::pix< pw::image<F, S> > + /// where \p F and \p S are the parameters of this class. /// /// This accumulator is used by mln::closing_area_on_vertices and /// mln::opening_area_on_vertices. - template <typename P, typename V> + template <typename F, typename S> struct count_adjacent_vertices : public mln::accu::internal::base< unsigned, - count_adjacent_vertices<P, V> > + count_adjacent_vertices<F,S> > { - typedef mln::util::pix< mln::line_graph_image<P, V> > argument; + typedef mln::util::pix< pw::image<F,S> > argument; count_adjacent_vertices(); @@ -66,7 +66,7 @@ namespace mln /// \{ void init(); void take(const argument& arg); - void take(const count_adjacent_vertices<P, V>& other); + void take(const count_adjacent_vertices<F,S>& other); /// Force the value of the counter to \a c. void set_value(unsigned c); @@ -83,7 +83,7 @@ namespace mln /// The value of the counter. unsigned count__; /// The set of adjacent vertices. - std::set<util::vertex_id> vertices_; + std::set<unsigned> vertices_; }; @@ -94,10 +94,10 @@ namespace mln struct count_adjacent_vertices : public Meta_Accumulator< count_adjacent_vertices > { - template <typename P, typename V> + template <typename F, typename S> struct with { - typedef accu::count_adjacent_vertices<P, V> ret; + typedef accu::count_adjacent_vertices<F,S> ret; }; }; @@ -106,63 +106,63 @@ namespace mln # ifndef MLN_INCLUDE_ONLY - template <typename P, typename V> + template <typename F, typename S> inline - count_adjacent_vertices<P, V>::count_adjacent_vertices() + count_adjacent_vertices<F,S>::count_adjacent_vertices() { init(); } - template <typename P, typename V> + template <typename F, typename S> inline void - count_adjacent_vertices<P, V>::init() + count_adjacent_vertices<F,S>::init() { vertices_.clear(); update_(); } - template <typename P, typename V> + template <typename F, typename S> inline void - count_adjacent_vertices<P, V>::take(const argument& arg) + count_adjacent_vertices<F,S>::take(const argument& arg) { - vertices_.insert(arg.p().first_id()); - vertices_.insert(arg.p().second_id()); + vertices_.insert(arg.p().v1()); + vertices_.insert(arg.p().v2()); update_(); } - template <typename P, typename V> + template <typename F, typename S> inline void - count_adjacent_vertices<P, V>::take(const count_adjacent_vertices<P, V>& other) + count_adjacent_vertices<F,S>::take(const count_adjacent_vertices<F,S>& other) { vertices_.insert (other.vertices_.begin(), other.vertices_.end()); update_(); } - template <typename P, typename V> + template <typename F, typename S> inline unsigned - count_adjacent_vertices<P, V>::to_result() const + count_adjacent_vertices<F,S>::to_result() const { return count__; } - template <typename P, typename V> + template <typename F, typename S> inline void - count_adjacent_vertices<P, V>::set_value(unsigned c) + count_adjacent_vertices<F,S>::set_value(unsigned c) { count__ = c; /// Reset the other member. vertices_.clear(); } - template <typename P, typename V> + template <typename F, typename S> inline void - count_adjacent_vertices<P, V>::update_() + count_adjacent_vertices<F,S>::update_() { count__ = vertices_.size(); } diff --git a/milena/mln/accu/median_alt.hh b/milena/mln/accu/median_alt.hh index 98d0cac..7815c95 100644 --- a/milena/mln/accu/median_alt.hh +++ b/milena/mln/accu/median_alt.hh @@ -99,24 +99,24 @@ namespace mln /// Meta accumulator for median_alt. - struct median_alt : public Meta_Accumulator< median_alt > + template <typename T> + struct median_alt : public Meta_Accumulator< median_alt<T> > { - median_alt(const Value_Set<S>& s_) : s(s_) {} + median_alt(const Value_Set<T>& s_) : s(s_) {} - template <typename V> struct with { - typedef accu::median_alt<V> ret; + typedef accu::median_alt<T> ret; }; - Value_Set<S> s; + Value_Set<T> s; }; } // end of namespace mln::accu::meta template <typename T> - median_alt<T> unmeta(const meta::median_alt& m, T) + median_alt<T> unmeta(const meta::median_alt<T>& m, T) { median_alt<T> a(m.s); return a; diff --git a/milena/mln/accu/rank_high_quant.hh b/milena/mln/accu/rank_high_quant.hh index 0f002cd..5c91f99 100644 --- a/milena/mln/accu/rank_high_quant.hh +++ b/milena/mln/accu/rank_high_quant.hh @@ -204,6 +204,6 @@ namespace mln } // end of namespace mln -#include <mln/accu/rankbool.hh> +#include <mln/accu/rank_bool.hh> #endif // ! MLN_ACCU_RANK_HH diff --git a/milena/mln/border/resize.hh b/milena/mln/border/resize.hh index b7bdba5..02cbbc5 100644 --- a/milena/mln/border/resize.hh +++ b/milena/mln/border/resize.hh @@ -98,6 +98,8 @@ namespace mln const Image<I>& ima, unsigned thickness) { // No-op. + (void) ima; + (void) thickness; } template <typename I> diff --git a/milena/mln/canvas/browsing/snake_generic.hh b/milena/mln/canvas/browsing/snake_generic.hh index 540c2e4..0bc951d 100644 --- a/milena/mln/canvas/browsing/snake_generic.hh +++ b/milena/mln/canvas/browsing/snake_generic.hh @@ -33,6 +33,7 @@ /// /// Browsing in a snake-way, forward. +# include <vector> # include <mln/core/concept/browsing.hh> diff --git a/milena/mln/core/concept/graph.hh b/milena/mln/core/concept/graph.hh index 80c2ae2..81f4f3c 100644 --- a/milena/mln/core/concept/graph.hh +++ b/milena/mln/core/concept/graph.hh @@ -32,6 +32,8 @@ /// /// Definition of the concept of mln::Graph. +# include <mln/core/concept/object.hh> + namespace mln { diff --git a/milena/mln/core/dpoints_pixter.hh b/milena/mln/core/dpoints_pixter.hh index 4d4e4d2..7b570d2 100644 --- a/milena/mln/core/dpoints_pixter.hh +++ b/milena/mln/core/dpoints_pixter.hh @@ -37,6 +37,7 @@ # include <cassert> # include <vector> +# include <mln/core/concept/proxy.hh> # include <mln/core/concept/pixel_iterator.hh> # include <mln/core/internal/pixel_impl.hh> # include <mln/metal/converts_to.hh> diff --git a/milena/mln/core/internal/check/image_all.hh b/milena/mln/core/internal/check/image_all.hh index e389b06..6430046 100644 --- a/milena/mln/core/internal/check/image_all.hh +++ b/milena/mln/core/internal/check/image_all.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_CORE_INTERNAL_CHECK_IMAGE_ALL_HH # define MLN_CORE_INTERNAL_CHECK_IMAGE_ALL_HH -/*! \file mln/core/internal/check/image_all.hh - * - * \brief File that includes all image-related internal checks. - */ - +/// \file mln/core/internal/check/image_all.hh +/// +/// File that includes all image-related internal checks. +# include <mln/trait/images.hh> # include <mln/core/internal/check/image_fastest.hh> // ... diff --git a/milena/mln/core/internal/check/image_fastest.hh b/milena/mln/core/internal/check/image_fastest.hh index 44f5611..f225c1e 100644 --- a/milena/mln/core/internal/check/image_fastest.hh +++ b/milena/mln/core/internal/check/image_fastest.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,14 +29,18 @@ #ifndef MLN_CORE_INTERNAL_CHECK_IMAGE_FASTEST_HH # define MLN_CORE_INTERNAL_CHECK_IMAGE_FASTEST_HH -/*! \file mln/core/internal/check/image_fastest.hh - * - * \brief Class that statically checks the interface of fastest - * images. - * - * \todo Check and convert p in index_of_point towards E::psite. - */ +/// \file mln/core/internal/check/image_fastest.hh +/// +/// Class that statically checks the interface of fastest +/// images. +/// +/// \todo Check and convert p in index_of_point towards E::psite. + +# include <mln/metal/bool.hh> +# include <mln/core/macros.hh> +# include <mln/core/trait/pixter.hh> +# include <mln/core/trait/qlf_value.hh> # include <mln/core/internal/force_exact.hh> namespace mln @@ -47,21 +52,20 @@ namespace mln namespace check { - /*! FIXME - */ + /// FIXME template < typename E, typename B = metal::true_ > struct image_fastest_ { - /*! \brief Give the offset of the site \p p. - * - * \param[in] p A site. - * - * \warning This method is final. - * - * \pre The image has to be initialized and to own the point \p p. - * \post p == point_at_index(result) - */ + /// \brief Give the offset of the site \p p. + /// + /// \param[in] p A site. + /// + /// \warning This method is final. + /// + /// \pre The image has to be initialized and to own the point \p p. + /// \post p == point_at_index(result) + /// template <typename P> unsigned index_of_point(const P& p) const; @@ -71,7 +75,6 @@ namespace mln }; - /// template <typename E> struct image_fastest_< E, metal::false_ > { @@ -86,8 +89,8 @@ namespace mln image_fastest_<E,B>::image_fastest_() { typedef mln_site(E) site; - typedef mln_psite(E) psite; - typedef mln_delta(psite) dpsite; + typedef mln_psite(E) psite; + typedef mln_delta(psite) dpsite; typedef mln_fwd_pixter(E) fwd_pixter; diff --git a/milena/mln/core/internal/graph_neighborhood_base.hh b/milena/mln/core/internal/graph_neighborhood_base.hh index 0e39cce..451e527 100644 --- a/milena/mln/core/internal/graph_neighborhood_base.hh +++ b/milena/mln/core/internal/graph_neighborhood_base.hh @@ -32,6 +32,9 @@ /// /// FIXME: doc +# include <set> +# include <mln/core/concept/neighborhood.hh> + namespace mln { diff --git a/milena/mln/core/internal/graph_window_base.hh b/milena/mln/core/internal/graph_window_base.hh index 3c91448..0ea95ec 100644 --- a/milena/mln/core/internal/graph_window_base.hh +++ b/milena/mln/core/internal/graph_window_base.hh @@ -29,6 +29,7 @@ # define MLN_CORE_INTERNAL_GRAPH_WINDOW_BASE_HH # include <set> +# include <mln/core/concept/window.hh> /// \file mln/internal/graph_window_base.hh /// diff --git a/milena/mln/core/internal/image_if_base.hh b/milena/mln/core/internal/image_if_base.hh deleted file mode 100644 index 35fb2ae..0000000 --- a/milena/mln/core/internal/image_if_base.hh +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (C) 2007 EPITA Research and Development Laboratory -// -// This file is part of the Olena Library. This library is free -// software; you can redistribute it and/or modify it under the terms -// of the GNU General Public License version 2 as published by the -// Free Software Foundation. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this library; see the file COPYING. If not, write to -// the Free Software Foundation, 51 Franklin Street, Fifth Floor, -// Boston, MA 02111-1307, USA. -// -// As a special exception, you may use this file as part of a free -// software library without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to -// produce an executable, this file does not by itself cause the -// resulting executable to be covered by the GNU General Public -// License. This exception does not however invalidate any other -// reasons why the executable file might be covered by the GNU General -// Public License. - -#ifndef MLN_CORE_INTERNAL_IMAGE_IF_BASE_HH -# define MLN_CORE_INTERNAL_IMAGE_IF_BASE_HH - -/*! \file mln/core/internal/image_if_base.hh - * - * \brief Definition of a image_if_base image. - */ - -# include <mln/core/internal/image_domain_morpher.hh> -# include <mln/core/site_set/p_if.hh> -# include <mln/pw/all.hh> -# include <mln/value/interval.hh> - - -namespace mln -{ - - - namespace internal - { - - // Fwd decl. - template <typename I, typename F, typename E> struct image_if_base_; - - // data_. - - template <typename I, typename F, typename E> - struct data< image_if_base_<I,F,E> > - { - data(I& ima, const F& f); - - I ima_; - p_if<mln_pset(I), F> pset_; - }; - - } // end of namespace mln::internal - - - - namespace trait - { - - template <typename I, typename F, typename E> - struct image_< mln::internal::image_if_base_<I,F,E> > : default_image_morpher< I, mln_value(I), E > - { - private: - typedef mln_trait_image_data(I) I_data_; - typedef mlc_equal(I_data_, trait::image::data::linear) I_data_are_linear_; - public: - - typedef trait::image::category::domain_morpher category; - - typedef mlc_if( mlc_is_const(I), - trait::image::io::read_only, // I const => read_only - mln_trait_image_io(I) ) io; // otherwise like I - - typedef mlc_if( I_data_are_linear_, - trait::image::data::stored, // if linear then just stored - I_data_ ) data; // otherwise like I - - typedef mln_trait_image_border(I) border; - }; - - } // end of namespace mln::trait - - - - namespace internal - { - - /*! An base image class for image_if_'something. - * - */ - template <typename I, typename F, typename E> - struct image_if_base_ : public internal::image_domain_morpher< I, p_if<mln_pset(I),F>, E > - { - - /// Give the definition domain. - const p_if<mln_pset(I), F>& domain() const; - - void init_(I& ima, const F& f); - - /// Test if the image owns the point site \p p. - /// The result is the same than over the underlying image. - bool has(const mln_psite(I)& p) const; - - protected: - - /// Constructor from an image \p ima and a predicate \p f. - image_if_base_(I& ima, const F& f); - - /// Constructor without argument. - image_if_base_(); - }; - - -# ifndef MLN_INCLUDE_ONLY - -// // init_ - -// template <typename I, typename F, typename E> -// void init_(tag::function_t, F& f, const image_if_base_<I,F,E>& model) -// { -// f = model.domain().predicate(); -// } - -// template <typename I, typename F, typename E, typename J> -// void init_(tag::image_t, image_if_base_<I,F,E>& target, const J& model) -// { -// I ima; -// init_(tag::image, ima, exact(model)); -// F f; -// init_(tag::function, f, exact(model)); -// target.init_(ima, f); -// } - - // internal::data< image_if_base_<I,S> > - - template <typename I, typename F, typename E> - inline - data< image_if_base_<I,F,E> >::data(I& ima, const F& f) - : ima_(ima), - pset_(ima.domain() | f) - { - } - - // image_if_base_<I,F,E> - - template <typename I, typename F, typename E> - inline - image_if_base_<I,F,E>::image_if_base_() - { - } - - template <typename I, typename F, typename E> - inline - image_if_base_<I,F,E>::image_if_base_(I& ima, const F& f) - { - init_(ima, f); - } - - template <typename I, typename F, typename E> - inline - bool - image_if_base_<I,F,E>::has(const mln_psite(I)& p) const - { - mln_precondition(this->has_data()); - return this->data_->ima_.has(p); - } - - template <typename I, typename F, typename E> - inline - void - image_if_base_<I,F,E>::init_(I& ima, const F& f) - { - mln_precondition(! this->has_data()); - this->data_ = new internal::data<E>(ima, f); - } - - template <typename I, typename F, typename E> - inline - const p_if<mln_pset(I), F>& - image_if_base_<I,F,E>::domain() const - { - return this->data_->pset_; - } - -# endif // ! MLN_INCLUDE_ONLY - - } // end of namespace mln::internal - -} // end of namespace mln - - -#endif // ! MLN_CORE_INTERNAL_IMAGE_IF_BASE_HH diff --git a/milena/mln/core/internal/pixel_impl.hh b/milena/mln/core/internal/pixel_impl.hh index e7bdc0b..5ab9509 100644 --- a/milena/mln/core/internal/pixel_impl.hh +++ b/milena/mln/core/internal/pixel_impl.hh @@ -1,4 +1,4 @@ -// 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 +28,12 @@ #ifndef MLN_CORE_INTERNAL_PIXEL_IMPL_HH # define MLN_CORE_INTERNAL_PIXEL_IMPL_HH -/*! \file mln/core/internal/pixel_impl.hh - * - * \brief Define a couple of implementation classes to provide methods - * to classes of generalized pixels. - */ +/// \file mln/core/internal/pixel_impl.hh +/// +/// Define a couple of implementation classes to provide methods +/// to classes of generalized pixels. +# include <mln/core/concept/image.hh> # include <mln/core/internal/force_exact.hh> @@ -43,10 +43,8 @@ namespace mln namespace internal { - /*! Implementation class to equip generalized pixel - * classes based on mutable images. - * - */ + /// Implementation class to equip generalized pixel + /// classes based on mutable images. template <typename I, typename E> class pixel_impl_ { @@ -95,10 +93,8 @@ namespace mln }; - /*! Implementation class to equip generalized pixel - * classes based on constant images. - * - */ + /// Implementation class to equip generalized pixel + /// classes based on constant images. template <typename I, typename E> class pixel_impl_< const I, E > { diff --git a/milena/mln/core/internal/set_of.hh b/milena/mln/core/internal/set_of.hh index b7f16bf..4058e0d 100644 --- a/milena/mln/core/internal/set_of.hh +++ b/milena/mln/core/internal/set_of.hh @@ -1,4 +1,4 @@ -// 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,16 +28,16 @@ #ifndef MLN_CORE_INTERNAL_SET_OF_HH # define MLN_CORE_INTERNAL_SET_OF_HH -/*! \file mln/core/internal/set_of.hh - * - * \brief Definition of mln::set_of_ for internal use only. - */ +/// \file mln/core/internal/set_of.hh +/// +/// \brief Definition of mln::set_of_ for internal use only. # include <vector> # include <set> # include <iterator> # include <algorithm> +# include <mln/core/contract.hh> # include <mln/core/internal/force_exact.hh> diff --git a/milena/mln/core/site_set/box_piter.hh b/milena/mln/core/site_set/box_piter.hh index 3ec1aeb..cce30d6 100644 --- a/milena/mln/core/site_set/box_piter.hh +++ b/milena/mln/core/site_set/box_piter.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,24 +29,24 @@ #ifndef MLN_CORE_SITE_SET_BOX_PITER_HH # define MLN_CORE_SITE_SET_BOX_PITER_HH -/*! \file mln/core/site_set/box_piter.hh - * - * \brief Definition of iterators on points of boxes. - */ +/// \file mln/core/site_set/box_piter.hh +/// +/// Definition of iterators on points of boxes. # include <mln/core/internal/site_set_iterator_base.hh> # include <mln/core/concept/box.hh> +# include <mln/core/site_set/box.hh> namespace mln { - /*! \brief A generic forward iterator on points of boxes. - * - * The parameter \c P is the type of points. - * - * \see mln::box_ - */ + /// \brief A generic forward iterator on points of boxes. + /// + /// The parameter \c P is the type of points. + /// + /// \see mln::box + /// template <typename P> class box_fwd_piter_ : public internal::site_set_iterator_base< box<P>, box_fwd_piter_<P> > @@ -61,10 +62,10 @@ namespace mln /// Constructor without argument. box_fwd_piter_(); - /*! \brief Constructor. - * - * \param[in] b A box. - */ + /// Constructor. + /// + /// \param[in] b A box. + /// box_fwd_piter_(const box<P>& b); /// Test the iterator validity. @@ -86,12 +87,12 @@ namespace mln - /*! \brief A generic backward iterator on points of boxes. - * - * The parameter \c P is the type of points. - * - * \see mln::box_ - */ + /// A generic backward iterator on points of boxes. + /// + /// The parameter \c P is the type of points. + /// + /// \see mln::box + /// template <typename P> class box_bkd_piter_ : public internal::site_set_iterator_base< box<P>, box_bkd_piter_<P> > @@ -107,10 +108,10 @@ namespace mln /// Constructor without argument. box_bkd_piter_(); - /*! \brief Constructor. - * - * \param[in] b A box. - */ + /// Constructor. + /// + /// \param[in] b A box. + /// box_bkd_piter_(const box<P>& b); /// Test the iterator validity. diff --git a/milena/mln/core/site_set/p_centered.hh b/milena/mln/core/site_set/p_centered.hh index ca961c5..ec75518 100644 --- a/milena/mln/core/site_set/p_centered.hh +++ b/milena/mln/core/site_set/p_centered.hh @@ -38,6 +38,7 @@ */ # include <mln/core/internal/site_set_base.hh> +# include <mln/core/internal/site_set_iterator_base.hh> namespace mln diff --git a/milena/mln/fun/p2b/has.hh b/milena/mln/fun/p2b/has.hh index 142beb1..4e70840 100644 --- a/milena/mln/fun/p2b/has.hh +++ b/milena/mln/fun/p2b/has.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,11 +29,12 @@ #ifndef MLN_FUN_P2B_HAS_HH # define MLN_FUN_P2B_HAS_HH -/*! \file mln/fun/p2b/has.hh - * - * \brief Function "psite-> bool" that maps the call "ima.has(p)". - */ +/// \file mln/fun/p2b/has.hh +/// +/// Function "psite-> bool" that maps the call "ima.has(p)". + +# include <mln/core/concept/image.hh> # include <mln/core/concept/function.hh> # include <mln/metal/const.hh> # include <mln/metal/unconst.hh> diff --git a/milena/mln/fun/x2p/closest_point.hh b/milena/mln/fun/x2p/closest_point.hh index 8614cac..7fe3429 100644 --- a/milena/mln/fun/x2p/closest_point.hh +++ b/milena/mln/fun/x2p/closest_point.hh @@ -30,7 +30,8 @@ # include <mln/algebra/vec.hh> # include <mln/norm/l2.hh> - +# include <mln/core/site_set/p_array.hh> +# include <mln/core/site_set/box.hh> namespace mln { diff --git a/milena/mln/geom/seeds2tiling_roundness.hh b/milena/mln/geom/seeds2tiling_roundness.hh index 2da16b1..eb6c5a7 100644 --- a/milena/mln/geom/seeds2tiling_roundness.hh +++ b/milena/mln/geom/seeds2tiling_roundness.hh @@ -29,15 +29,15 @@ #ifndef MLN_GEOM_SEEDS2TILING_ROUNDNESS_HH # define MLN_GEOM_SEEDS2TILING_ROUNDNESS_HH -/*! \file mln/geom/seeds2tiling_roundness.hh - * - * \brief seeds2tiling with a method which makes tiles more roundness. - */ +/// \file mln/geom/seeds2tiling_roundness.hh +/// +/// seeds2tiling with a method which makes tiles more roundness. # include <map> - +# include <mln/core/concept/image.hh> # include <mln/core/concept/neighborhood.hh> +# include <mln/core/alias/w_window2d_int.hh> # include <mln/core/site_set/p_priority.hh> # include <mln/core/site_set/p_queue_fast.hh> # include <mln/core/routine/clone.hh> diff --git a/milena/mln/io/txt/save.hh b/milena/mln/io/txt/save.hh index ad5713b..597e07c 100644 --- a/milena/mln/io/txt/save.hh +++ b/milena/mln/io/txt/save.hh @@ -1,5 +1,5 @@ -// 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,18 +29,14 @@ #ifndef MLN_IO_TXT_SAVE_HH # define MLN_IO_TXT_SAVE_HH -/*! - * \file mln/io/txt/save.hh - * - * \brief Define a function which saves an image of kind TXT into - * given path. - * - */ +/// \file mln/io/txt/save.hh +/// +/// \brief Save an image as txt file. # include <iostream> # include <fstream> -# include <mln/core/concept/image.hh> +# include <mln/core/image/image2d.hh> # include <mln/metal/is.hh> @@ -54,11 +50,10 @@ namespace mln namespace txt { - /*! Save a Milena image as a txt image. - * - * \param[in] ima_ The image to save. Must be an image of char. - * \param[in] filename the destination. - */ + /// Save an image as txt file. + /// + /// \param[in] ima_ The image to save. Must be an image of char. + /// \param[in] filename the destination. void save(const image2d<char>& ima, const std::string& filename); diff --git a/milena/mln/metal/vec.hh b/milena/mln/metal/vec.hh index 4c7bdc5..36f00ab 100644 --- a/milena/mln/metal/vec.hh +++ b/milena/mln/metal/vec.hh @@ -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,16 +29,15 @@ #ifndef MLN_METAL_VEC_HH # define MLN_METAL_VEC_HH -/*! - * \file mln/metal/vec.hh - * - * \brief Definition of a generic vector class. - */ +/// \file mln/metal/vec.hh +/// +/// Definition of a generic vector class. # include <iostream> # include <cmath> # include <mln/core/concept/object.hh> +# include <mln/algebra/h_vec.hh> # include <mln/trait/all.hh> # include <mln/trait/value_.hh> diff --git a/milena/mln/morpho/internal/elementary.hh b/milena/mln/morpho/internal/elementary.hh index 8c08fc5..0136097 100644 --- a/milena/mln/morpho/internal/elementary.hh +++ b/milena/mln/morpho/internal/elementary.hh @@ -36,6 +36,7 @@ # include <mln/core/concept/image.hh> # include <mln/core/concept/neighborhood.hh> # include <mln/core/concept/accumulator.hh> +# include <mln/core/concept/meta_accumulator.hh> namespace mln diff --git a/milena/mln/morpho/tree/data.hh b/milena/mln/morpho/tree/data.hh index bafd3ea..2f91351 100644 --- a/milena/mln/morpho/tree/data.hh +++ b/milena/mln/morpho/tree/data.hh @@ -34,7 +34,7 @@ # include <mln/morpho/tree/compute_parent.hh> # include <mln/core/image/sub_image.hh> - +# include <mln/core/site_set/p_array.hh> namespace mln diff --git a/milena/mln/registration/get_rot.hh b/milena/mln/registration/get_rot.hh index 916f29f..6742abc 100644 --- a/milena/mln/registration/get_rot.hh +++ b/milena/mln/registration/get_rot.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,8 +29,10 @@ #ifndef MLN_REGISTRATION_GET_ROT_HH # define MLN_REGISTRATION_GET_ROT_HH +# include <mln/core/site_set/p_array.hh> # include <mln/fun/x2x/all.hh> # include <mln/algebra/quat.hh> +# include <mln/algebra/vec.hh> # include <mln/math/jacobi.hh> namespace mln diff --git a/milena/mln/registration/get_rtransf.hh b/milena/mln/registration/get_rtransf.hh index 3170acb..b380f30 100644 --- a/milena/mln/registration/get_rtransf.hh +++ b/milena/mln/registration/get_rtransf.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,8 +29,10 @@ #ifndef MLN_REGISTRATION_GET_RTRANSF_HH # define MLN_REGISTRATION_GET_RTRANSF_HH +# include <mln/core/site_set/p_array.hh> # include <mln/fun/x2x/all.hh> # include <mln/algebra/quat.hh> +# include <mln/algebra/vec.hh> # include <mln/math/jacobi.hh> # include <mln/registration/get_rot.hh> diff --git a/milena/mln/registration/multiscale.hh b/milena/mln/registration/multiscale.hh index 3a202f7..f54a759 100644 --- a/milena/mln/registration/multiscale.hh +++ b/milena/mln/registration/multiscale.hh @@ -28,7 +28,11 @@ #ifndef MLN_REGISTRATION_MULTISCALE_HH # define MLN_REGISTRATION_MULTISCALE_HH +# include <mln/core/concept/image.hh> +# include <mln/core/image/lazy_image.hh> +# include <mln/core/site_set/p_array.hh> # include <mln/registration/icp.hh> +# include <mln/registration/registration.hh> # include <mln/fun/x2p/closest_point.hh> namespace mln diff --git a/milena/mln/topo/face.hh b/milena/mln/topo/face.hh index 53b5ad3..3d25954 100644 --- a/milena/mln/topo/face.hh +++ b/milena/mln/topo/face.hh @@ -31,11 +31,12 @@ /// \file mln/topo/face.hh /// \brief Face of a complex. -#include <limits> -#include <vector> +# include <iostream> +# include <limits> +# include <vector> -#include <mln/core/contract.hh> -#include <mln/metal/bool.hh> +# include <mln/core/contract.hh> +# include <mln/metal/bool.hh> namespace mln diff --git a/milena/mln/topo/face_iter.hh b/milena/mln/topo/face_iter.hh index 2c0df92..4030594 100644 --- a/milena/mln/topo/face_iter.hh +++ b/milena/mln/topo/face_iter.hh @@ -34,6 +34,7 @@ # include <mln/topo/internal/complex_set_iterator_base.hh> # include <mln/topo/face.hh> +# include <mln/topo/face_iter.hh> // FIXME: Factor a bit more? (Using complex_set_iterator_base.) diff --git a/milena/mln/topo/n_face.hh b/milena/mln/topo/n_face.hh index ef1aad8..e7a6475 100644 --- a/milena/mln/topo/n_face.hh +++ b/milena/mln/topo/n_face.hh @@ -29,13 +29,15 @@ # define MLN_TOPO_N_FACE_HH /// \file mln/topo/n_face.hh +/// /// \brief n-face of a complex. -#include <limits> -#include <vector> - -#include <mln/core/contract.hh> +# include <iostream> +# include <limits> +# include <vector> +# include <mln/core/contract.hh> +# include <mln/metal/bool.hh> namespace mln { diff --git a/milena/mln/trait/op/ord.hh b/milena/mln/trait/op/ord.hh index c1b49ee..85fcd3d 100644 --- a/milena/mln/trait/op/ord.hh +++ b/milena/mln/trait/op/ord.hh @@ -33,7 +33,7 @@ /// Declaration of an ordering operator trait. # include <mln/trait/op/decl.hh> - +# include <mln/trait/solve.hh> namespace mln diff --git a/milena/mln/util/edge.hh b/milena/mln/util/edge.hh index f0895c5..57d4e49 100644 --- a/milena/mln/util/edge.hh +++ b/milena/mln/util/edge.hh @@ -33,8 +33,8 @@ /// Definition of a graph edge. # include <iostream> -# include <mln/util/internal/graph_edge_impl.hh> - +# include <mln/util/internal/edge_impl.hh> +# include <mln/core/concept/proxy.hh> namespace mln { diff --git a/milena/mln/util/internal/graph_edge_impl.hh b/milena/mln/util/internal/edge_impl.hh similarity index 91% rename from milena/mln/util/internal/graph_edge_impl.hh rename to milena/mln/util/internal/edge_impl.hh index 3b75086..5a2b59c 100644 --- a/milena/mln/util/internal/graph_edge_impl.hh +++ b/milena/mln/util/internal/edge_impl.hh @@ -25,10 +25,10 @@ // reasons why the executable file might be covered by the GNU General // Public License. -#ifndef MLN_CORE_INTERNAL_GRAPH_EDGE_IMPL_HH -# define MLN_CORE_INTERNAL_GRAPH_EDGE_IMPL_HH +#ifndef MLN_CORE_INTERNAL_EDGE_IMPL_HH +# define MLN_CORE_INTERNAL_EDGE_IMPL_HH -/// \file mln/util/internal/graph_edge_impl.hh +/// \file mln/util/internal/edge_impl.hh /// /// Define a couple of implementation classes to provide methods /// to classes of generalized edges. @@ -85,4 +85,4 @@ namespace mln #endif // ! MLN_INCLUDE_ONLY -#endif // ! MLN_CORE_INTERNAL_GRAPH_EDGE_IMPL_HH +#endif // ! MLN_CORE_INTERNAL_EDGE_IMPL_HH diff --git a/milena/mln/util/internal/graph_nbh_iter.hh b/milena/mln/util/internal/graph_nbh_iter.hh index e43c5ea..0780cab 100644 --- a/milena/mln/util/internal/graph_nbh_iter.hh +++ b/milena/mln/util/internal/graph_nbh_iter.hh @@ -30,6 +30,8 @@ # include <mln/core/concept/proxy.hh> # include <mln/util/internal/graph_nbh_iter_base.hh> +# include <mln/util/vertex.hh> +# include <mln/util/edge.hh> /// \file mln/util/internal/graph_nbh_iter.hh /// \brief Implementation for graph vertex iterators centered to a vertex. diff --git a/milena/mln/util/internal/graph_vertex_impl.hh b/milena/mln/util/internal/vertex_impl.hh similarity index 91% rename from milena/mln/util/internal/graph_vertex_impl.hh rename to milena/mln/util/internal/vertex_impl.hh index bfe6360..74c6f3c 100644 --- a/milena/mln/util/internal/graph_vertex_impl.hh +++ b/milena/mln/util/internal/vertex_impl.hh @@ -25,10 +25,10 @@ // reasons why the executable file might be covered by the GNU General // Public License. -#ifndef MLN_CORE_INTERNAL_GRAPH_VERTEX_IMPL_HH -# define MLN_CORE_INTERNAL_GRAPH_VERTEX_IMPL_HH +#ifndef MLN_CORE_INTERNAL_VERTEX_IMPL_HH +# define MLN_CORE_INTERNAL_VERTEX_IMPL_HH -/// \file mln/util/internal/graph_vertex_impl.hh +/// \file mln/util/internal/vertex_impl.hh /// /// Define a couple of implementation classes to provide methods /// to classes of generalized vertexs. @@ -85,4 +85,4 @@ namespace mln #endif // ! MLN_INCLUDE_ONLY -#endif // ! MLN_CORE_INTERNAL_GRAPH_VERTEX_IMPL_HH +#endif // ! MLN_CORE_INTERNAL_VERTEX_IMPL_HH diff --git a/milena/mln/util/multi_site.hh b/milena/mln/util/multi_site.hh index 2480369..3962751 100644 --- a/milena/mln/util/multi_site.hh +++ b/milena/mln/util/multi_site.hh @@ -35,6 +35,7 @@ # include <vector> +# include <mln/core/concept/object.hh> namespace mln { diff --git a/milena/mln/util/vertex.hh b/milena/mln/util/vertex.hh index 9787c03..b1242e6 100644 --- a/milena/mln/util/vertex.hh +++ b/milena/mln/util/vertex.hh @@ -29,7 +29,8 @@ # define MLN_UTIL_VERTEX_HH # include <iostream> -# include <mln/util/internal/graph_vertex_impl.hh> +# include <mln/util/internal/vertex_impl.hh> +# include <mln/core/concept/proxy.hh> /// \file mln/util/vertex.hh /// @@ -52,7 +53,7 @@ namespace mln /// Graph associated type. typedef G graph_t; - + /// Constructors. /// \{ vertex(); diff --git a/milena/tests/morpho/Makefile.am b/milena/tests/morpho/Makefile.am index 5c88623..631a2fd 100644 --- a/milena/tests/morpho/Makefile.am +++ b/milena/tests/morpho/Makefile.am @@ -8,7 +8,7 @@ SUBDIRS = \ tree check_PROGRAMS = \ - artificial_line_graph_image_wst \ +## artificial_line_graph_image_wst \ closing_area \ closing_height \ closing_volume \ @@ -21,7 +21,7 @@ check_PROGRAMS = \ erosion \ ## erosion_min_h \ gradient \ - graph_image_morpho \ +## graph_image_morpho \ ## graph_image_wst \ hit_or_miss \ laplacian \ @@ -82,8 +82,8 @@ combined_SOURCES = combined.cc # Complex tests. # # --------------- # -artificial_line_graph_image_wst_SOURCES = artificial_line_graph_image_wst.cc -artificial_line_graph_image_wst_CXXFLAGS = $(TESTS_CXXFLAGS_SPEED) +##artificial_line_graph_image_wst_SOURCES = artificial_line_graph_image_wst.cc +##artificial_line_graph_image_wst_CXXFLAGS = $(TESTS_CXXFLAGS_SPEED) dilation_SOURCES = dilation.cc dilation_CXXFLAGS = $(TESTS_CXXFLAGS_SPEED) diff --git a/milena/tests/unit_test/build_unit_test.sh b/milena/tests/unit_test/build_unit_test.sh index 6a6006e..495d332 100755 --- a/milena/tests/unit_test/build_unit_test.sh +++ b/milena/tests/unit_test/build_unit_test.sh @@ -1,6 +1,6 @@ #!/bin/sh -HEADERS=`find ../../mln -name "*.hh" | grep -vE "*.spe.hh" | sed s/"\.\.\/\.\.\/"//g` +HEADERS=`find ../../mln -name "*.hh" | grep -vE "*.spe.hh" | grep -v "mln/core/doc" | sed s/"\.\.\/\.\.\/"//g` rm -f Makefile.am rm -f *.hh *.cc -- 1.5.6.5
participants (1)
-
Guillaume Lazzara