
* milena/headers.mk: update includes part of the distribution. * milena/mln/core/image/fun_image.hh * milena/mln/fun/v2w_w2v/norm.hh * milena/mln/io/off/load.hh: cleanup comments. * milena/mln/topo/adj_higher_face_iter.hh * milena/mln/topo/adj_lower_face_iter.hh * milena/mln/topo/adj_m_face_iter.hh * milena/mln/value/graylevel.hh * milena/mln/value/graylevel_f.hh * milena/mln/value/internal/gray_.hh * milena/mln/value/internal/gray_f.hh: fix includes/forward declarations. * milena/tests/unit_test/Makefile.am, * milena/tests/unit_test/mln_core_image_fun_image.cc, * milena/tests/unit_test/mln_fun_internal_ch_function_value_impl.cc, * milena/tests/unit_test/mln_fun_meta_hue.cc, * milena/tests/unit_test/mln_fun_meta_inty.cc, * milena/tests/unit_test/mln_fun_meta_red.cc, * milena/tests/unit_test/mln_fun_meta_sat.cc, * milena/tests/unit_test/mln_fun_meta_to_enc.cc, * milena/tests/unit_test/mln_fun_v2v_ch_function_value.cc, * milena/tests/unit_test/mln_fun_v2w2v_cos.cc, * milena/tests/unit_test/mln_fun_v2w_w2v_norm.cc, * milena/tests/unit_test/mln_fun_vv2b_eq.cc, * milena/tests/unit_test/mln_fun_vv2b_ge.cc, * milena/tests/unit_test/mln_fun_vv2b_gt.cc, * milena/tests/unit_test/mln_fun_vv2b_implies.cc, * milena/tests/unit_test/mln_fun_vv2b_le.cc, * milena/tests/unit_test/mln_fun_vv2b_lt.cc, * milena/tests/unit_test/mln_trait_ch_function_value.cc: add new unit tests. --- milena/ChangeLog | 39 +++++++++++ milena/headers.mk | 17 +++++ milena/mln/core/image/fun_image.hh | 16 ++--- milena/mln/fun/v2w_w2v/norm.hh | 47 ++++++------- milena/mln/io/off/load.hh | 24 ++++---- milena/mln/topo/adj_higher_face_iter.hh | 6 +- milena/mln/topo/adj_lower_face_iter.hh | 6 +- milena/mln/topo/adj_m_face_iter.hh | 12 ++-- milena/mln/value/graylevel.hh | 14 ++-- milena/mln/value/graylevel_f.hh | 18 +++--- milena/mln/value/internal/gray_.hh | 70 +++++++++++--------- milena/mln/value/internal/gray_f.hh | 31 +++++++-- milena/tests/unit_test/Makefile.am | 34 ++++++++++ milena/tests/unit_test/mln_core_image_fun_image.cc | 11 +++ .../mln_fun_internal_ch_function_value_impl.cc | 11 +++ milena/tests/unit_test/mln_fun_meta_hue.cc | 11 +++ milena/tests/unit_test/mln_fun_meta_inty.cc | 11 +++ milena/tests/unit_test/mln_fun_meta_red.cc | 11 +++ milena/tests/unit_test/mln_fun_meta_sat.cc | 11 +++ milena/tests/unit_test/mln_fun_meta_to_enc.cc | 11 +++ .../unit_test/mln_fun_v2v_ch_function_value.cc | 11 +++ milena/tests/unit_test/mln_fun_v2w2v_cos.cc | 11 +++ milena/tests/unit_test/mln_fun_v2w_w2v_norm.cc | 11 +++ milena/tests/unit_test/mln_fun_vv2b_eq.cc | 11 +++ milena/tests/unit_test/mln_fun_vv2b_ge.cc | 11 +++ milena/tests/unit_test/mln_fun_vv2b_gt.cc | 11 +++ milena/tests/unit_test/mln_fun_vv2b_implies.cc | 11 +++ milena/tests/unit_test/mln_fun_vv2b_le.cc | 11 +++ milena/tests/unit_test/mln_fun_vv2b_lt.cc | 11 +++ .../tests/unit_test/mln_trait_ch_function_value.cc | 11 +++ 30 files changed, 410 insertions(+), 111 deletions(-) create mode 100644 milena/tests/unit_test/mln_core_image_fun_image.cc create mode 100644 milena/tests/unit_test/mln_fun_internal_ch_function_value_impl.cc create mode 100644 milena/tests/unit_test/mln_fun_meta_hue.cc create mode 100644 milena/tests/unit_test/mln_fun_meta_inty.cc create mode 100644 milena/tests/unit_test/mln_fun_meta_red.cc create mode 100644 milena/tests/unit_test/mln_fun_meta_sat.cc create mode 100644 milena/tests/unit_test/mln_fun_meta_to_enc.cc create mode 100644 milena/tests/unit_test/mln_fun_v2v_ch_function_value.cc create mode 100644 milena/tests/unit_test/mln_fun_v2w2v_cos.cc create mode 100644 milena/tests/unit_test/mln_fun_v2w_w2v_norm.cc create mode 100644 milena/tests/unit_test/mln_fun_vv2b_eq.cc create mode 100644 milena/tests/unit_test/mln_fun_vv2b_ge.cc create mode 100644 milena/tests/unit_test/mln_fun_vv2b_gt.cc create mode 100644 milena/tests/unit_test/mln_fun_vv2b_implies.cc create mode 100644 milena/tests/unit_test/mln_fun_vv2b_le.cc create mode 100644 milena/tests/unit_test/mln_fun_vv2b_lt.cc create mode 100644 milena/tests/unit_test/mln_trait_ch_function_value.cc diff --git a/milena/ChangeLog b/milena/ChangeLog index a4bb060..31fada1 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,44 @@ 2008-12-16 Guillaume Lazzara <z@lrde.epita.fr> + Fix tests. + + * milena/headers.mk: update includes part of the distribution. + + * milena/mln/core/image/fun_image.hh + * milena/mln/fun/v2w_w2v/norm.hh + * milena/mln/io/off/load.hh: cleanup comments. + + * milena/mln/topo/adj_higher_face_iter.hh + * milena/mln/topo/adj_lower_face_iter.hh + * milena/mln/topo/adj_m_face_iter.hh + * milena/mln/value/graylevel.hh + * milena/mln/value/graylevel_f.hh + * milena/mln/value/internal/gray_.hh + * milena/mln/value/internal/gray_f.hh: fix includes/forward + declarations. + + * milena/tests/unit_test/Makefile.am, + * milena/tests/unit_test/mln_core_image_fun_image.cc, + * milena/tests/unit_test/mln_fun_internal_ch_function_value_impl.cc, + * milena/tests/unit_test/mln_fun_meta_hue.cc, + * milena/tests/unit_test/mln_fun_meta_inty.cc, + * milena/tests/unit_test/mln_fun_meta_red.cc, + * milena/tests/unit_test/mln_fun_meta_sat.cc, + * milena/tests/unit_test/mln_fun_meta_to_enc.cc, + * milena/tests/unit_test/mln_fun_v2v_ch_function_value.cc, + * milena/tests/unit_test/mln_fun_v2w2v_cos.cc, + * milena/tests/unit_test/mln_fun_v2w_w2v_norm.cc, + * milena/tests/unit_test/mln_fun_vv2b_eq.cc, + * milena/tests/unit_test/mln_fun_vv2b_ge.cc, + * milena/tests/unit_test/mln_fun_vv2b_gt.cc, + * milena/tests/unit_test/mln_fun_vv2b_implies.cc, + * milena/tests/unit_test/mln_fun_vv2b_le.cc, + * milena/tests/unit_test/mln_fun_vv2b_lt.cc, + * milena/tests/unit_test/mln_trait_ch_function_value.cc: add new + unit tests. + +2008-12-16 Guillaume Lazzara <z@lrde.epita.fr> + Cleanup morpho. * milena/mln/morpho/closing.hh, diff --git a/milena/headers.mk b/milena/headers.mk index e528542..240f896 100644 --- a/milena/headers.mk +++ b/milena/headers.mk @@ -176,7 +176,9 @@ mln/fun/vv2v/min.hh \ mln/fun/vv2v/essential.hh \ mln/fun/internal/array_base.hh \ mln/fun/internal/x2x_linear_impl.hh \ +mln/fun/internal/ch_function_value_impl.hh \ mln/fun/internal/selector.hh \ +mln/fun/v2w_w2v/norm.hh \ mln/fun/p2v/ternary.hh \ mln/fun/p2v/iota.hh \ mln/fun/p2v/elifs.hh \ @@ -196,10 +198,18 @@ mln/fun/v2v/all.hh \ mln/fun/v2v/dec.hh \ mln/fun/v2v/abs.hh \ mln/fun/v2v/cast.hh \ +mln/fun/v2v/ch_function_value.hh \ mln/fun/v2v/rgb_to_hsi.hh \ mln/fun/v2v/enc.hh \ mln/fun/v2v/convert.hh \ mln/fun/v2v/essential.hh \ +mln/fun/v2w2v/cos.hh \ +mln/fun/vv2b/implies.hh \ +mln/fun/vv2b/le.hh \ +mln/fun/vv2b/gt.hh \ +mln/fun/vv2b/ge.hh \ +mln/fun/vv2b/lt.hh \ +mln/fun/vv2b/eq.hh \ mln/fun/cast.hh \ mln/fun/i2v/all.hh \ mln/fun/i2v/array.hh \ @@ -213,6 +223,11 @@ mln/fun/x2x/all.hh \ mln/fun/x2x/translation.hh \ mln/fun/x2x/rotation.hh \ mln/fun/x2x/essential.hh \ +mln/fun/meta/red.hh \ +mln/fun/meta/hue.hh \ +mln/fun/meta/inty.hh \ +mln/fun/meta/sat.hh \ +mln/fun/meta/to_enc.hh \ mln/fun/x2v/linear.hh \ mln/fun/x2v/bilinear.hh \ mln/fun/x2v/all.hh \ @@ -415,6 +430,7 @@ mln/trait/value/essential.hh \ mln/trait/images.hh \ mln/trait/window/props.hh \ mln/trait/window/print.hh \ +mln/trait/ch_function_value.hh \ mln/trait/ch_value.hh \ mln/trait/solve.hh \ mln/trait/solve_unary.hh \ @@ -854,6 +870,7 @@ mln/core/image/lazy_image.hh \ mln/core/image/t_image.hh \ mln/core/image/hexa_piter.hh \ mln/core/image/value_enc_image.hh \ +mln/core/image/fun_image.hh \ mln/core/image/sub_image_if.hh \ mln/core/image/all.hh \ mln/core/image/mono_rle_image.hh \ diff --git a/milena/mln/core/image/fun_image.hh b/milena/mln/core/image/fun_image.hh index 505b012..f338d08 100644 --- a/milena/mln/core/image/fun_image.hh +++ b/milena/mln/core/image/fun_image.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,10 @@ #ifndef MLN_CORE_IMAGE_FUN_IMAGE_HH # define MLN_CORE_IMAGE_FUN_IMAGE_HH -/*! \file mln/core/image/fun_image.hh - * - * \brief Definition of an image morpher that make the user see the - * image through a function - * - */ +/// \file mln/core/image/fun_image.hh +/// +/// Definition of an image morpher that make the user see the +/// image through a function # include <mln/core/internal/image_value_morpher.hh> # include <mln/trait/images.hh> @@ -45,7 +44,7 @@ namespace mln { - // Fwd decl. + // Forward declaration. template <typename F, typename I> class fun_image; namespace internal @@ -93,8 +92,7 @@ namespace mln - /*! \brief Class of image morpher which takes allow to view an image throught a morpher - */ + /// Class of image morpher which takes allow to view an image throught a morpher template <typename F, typename I> struct fun_image : public internal::image_value_morpher< I, mln_result(F), fun_image<F,I> > diff --git a/milena/mln/fun/v2w_w2v/norm.hh b/milena/mln/fun/v2w_w2v/norm.hh index 51a2914..4dbb7cb 100644 --- a/milena/mln/fun/v2w_w2v/norm.hh +++ b/milena/mln/fun/v2w_w2v/norm.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2007 EPITA Research and Development Laboratory +// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of the Olena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -28,12 +29,11 @@ #ifndef MLN_FUN_V2W_W2V_NORM_HH # define MLN_FUN_V2W_W2V_NORM_HH -/*! \file mln/fun/v2w_w2v/norm.hh - * - * \brief Norm functors. - * - * \see mln/norm/. - */ +/// \file mln/fun/v2w_w2v/norm.hh +/// +/// \brief Norm functors. +/// +/// \see mln/norm/. # include <mln/core/concept/function.hh> # include <mln/trait/value_.hh> @@ -50,12 +50,11 @@ namespace mln namespace v2w_w2v { - /*! \brief L1-norm. - * - * \c V is the type of input values; \c R is the result type. - * - * \see mln::norm::l1. - */ + /// L1-norm. + /// + /// \c V is the type of input values; \c R is the result type. + /// + /// \see mln::norm::l1. template <typename V, typename R> struct l1_norm : public Function_v2w_w2v< l1_norm<V, R> > { @@ -64,12 +63,11 @@ namespace mln V f_1(const V& v, const R& r) const; }; - /*! \brief L2-norm. - * - * \c V is the type of input values; \c R is the result type. - * - * \see mln::norm::l2. - */ + /// L2-norm. + /// + /// \c V is the type of input values; \c R is the result type. + /// + /// \see mln::norm::l2. template <typename V, typename R> struct l2_norm : public Function_v2w_w2v< l2_norm<V, R> > { @@ -78,12 +76,11 @@ namespace mln V f_1(const V& v, const R& r) const; }; - /*! \brief L-infty norm. - * - * \c V is the type of input values; \c R is the result type. - * - * \see mln::norm::linfty. - */ + /// L-infty norm. + /// + /// \c V is the type of input values; \c R is the result type. + /// + /// \see mln::norm::linfty. template <typename V, typename R> struct linfty_norm : public Function_v2w_w2v< linfty_norm<V, R> > { diff --git a/milena/mln/io/off/load.hh b/milena/mln/io/off/load.hh index 5bfebf3..03fc3f3 100644 --- a/milena/mln/io/off/load.hh +++ b/milena/mln/io/off/load.hh @@ -29,7 +29,7 @@ # define MLN_IO_OFF_LOAD_HH /// \file mln/io/off/load.hh -/// \brief Input loading function for OFF files. +/// Input loading function for OFF files. /// /// \see http://shape.cs.princeton.edu/benchmark/documentation/off_format.html /// \see https://people.scs.fsu.edu/~burkardt/html/off_format.html @@ -54,7 +54,7 @@ namespace mln namespace off { - /** \brief Load a (binary) OFF image into a complex image. + /** Load a (binary) OFF image into a complex image. \param[out] ima A reference to the image to construct. \param[in] filename The name of the file to load. @@ -63,7 +63,7 @@ namespace mln existence of faces. */ void load(bin_2complex_image3df& ima, const std::string& filename); - /** \brief Load a floating-point OFF image into a complex image. + /** Load a floating-point OFF image into a complex image. \param[out] ima A reference to the image to construct. \param[in] filename The name of the file to load. @@ -88,7 +88,7 @@ namespace mln /// Type of the domain. typedef mln_pset(I) domain; - /// \brief Constructor, with static checks. + /// Constructor, with static checks. off_loader(); /// Load an image from \a filename into \a ima. @@ -103,15 +103,15 @@ namespace mln struct bin_off_loader : public off_loader< bin_2complex_image3df, bin_off_loader > { - /// \brief Read face data. + /// Read face data. /// /// Dummy, does nothings (but required by the super class). void read_face_data(std::istream& istr); - /// \brief Assign values to image. + /// Assign values to image. void assign(values& vs, const domain& s); - /// \brief Pre-allocate data. + /// Pre-allocate data. /// /// Dummy, does nothings (but required by the super class). void reserve(unsigned nvertices, unsigned nedges, unsigned nfaces); @@ -121,16 +121,16 @@ namespace mln struct float_off_loader : public off_loader< float_2complex_image3df, float_off_loader > { - /// \brief Read face data. + /// Read face data. void read_face_data(std::istream& istr); - /// \brief Pre-allocate data. + /// Pre-allocate data. void reserve(unsigned nvertices, unsigned nedges, unsigned nfaces); - /// \brief Assign values to image. + /// Assign values to image. void assign(values& vs, const domain& s); - /// \brief 2-face floating-point values. + /// 2-face floating-point values. std::vector<float> face_value; }; @@ -416,7 +416,7 @@ namespace mln in the following comment. */ - /** \brief Reading values. + /** Reading values. From https://people.scs.fsu.edu/~burkardt/html/off_format.html: diff --git a/milena/mln/topo/adj_higher_face_iter.hh b/milena/mln/topo/adj_higher_face_iter.hh index fcd9d0f..120b234 100644 --- a/milena/mln/topo/adj_higher_face_iter.hh +++ b/milena/mln/topo/adj_higher_face_iter.hh @@ -55,11 +55,11 @@ namespace mln template <typename C, typename F, typename E> class backward_complex_relative_iterator_base; - template <unsigned D> - struct algebraic_face; - } // end of mln::topo::internal + template <unsigned D> + struct algebraic_face; + /*------------------------------------. | topo::adj_higher_face_fwd_iter<D>. | `------------------------------------*/ diff --git a/milena/mln/topo/adj_lower_face_iter.hh b/milena/mln/topo/adj_lower_face_iter.hh index 22c965a..293da90 100644 --- a/milena/mln/topo/adj_lower_face_iter.hh +++ b/milena/mln/topo/adj_lower_face_iter.hh @@ -55,11 +55,11 @@ namespace mln template <typename C, typename F, typename E> class backward_complex_relative_iterator_base; - template <unsigned D> - struct algebraic_face; - } // end of namespace mln::topo::internal + template <unsigned D> + struct algebraic_face; + /*-----------------------------------. | topo::adj_lower_face_fwd_iter<D>. | diff --git a/milena/mln/topo/adj_m_face_iter.hh b/milena/mln/topo/adj_m_face_iter.hh index e314dfb..0cd69fa 100644 --- a/milena/mln/topo/adj_m_face_iter.hh +++ b/milena/mln/topo/adj_m_face_iter.hh @@ -30,7 +30,7 @@ /// \file mln/topo/adj_m_face_iter.hh -/// \brief Definition of forward and backward iterators on all the +/// Definition of forward and backward iterators on all the /// m-faces transitively adjacent to a (reference) n-face in a /// complex. @@ -59,7 +59,7 @@ namespace mln | topo::adj_m_face_fwd_iter<D>. | `-------------------------------*/ - /** \brief Forward iterator on all the m-faces transitively + /** Forward iterator on all the m-faces transitively adjacent to a (reference) n-face in a complex. \tparam D The dimension of the complex this iterator belongs to. @@ -94,7 +94,7 @@ namespace mln adj_m_face_fwd_iter(const Fref& f_ref, unsigned m); /// \} - /// \brief Compute the set of faces adjacent to the reference face. + /// Compute the set of faces adjacent to the reference face. /// /// The computation is delegated to /// mln::topo::internal::adj_m_face_iterator. @@ -106,7 +106,7 @@ namespace mln | topo::adj_m_face_bkd_iter<D>. | `-------------------------------*/ - /** \brief Backward iterator on all the m-faces transitively + /** Backward iterator on all the m-faces transitively adjacent to a (reference) n-face in a complex. \tparam D The dimension of the complex this iterator belongs to. @@ -141,7 +141,7 @@ namespace mln adj_m_face_bkd_iter(const Fref& f_ref, unsigned m); /// \} - /// \brief Compute the set of faces adjacent to the reference face. + /// Compute the set of faces adjacent to the reference face. /// /// The computation is delegated to /// mln::topo::internal::adj_m_face_iterator. @@ -289,7 +289,7 @@ namespace mln if (center.n() == m_) return; - + typedef std::vector < topo::algebraic_face<D> > faces_t; typedef std::set < topo::algebraic_face<D> > faces_set_t; diff --git a/milena/mln/value/graylevel.hh b/milena/mln/value/graylevel.hh index 9cd6071..3d89097 100644 --- a/milena/mln/value/graylevel.hh +++ b/milena/mln/value/graylevel.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2006, 2007 EPITA Research and Development Laboratory +// Copyright (C) 2006, 2007, 2008 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of the Olena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -28,10 +29,9 @@ #ifndef MLN_VALUE_GRAYLEVEL_HH # define MLN_VALUE_GRAYLEVEL_HH -/*! \file mln/value/graylevel.hh - * - * \brief Definition of the mln::value::graylevel class. - */ +/// \file mln/value/graylevel.hh +/// +/// Definition of the mln::value::graylevel class. # include <iostream> @@ -53,7 +53,7 @@ namespace mln namespace literal { - /// \{ Fwd decls. + /// \{ Forward declarations. struct black_t; struct medium_gray_t; struct white_t; @@ -62,7 +62,7 @@ namespace mln namespace value { - /// \{ Fwd decls. + /// \{ Forward declarations. namespace internal { template <unsigned n> class gray_; diff --git a/milena/mln/value/graylevel_f.hh b/milena/mln/value/graylevel_f.hh index 0b36ba0..6bf30f9 100644 --- a/milena/mln/value/graylevel_f.hh +++ b/milena/mln/value/graylevel_f.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2006, 2007 EPITA Research and Development Laboratory +// Copyright (C) 2006, 2007, 2008 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of the Olena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -28,10 +29,9 @@ #ifndef MLN_VALUE_GRAYLEVEL_F_HH # define MLN_VALUE_GRAYLEVEL_F_HH -/*! \file mln/value/graylevel_f.hh - * - * \brief Definition of the mln::value::graylevel_f class. - */ +/// \file mln/value/graylevel_f.hh +/// +/// Definition of the mln::value::graylevel_f class. # include <iostream> @@ -51,7 +51,7 @@ namespace mln namespace literal { - /// \{ Fwd decls. + /// \{ Forward declarations. struct black_t; struct medium_gray_t; struct white_t; @@ -59,7 +59,7 @@ namespace mln } namespace value { - /// \{ Fwd decls. + /// \{ Forward declarations. namespace internal {class gray_f; } struct graylevel_f; template <unsigned n> struct graylevel; @@ -467,7 +467,7 @@ namespace mln } // end of namespace mln -#include <mln/value/internal/gray_f.hh> -#include <mln/value/internal/gray_.hh> +//# include <mln/value/internal/gray_f.hh> +///# include <mln/value/internal/gray_.hh> #endif // ! MLN_VALUE_GRAYLEVEL_F_HH diff --git a/milena/mln/value/internal/gray_.hh b/milena/mln/value/internal/gray_.hh index 81ed72b..8faf99d 100644 --- a/milena/mln/value/internal/gray_.hh +++ b/milena/mln/value/internal/gray_.hh @@ -29,11 +29,9 @@ #ifndef MLN_VALUE_INTERNAL_GRAY__HH # define MLN_VALUE_INTERNAL_GRAY__HH -/*! \file mln/value/internal/gray_.hh - * - * \brief FIXME. - * - */ +/// \file mln/value/internal/gray_.hh +/// +/// FIXME. # include <iostream> # include <cmath> @@ -42,14 +40,16 @@ # include <mln/metal/math/pow.hh> # include <mln/value/concept/integer.hh> +# include <mln/value/internal/value_like.hh> +# include <mln/value/graylevel_f.hh> namespace mln { namespace literal { - /// \{ Fwd decls. + /// \{ Forward declarations. struct black_t; struct white_t; /// \} @@ -57,13 +57,15 @@ namespace mln namespace value { - /// \{ Fwd decls. + /// \{ Forward declarations. + template <unsigned n> + struct graylevel; template <unsigned N> class graylevel; class graylevel_f; namespace internal { template <unsigned n> class gray_; - class gray_f; + struct gray_f; } /// \} } @@ -176,42 +178,49 @@ namespace mln operator graylevel<m>() const; /// Conversion to graylevel_f. - operator graylevel_f() const; + operator graylevel_f() const; }; // Operators. - template <unsigned n> - std::ostream& operator<<(std::ostream& ostr, const gray_<n>& g); + template <unsigned n> + std::ostream& operator<<(std::ostream& ostr, const gray_<n>& g); - template <unsigned n, unsigned m> - bool operator==(const gray_<n>& lhs, const gray_<m>& rhs); - template <unsigned n, unsigned m> - bool operator<(const gray_<n>& lhs, const gray_<m>& rhs); + template <unsigned n, unsigned m> + bool operator==(const gray_<n>& lhs, const gray_<m>& rhs); + template <unsigned n, unsigned m> + bool operator<(const gray_<n>& lhs, const gray_<m>& rhs); - template <unsigned n, unsigned m> - mln_trait_op_plus(gray_<n>, gray_<m>) - operator+(const gray_<n>& lhs, const gray_<m>& rhs); + template <unsigned n, unsigned m> + mln_trait_op_plus(gray_<n>, gray_<m>) + operator+(const gray_<n>& lhs, const gray_<m>& rhs); - template <unsigned n, unsigned m> - mln_trait_op_minus(gray_<n>, gray_<m>) - operator-(const gray_<n>& lhs, const gray_<m>& rhs); + template <unsigned n, unsigned m> + mln_trait_op_minus(gray_<n>, gray_<m>) + operator-(const gray_<n>& lhs, const gray_<m>& rhs); - template <unsigned n> - gray_<n> operator*(int s, const gray_<n>& rhs); - template <unsigned n> - gray_<n> operator*(const gray_<n>& lhs, int s); - template <unsigned n> - gray_<n> operator/(const gray_<n>& lhs, int s); + template <unsigned n> + gray_<n> operator*(int s, const gray_<n>& rhs); + template <unsigned n> + gray_<n> operator*(const gray_<n>& lhs, int s); + template <unsigned n> + gray_<n> operator/(const gray_<n>& lhs, int s); + + } // end of namespace mln::value::internal + + } // end of namespace mln::value - } // end of namespace mln::value::internal +} // end of namespace mln -} // end of namespace mln::value +# include <mln/value/internal/gray_f.hh> +namespace mln +{ + # ifndef MLN_INCLUDE_ONLY namespace value @@ -583,7 +592,7 @@ namespace mln // Op / Builtin. - /// \{ Fwd decls. + /// \{ Forward declarations. namespace internal { class gray_f; @@ -718,5 +727,4 @@ namespace trait } // end of namespace mln - #endif // ! MLN_INTERNAL_VALUE_GRAY__HH diff --git a/milena/mln/value/internal/gray_f.hh b/milena/mln/value/internal/gray_f.hh index b7ab9e2..2ff9551 100644 --- a/milena/mln/value/internal/gray_f.hh +++ b/milena/mln/value/internal/gray_f.hh @@ -29,10 +29,10 @@ #ifndef MLN_VALUE_INTERNAL_GRAY_F_HH # define MLN_VALUE_INTERNAL_GRAY_F_HH -/*! \file mln/value/internal/gray_f.hh - * - * \brief Definition of the mln::value::gray_f class. - */ +/// \file mln/value/internal/gray_f.hh +/// +/// Definition of the mln::value::gray_f class. + # include <iostream> @@ -46,13 +46,14 @@ # include <mln/value/float01_f.hh> # include <mln/trait/value_.hh> +# include <mln/value/graylevel_f.hh> namespace mln { namespace literal { - /// \{ Fwd decls. + /// \{ Forward declarations. struct black_t; struct medium_gray_t; struct white_t; @@ -60,7 +61,7 @@ namespace mln } namespace value { - /// \{ Fwd decls. + /// \{ Forward declarations. namespace internal { template <unsigned n> class gray_; @@ -198,6 +199,24 @@ namespace mln /// Op<<. std::ostream& operator<<(std::ostream& ostr, const gray_f& g); + } // end of namespace mln::value::internal + + } // end of namespace mln::value + +} // end of namespace mln + + +# include <mln/value/internal/gray_.hh> + + +namespace mln +{ + + namespace value + { + + namespace internal + { # ifndef MLN_INCLUDE_ONLY diff --git a/milena/tests/unit_test/Makefile.am b/milena/tests/unit_test/Makefile.am index 0ab70a9..a740cc1 100644 --- a/milena/tests/unit_test/Makefile.am +++ b/milena/tests/unit_test/Makefile.am @@ -179,7 +179,9 @@ mln_fun_vv2v_min \ mln_fun_vv2v_essential \ mln_fun_internal_array_base \ mln_fun_internal_x2x_linear_impl \ +mln_fun_internal_ch_function_value_impl \ mln_fun_internal_selector \ +mln_fun_v2w_w2v_norm \ mln_fun_p2v_ternary \ mln_fun_p2v_iota \ mln_fun_p2v_elifs \ @@ -199,10 +201,18 @@ mln_fun_v2v_all \ mln_fun_v2v_dec \ mln_fun_v2v_abs \ mln_fun_v2v_cast \ +mln_fun_v2v_ch_function_value \ mln_fun_v2v_rgb_to_hsi \ mln_fun_v2v_enc \ mln_fun_v2v_convert \ mln_fun_v2v_essential \ +mln_fun_v2w2v_cos \ +mln_fun_vv2b_implies \ +mln_fun_vv2b_le \ +mln_fun_vv2b_gt \ +mln_fun_vv2b_ge \ +mln_fun_vv2b_lt \ +mln_fun_vv2b_eq \ mln_fun_cast \ mln_fun_i2v_all \ mln_fun_i2v_array \ @@ -216,6 +226,11 @@ mln_fun_x2x_all \ mln_fun_x2x_translation \ mln_fun_x2x_rotation \ mln_fun_x2x_essential \ +mln_fun_meta_red \ +mln_fun_meta_hue \ +mln_fun_meta_inty \ +mln_fun_meta_sat \ +mln_fun_meta_to_enc \ mln_fun_x2v_linear \ mln_fun_x2v_bilinear \ mln_fun_x2v_all \ @@ -411,6 +426,7 @@ mln_trait_value_essential \ mln_trait_images \ mln_trait_window_props \ mln_trait_window_print \ +mln_trait_ch_function_value \ mln_trait_ch_value \ mln_trait_solve \ mln_trait_solve_unary \ @@ -828,6 +844,7 @@ mln_core_image_lazy_image \ mln_core_image_t_image \ mln_core_image_hexa_piter \ mln_core_image_value_enc_image \ +mln_core_image_fun_image \ mln_core_image_sub_image_if \ mln_core_image_all \ mln_core_image_mono_rle_image \ @@ -1154,7 +1171,9 @@ mln_fun_vv2v_min_SOURCES = mln_fun_vv2v_min.cc mln_fun_vv2v_essential_SOURCES = mln_fun_vv2v_essential.cc mln_fun_internal_array_base_SOURCES = mln_fun_internal_array_base.cc mln_fun_internal_x2x_linear_impl_SOURCES = mln_fun_internal_x2x_linear_impl.cc +mln_fun_internal_ch_function_value_impl_SOURCES = mln_fun_internal_ch_function_value_impl.cc mln_fun_internal_selector_SOURCES = mln_fun_internal_selector.cc +mln_fun_v2w_w2v_norm_SOURCES = mln_fun_v2w_w2v_norm.cc mln_fun_p2v_ternary_SOURCES = mln_fun_p2v_ternary.cc mln_fun_p2v_iota_SOURCES = mln_fun_p2v_iota.cc mln_fun_p2v_elifs_SOURCES = mln_fun_p2v_elifs.cc @@ -1174,10 +1193,18 @@ mln_fun_v2v_all_SOURCES = mln_fun_v2v_all.cc mln_fun_v2v_dec_SOURCES = mln_fun_v2v_dec.cc mln_fun_v2v_abs_SOURCES = mln_fun_v2v_abs.cc mln_fun_v2v_cast_SOURCES = mln_fun_v2v_cast.cc +mln_fun_v2v_ch_function_value_SOURCES = mln_fun_v2v_ch_function_value.cc mln_fun_v2v_rgb_to_hsi_SOURCES = mln_fun_v2v_rgb_to_hsi.cc mln_fun_v2v_enc_SOURCES = mln_fun_v2v_enc.cc mln_fun_v2v_convert_SOURCES = mln_fun_v2v_convert.cc mln_fun_v2v_essential_SOURCES = mln_fun_v2v_essential.cc +mln_fun_v2w2v_cos_SOURCES = mln_fun_v2w2v_cos.cc +mln_fun_vv2b_implies_SOURCES = mln_fun_vv2b_implies.cc +mln_fun_vv2b_le_SOURCES = mln_fun_vv2b_le.cc +mln_fun_vv2b_gt_SOURCES = mln_fun_vv2b_gt.cc +mln_fun_vv2b_ge_SOURCES = mln_fun_vv2b_ge.cc +mln_fun_vv2b_lt_SOURCES = mln_fun_vv2b_lt.cc +mln_fun_vv2b_eq_SOURCES = mln_fun_vv2b_eq.cc mln_fun_cast_SOURCES = mln_fun_cast.cc mln_fun_i2v_all_SOURCES = mln_fun_i2v_all.cc mln_fun_i2v_array_SOURCES = mln_fun_i2v_array.cc @@ -1191,6 +1218,11 @@ mln_fun_x2x_all_SOURCES = mln_fun_x2x_all.cc mln_fun_x2x_translation_SOURCES = mln_fun_x2x_translation.cc mln_fun_x2x_rotation_SOURCES = mln_fun_x2x_rotation.cc mln_fun_x2x_essential_SOURCES = mln_fun_x2x_essential.cc +mln_fun_meta_red_SOURCES = mln_fun_meta_red.cc +mln_fun_meta_hue_SOURCES = mln_fun_meta_hue.cc +mln_fun_meta_inty_SOURCES = mln_fun_meta_inty.cc +mln_fun_meta_sat_SOURCES = mln_fun_meta_sat.cc +mln_fun_meta_to_enc_SOURCES = mln_fun_meta_to_enc.cc mln_fun_x2v_linear_SOURCES = mln_fun_x2v_linear.cc mln_fun_x2v_bilinear_SOURCES = mln_fun_x2v_bilinear.cc mln_fun_x2v_all_SOURCES = mln_fun_x2v_all.cc @@ -1386,6 +1418,7 @@ mln_trait_value_essential_SOURCES = mln_trait_value_essential.cc mln_trait_images_SOURCES = mln_trait_images.cc mln_trait_window_props_SOURCES = mln_trait_window_props.cc mln_trait_window_print_SOURCES = mln_trait_window_print.cc +mln_trait_ch_function_value_SOURCES = mln_trait_ch_function_value.cc mln_trait_ch_value_SOURCES = mln_trait_ch_value.cc mln_trait_solve_SOURCES = mln_trait_solve.cc mln_trait_solve_unary_SOURCES = mln_trait_solve_unary.cc @@ -1803,6 +1836,7 @@ mln_core_image_lazy_image_SOURCES = mln_core_image_lazy_image.cc mln_core_image_t_image_SOURCES = mln_core_image_t_image.cc mln_core_image_hexa_piter_SOURCES = mln_core_image_hexa_piter.cc mln_core_image_value_enc_image_SOURCES = mln_core_image_value_enc_image.cc +mln_core_image_fun_image_SOURCES = mln_core_image_fun_image.cc mln_core_image_sub_image_if_SOURCES = mln_core_image_sub_image_if.cc mln_core_image_all_SOURCES = mln_core_image_all.cc mln_core_image_mono_rle_image_SOURCES = mln_core_image_mono_rle_image.cc diff --git a/milena/tests/unit_test/mln_core_image_fun_image.cc b/milena/tests/unit_test/mln_core_image_fun_image.cc new file mode 100644 index 0000000..36bde5f --- /dev/null +++ b/milena/tests/unit_test/mln_core_image_fun_image.cc @@ -0,0 +1,11 @@ +// Unit test for mln/core/image/fun_image.hh. +// Generated by ./build_unit_test.sh, do not modify. + +// Include the file twice, so we detect missing inclusion guards. +#include <mln/core/image/fun_image.hh> +#include <mln/core/image/fun_image.hh> + +int main() +{ + // Nothing. +} diff --git a/milena/tests/unit_test/mln_fun_internal_ch_function_value_impl.cc b/milena/tests/unit_test/mln_fun_internal_ch_function_value_impl.cc new file mode 100644 index 0000000..63166aa --- /dev/null +++ b/milena/tests/unit_test/mln_fun_internal_ch_function_value_impl.cc @@ -0,0 +1,11 @@ +// Unit test for mln/fun/internal/ch_function_value_impl.hh. +// Generated by ./build_unit_test.sh, do not modify. + +// Include the file twice, so we detect missing inclusion guards. +#include <mln/fun/internal/ch_function_value_impl.hh> +#include <mln/fun/internal/ch_function_value_impl.hh> + +int main() +{ + // Nothing. +} diff --git a/milena/tests/unit_test/mln_fun_meta_hue.cc b/milena/tests/unit_test/mln_fun_meta_hue.cc new file mode 100644 index 0000000..e65142d --- /dev/null +++ b/milena/tests/unit_test/mln_fun_meta_hue.cc @@ -0,0 +1,11 @@ +// Unit test for mln/fun/meta/hue.hh. +// Generated by ./build_unit_test.sh, do not modify. + +// Include the file twice, so we detect missing inclusion guards. +#include <mln/fun/meta/hue.hh> +#include <mln/fun/meta/hue.hh> + +int main() +{ + // Nothing. +} diff --git a/milena/tests/unit_test/mln_fun_meta_inty.cc b/milena/tests/unit_test/mln_fun_meta_inty.cc new file mode 100644 index 0000000..6b31236 --- /dev/null +++ b/milena/tests/unit_test/mln_fun_meta_inty.cc @@ -0,0 +1,11 @@ +// Unit test for mln/fun/meta/inty.hh. +// Generated by ./build_unit_test.sh, do not modify. + +// Include the file twice, so we detect missing inclusion guards. +#include <mln/fun/meta/inty.hh> +#include <mln/fun/meta/inty.hh> + +int main() +{ + // Nothing. +} diff --git a/milena/tests/unit_test/mln_fun_meta_red.cc b/milena/tests/unit_test/mln_fun_meta_red.cc new file mode 100644 index 0000000..343f7ed --- /dev/null +++ b/milena/tests/unit_test/mln_fun_meta_red.cc @@ -0,0 +1,11 @@ +// Unit test for mln/fun/meta/red.hh. +// Generated by ./build_unit_test.sh, do not modify. + +// Include the file twice, so we detect missing inclusion guards. +#include <mln/fun/meta/red.hh> +#include <mln/fun/meta/red.hh> + +int main() +{ + // Nothing. +} diff --git a/milena/tests/unit_test/mln_fun_meta_sat.cc b/milena/tests/unit_test/mln_fun_meta_sat.cc new file mode 100644 index 0000000..ee3e7b1 --- /dev/null +++ b/milena/tests/unit_test/mln_fun_meta_sat.cc @@ -0,0 +1,11 @@ +// Unit test for mln/fun/meta/sat.hh. +// Generated by ./build_unit_test.sh, do not modify. + +// Include the file twice, so we detect missing inclusion guards. +#include <mln/fun/meta/sat.hh> +#include <mln/fun/meta/sat.hh> + +int main() +{ + // Nothing. +} diff --git a/milena/tests/unit_test/mln_fun_meta_to_enc.cc b/milena/tests/unit_test/mln_fun_meta_to_enc.cc new file mode 100644 index 0000000..01a94ca --- /dev/null +++ b/milena/tests/unit_test/mln_fun_meta_to_enc.cc @@ -0,0 +1,11 @@ +// Unit test for mln/fun/meta/to_enc.hh. +// Generated by ./build_unit_test.sh, do not modify. + +// Include the file twice, so we detect missing inclusion guards. +#include <mln/fun/meta/to_enc.hh> +#include <mln/fun/meta/to_enc.hh> + +int main() +{ + // Nothing. +} diff --git a/milena/tests/unit_test/mln_fun_v2v_ch_function_value.cc b/milena/tests/unit_test/mln_fun_v2v_ch_function_value.cc new file mode 100644 index 0000000..6f37975 --- /dev/null +++ b/milena/tests/unit_test/mln_fun_v2v_ch_function_value.cc @@ -0,0 +1,11 @@ +// Unit test for mln/fun/v2v/ch_function_value.hh. +// Generated by ./build_unit_test.sh, do not modify. + +// Include the file twice, so we detect missing inclusion guards. +#include <mln/fun/v2v/ch_function_value.hh> +#include <mln/fun/v2v/ch_function_value.hh> + +int main() +{ + // Nothing. +} diff --git a/milena/tests/unit_test/mln_fun_v2w2v_cos.cc b/milena/tests/unit_test/mln_fun_v2w2v_cos.cc new file mode 100644 index 0000000..860a918 --- /dev/null +++ b/milena/tests/unit_test/mln_fun_v2w2v_cos.cc @@ -0,0 +1,11 @@ +// Unit test for mln/fun/v2w2v/cos.hh. +// Generated by ./build_unit_test.sh, do not modify. + +// Include the file twice, so we detect missing inclusion guards. +#include <mln/fun/v2w2v/cos.hh> +#include <mln/fun/v2w2v/cos.hh> + +int main() +{ + // Nothing. +} diff --git a/milena/tests/unit_test/mln_fun_v2w_w2v_norm.cc b/milena/tests/unit_test/mln_fun_v2w_w2v_norm.cc new file mode 100644 index 0000000..4d6a930 --- /dev/null +++ b/milena/tests/unit_test/mln_fun_v2w_w2v_norm.cc @@ -0,0 +1,11 @@ +// Unit test for mln/fun/v2w_w2v/norm.hh. +// Generated by ./build_unit_test.sh, do not modify. + +// Include the file twice, so we detect missing inclusion guards. +#include <mln/fun/v2w_w2v/norm.hh> +#include <mln/fun/v2w_w2v/norm.hh> + +int main() +{ + // Nothing. +} diff --git a/milena/tests/unit_test/mln_fun_vv2b_eq.cc b/milena/tests/unit_test/mln_fun_vv2b_eq.cc new file mode 100644 index 0000000..66efcd7 --- /dev/null +++ b/milena/tests/unit_test/mln_fun_vv2b_eq.cc @@ -0,0 +1,11 @@ +// Unit test for mln/fun/vv2b/eq.hh. +// Generated by ./build_unit_test.sh, do not modify. + +// Include the file twice, so we detect missing inclusion guards. +#include <mln/fun/vv2b/eq.hh> +#include <mln/fun/vv2b/eq.hh> + +int main() +{ + // Nothing. +} diff --git a/milena/tests/unit_test/mln_fun_vv2b_ge.cc b/milena/tests/unit_test/mln_fun_vv2b_ge.cc new file mode 100644 index 0000000..531f5c7 --- /dev/null +++ b/milena/tests/unit_test/mln_fun_vv2b_ge.cc @@ -0,0 +1,11 @@ +// Unit test for mln/fun/vv2b/ge.hh. +// Generated by ./build_unit_test.sh, do not modify. + +// Include the file twice, so we detect missing inclusion guards. +#include <mln/fun/vv2b/ge.hh> +#include <mln/fun/vv2b/ge.hh> + +int main() +{ + // Nothing. +} diff --git a/milena/tests/unit_test/mln_fun_vv2b_gt.cc b/milena/tests/unit_test/mln_fun_vv2b_gt.cc new file mode 100644 index 0000000..94f9677 --- /dev/null +++ b/milena/tests/unit_test/mln_fun_vv2b_gt.cc @@ -0,0 +1,11 @@ +// Unit test for mln/fun/vv2b/gt.hh. +// Generated by ./build_unit_test.sh, do not modify. + +// Include the file twice, so we detect missing inclusion guards. +#include <mln/fun/vv2b/gt.hh> +#include <mln/fun/vv2b/gt.hh> + +int main() +{ + // Nothing. +} diff --git a/milena/tests/unit_test/mln_fun_vv2b_implies.cc b/milena/tests/unit_test/mln_fun_vv2b_implies.cc new file mode 100644 index 0000000..91457d0 --- /dev/null +++ b/milena/tests/unit_test/mln_fun_vv2b_implies.cc @@ -0,0 +1,11 @@ +// Unit test for mln/fun/vv2b/implies.hh. +// Generated by ./build_unit_test.sh, do not modify. + +// Include the file twice, so we detect missing inclusion guards. +#include <mln/fun/vv2b/implies.hh> +#include <mln/fun/vv2b/implies.hh> + +int main() +{ + // Nothing. +} diff --git a/milena/tests/unit_test/mln_fun_vv2b_le.cc b/milena/tests/unit_test/mln_fun_vv2b_le.cc new file mode 100644 index 0000000..9e13aa3 --- /dev/null +++ b/milena/tests/unit_test/mln_fun_vv2b_le.cc @@ -0,0 +1,11 @@ +// Unit test for mln/fun/vv2b/le.hh. +// Generated by ./build_unit_test.sh, do not modify. + +// Include the file twice, so we detect missing inclusion guards. +#include <mln/fun/vv2b/le.hh> +#include <mln/fun/vv2b/le.hh> + +int main() +{ + // Nothing. +} diff --git a/milena/tests/unit_test/mln_fun_vv2b_lt.cc b/milena/tests/unit_test/mln_fun_vv2b_lt.cc new file mode 100644 index 0000000..46d437d --- /dev/null +++ b/milena/tests/unit_test/mln_fun_vv2b_lt.cc @@ -0,0 +1,11 @@ +// Unit test for mln/fun/vv2b/lt.hh. +// Generated by ./build_unit_test.sh, do not modify. + +// Include the file twice, so we detect missing inclusion guards. +#include <mln/fun/vv2b/lt.hh> +#include <mln/fun/vv2b/lt.hh> + +int main() +{ + // Nothing. +} diff --git a/milena/tests/unit_test/mln_trait_ch_function_value.cc b/milena/tests/unit_test/mln_trait_ch_function_value.cc new file mode 100644 index 0000000..f6cb360 --- /dev/null +++ b/milena/tests/unit_test/mln_trait_ch_function_value.cc @@ -0,0 +1,11 @@ +// Unit test for mln/trait/ch_function_value.hh. +// Generated by ./build_unit_test.sh, do not modify. + +// Include the file twice, so we detect missing inclusion guards. +#include <mln/trait/ch_function_value.hh> +#include <mln/trait/ch_function_value.hh> + +int main() +{ + // Nothing. +} -- 1.5.6.5
participants (1)
-
Guillaume Lazzara