oln 10.198: Make Olena compliant to g++-3.4

Au passage, y'a 6 tests qui marchent pas dans morpho, et ce sont pas mes changements qui les font foirer :)) Index: integre/ChangeLog from Damien Thivolle <damien@lrde.epita.fr> * ntg/core/internal/global_ops.hh: Make compliant to g++-3.4. * ntg/real/int_s.hh: Likewise. * ntg/real/int_u.hh: Likewise. * ntg/real/optraits_real_defs.hh: Likewise. * ntg/core/pred_succ.hh: Likewise. Index: metalic/ChangeLog from Damien Thivolle <damien@lrde.epita.fr> * mlc/type.hh: Make compliant to g++-3.4. Index: olena/ChangeLog from Damien Thivolle <damien@lrde.epita.fr> * oln/convert/rgbnrgb.hh: Make compliant to g++-3.4. * oln/convert/rgbxyz.hh: Likewise. * oln/topo/dmap.hxx: Likewise. * oln/utils/histogram.hh: Likewise. * oln/morpho/attribute_closing_opening.hh: Likewise. * oln/topo/tarjan/flat-zone.hh: Likewise. * oln/core/abstract/image_with_impl.hh: Likewise. * tests/utils/tests/histogram: Likewise. * oln/io/pnm_write_2d.hh: Likewise. * oln/topo/combinatorial-map/internal/anyfunc.hh: Likewise. * oln/topo/combinatorial-map/internal/beta.hh: Likewise. * oln/topo/combinatorial-map/internal/lambda.hh: Likewise. * oln/topo/combinatorial-map/internal/level.hh: Likewise. * oln/topo/combinatorial-map/internal/sigma.hh: Likewise. * oln/core/abstract/image_with_type_with_dim.hh: Likewise. * oln/convert/rgbhsv.hh: Likewise. * oln/convert/rgbhsl.hh: Likewise. * oln/convert/rgbhsi.hh: Likewise. * oln/convert/rgbyuv.hh: Likewise. * oln/convert/rgbyiq.hh: Likewise. * oln/morpho/attributes.hh: Likewise. * oln/core/abstract/behavior.hh: Likewise. * oln/core/behavior.hh: Likewise. * oln/morpho/attribute_closing_opening_map.hh: Likewise. * oln/utils/buffer.hxx: Likewise. * oln/utils/key.hxx: Likewise. * oln/utils/md5.hxx: Likewise. * oln/utils/md5.hh: Likewise. * oln/morpher/subq_morpher.hh: Likewise. * oln/morpher/color_morpher.hh: Likewise. * oln/morpher/piece_morpher.hh: Likewise. * oln/morpher/slicing_morpher.hh: Likewise. * oln/topo/tarjan/tarjan_with_attr.hh: Likewise. * oln/utils/qsort.hh: Likewise. * oln/transforms/shapelets.hh: Likewise. * oln/morpher/func_morpher.hh: Likewise. * oln/core/fpoint2d.hh: Likewise. Index: olena/oln/convert/rgbnrgb.hh --- olena/oln/convert/rgbnrgb.hh Mon, 15 Mar 2004 15:32:27 +0100 van-vl_n (oln/17_rgbnrgb.hh 1.13 600) +++ olena/oln/convert/rgbnrgb.hh Sat, 26 Jun 2004 00:54:31 +0200 thivol_d (oln/17_rgbnrgb.hh 1.13 600) @@ -77,7 +77,7 @@ { std::ostringstream s; s << "f_rgb_to_nrgb<" << inbits << ", " << outbits << '>'; - s.str(); + return s.str(); } }; @@ -122,7 +122,7 @@ { std::ostringstream s; s << "f_nrgb_to_rgb<" << inbits << ", " << outbits << '>'; - s.str(); + return s.str(); } }; Index: olena/oln/convert/rgbxyz.hh --- olena/oln/convert/rgbxyz.hh Mon, 15 Mar 2004 15:32:27 +0100 van-vl_n (oln/19_rgbxyz.hh 1.14 600) +++ olena/oln/convert/rgbxyz.hh Sat, 26 Jun 2004 00:51:19 +0200 thivol_d (oln/19_rgbxyz.hh 1.14 600) @@ -74,7 +74,7 @@ { std::ostringstream s; s << "f_rgb_to_xyz<" << inbits << ", " << outbits << '>'; - s.str(); + return s.str(); } }; @@ -120,7 +120,7 @@ { std::ostringstream s; s << "f_xyz_to_rgb<" << inbits << ", " << outbits << '>'; - s.str(); + return s.str(); } }; Index: metalic/mlc/type.hh --- metalic/mlc/type.hh Tue, 13 Apr 2004 17:31:32 +0200 van-vl_n (oln/c/21_type.hh 1.29 600) +++ metalic/mlc/type.hh Fri, 25 Jun 2004 18:29:09 +0200 thivol_d (oln/c/21_type.hh 1.29 600) @@ -310,6 +310,6 @@ | dispatch | `---------*/ -# define mlc_dispatch(Fun) return exact().Fun##_impl +# define mlc_dispatch(Fun) return this->exact().Fun##_impl #endif // ! METALIC_TYPE_HH Index: olena/oln/topo/dmap.hxx --- olena/oln/topo/dmap.hxx Tue, 13 Apr 2004 17:31:32 +0200 van-vl_n (oln/p/3_dmap.hxx 1.7.1.10 600) +++ olena/oln/topo/dmap.hxx Sat, 26 Jun 2004 21:41:41 +0200 thivol_d (oln/p/3_dmap.hxx 1.7.1.10 600) @@ -144,11 +144,11 @@ return tmp; \ } - oln_topo_chamfer2_(chamfer, 1, 1, 3, 0.9003); - oln_topo_chamfer2_(chamfer, 1, 2, 3, 1.2732); - oln_topo_chamfer2_(chamfer, 2, 3, 3, 2.1736); - oln_topo_chamfer2_(chamfer, 5, 7, 3, 5.2474); - oln_topo_chamfer2_(chamfer, 12, 17, 3, 12.6684); + oln_topo_chamfer2_(chamfer, 1, 1, 3, 0.9003) + oln_topo_chamfer2_(chamfer, 1, 2, 3, 1.2732) + oln_topo_chamfer2_(chamfer, 2, 3, 3, 2.1736) + oln_topo_chamfer2_(chamfer, 5, 7, 3, 5.2474) + oln_topo_chamfer2_(chamfer, 12, 17, 3, 12.6684) inline const chamfer<int>& chessboard() @@ -162,10 +162,10 @@ return chamfer_1_2(); } - oln_topo_chamfer3_(chamfer, 4, 6, 9, 5, 4.1203); - oln_topo_chamfer3_(chamfer, 5, 7, 11, 5, 5.0206); - oln_topo_chamfer3_(chamfer, 9, 13, 20, 5, 9.1409); - oln_topo_chamfer3_(chamfer, 16, 23, 36, 5, 16.3351); + oln_topo_chamfer3_(chamfer, 4, 6, 9, 5, 4.1203) + oln_topo_chamfer3_(chamfer, 5, 7, 11, 5, 5.0206) + oln_topo_chamfer3_(chamfer, 9, 13, 20, 5, 9.1409) + oln_topo_chamfer3_(chamfer, 16, 23, 36, 5, 16.3351) inline const chamfer<float>& best_set_3x3() { return mk_chamfer_3x3(0.9481, 1.3408); } @@ -173,19 +173,19 @@ { return mk_chamfer_5x5(0.9801, 1.4060, 2.2044); } // maximum absolute error for integer local distances (Table 2) - oln_topo_chamfer2_(mchamfer, 1, 1, 3, 0.8536); - oln_topo_chamfer2_(mchamfer, 1, 2, 3, 1.2071); - oln_topo_chamfer2_(mchamfer, 2, 3, 3, 2.1180); - oln_topo_chamfer2_(mchamfer, 5, 7, 3, 5.1675); - oln_topo_chamfer2_(mchamfer, 12, 17, 3, 12.5000); + oln_topo_chamfer2_(mchamfer, 1, 1, 3, 0.8536) + oln_topo_chamfer2_(mchamfer, 1, 2, 3, 1.2071) + oln_topo_chamfer2_(mchamfer, 2, 3, 3, 2.1180) + oln_topo_chamfer2_(mchamfer, 5, 7, 3, 5.1675) + oln_topo_chamfer2_(mchamfer, 12, 17, 3, 12.5000) inline const chamfer<int>& mchessboard() { return mchamfer_1_1(); } inline const chamfer<int>& mcityblock() { return mchamfer_1_2(); } - oln_topo_chamfer3_(mchamfer, 4, 6, 9, 5, 4.1213); - oln_topo_chamfer3_(mchamfer, 5, 7, 11, 5, 5.0092); - oln_topo_chamfer3_(mchamfer, 9, 13, 20, 5, 9.0819); - oln_topo_chamfer3_(mchamfer, 17, 24, 38, 5, 17.2174); + oln_topo_chamfer3_(mchamfer, 4, 6, 9, 5, 4.1213) + oln_topo_chamfer3_(mchamfer, 5, 7, 11, 5, 5.0092) + oln_topo_chamfer3_(mchamfer, 9, 13, 20, 5, 9.0819) + oln_topo_chamfer3_(mchamfer, 17, 24, 38, 5, 17.2174) inline const chamfer<float>& mbest_set_3x3() { const float coef = 1.0412; Index: integre/ntg/core/internal/global_ops.hh --- integre/ntg/core/internal/global_ops.hh Wed, 08 Oct 2003 23:36:51 +0200 burrus_n (oln/g/27_global_ops 1.11.1.14 600) +++ integre/ntg/core/internal/global_ops.hh Sat, 26 Jun 2004 00:25:06 +0200 thivol_d (oln/g/27_global_ops 1.11.1.14 600) @@ -1,4 +1,4 @@ -// Copyright (C) 2001, 2002, 2003 EPITA Research and Development Laboratory +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -38,6 +38,8 @@ # include <mlc/contract.hh> # include <mlc/is_a.hh> +# include <ntg/real/builtin_float.hh> +# include <ntg/real/optraits_builtin_int.hh> # include <ntg/core/internal/global_ops_traits.hh> # include <ntg/core/macros.hh> # include <ntg/core/value.hh> Index: integre/ntg/real/int_s.hh --- integre/ntg/real/int_s.hh Thu, 27 Nov 2003 11:26:27 +0100 burrus_n (oln/g/24_int_s.hh 1.16.1.16.1.1 600) +++ integre/ntg/real/int_s.hh Sat, 26 Jun 2004 00:04:21 +0200 thivol_d (oln/g/24_int_s.hh 1.16.1.16.1.1 600) @@ -1,4 +1,4 @@ -// Copyright (C) 2001, 2002, 2003 EPITA Research and Development Laboratory +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -32,6 +32,7 @@ # include <ntg/real/optraits_real.hh> # include <ntg/real/real_value.hh> # include <ntg/bin.hh> +# include <ntg/real/int_u.hh> # include <mlc/bool.hh> # include <mlc/cmp.hh> @@ -89,7 +90,7 @@ | typetraits<int_s> | `------------------*/ - template <unsigned nbits, class behavior> + template <unsigned nbits, typename behavior> struct typetraits<int_s<nbits, behavior> > : public typetraits<sint_value<int_s<nbits, behavior> > > { Index: integre/ntg/real/int_u.hh --- integre/ntg/real/int_u.hh Thu, 27 Nov 2003 11:26:27 +0100 burrus_n (oln/g/23_int_u.hh 1.19.1.16.1.1 600) +++ integre/ntg/real/int_u.hh Fri, 25 Jun 2004 23:57:00 +0200 thivol_d (oln/g/23_int_u.hh 1.19.1.16.1.1 600) @@ -1,4 +1,4 @@ -// Copyright (C) 2002, 2003 EPITA Research and Development Laboratory +// Copyright (C) 2002, 2003, 2004 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 @@ -33,7 +33,9 @@ # include <ntg/real/real_value.hh> # include <ntg/bin.hh> +# include <mlc/bool.hh> # include <mlc/cmp.hh> +# include <mlc/is_a.hh> # include <string> # include <sstream> @@ -79,7 +81,7 @@ | typetraits<int_u> | `------------------*/ - template <unsigned nbits, class behavior> + template <unsigned nbits, typename behavior> struct typetraits<int_u<nbits, behavior> > : public typetraits<uint_value<int_u<nbits, behavior> > > { Index: integre/ntg/real/optraits_real_defs.hh --- integre/ntg/real/optraits_real_defs.hh Thu, 27 Nov 2003 11:26:27 +0100 burrus_n (oln/g/11_optraits_s 1.14.1.1 600) +++ integre/ntg/real/optraits_real_defs.hh Fri, 25 Jun 2004 17:26:09 +0200 thivol_d (oln/g/11_optraits_s 1.14.1.1 600) @@ -1,4 +1,4 @@ -// Copyright (C) 2001, 2002, 2003 EPITA Research and Development Laboratory +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -94,7 +94,7 @@ { \ typedef ntg_return_type(Name, T1, T2) return_type; \ typedef typename \ - typetraits<E>::abstract_behavior_type::get<return_type> \ + typetraits<E>::abstract_behavior_type::template get<return_type> \ behavior_type; \ return_type tmp; \ tmp = behavior_type::check_##Name(lhs.exact().val(), \ @@ -109,7 +109,7 @@ { \ typedef ntg_return_type(Name, T1, T2) return_type; \ typedef typename \ - typetraits<E>::abstract_behavior_type::get<return_type> \ + typetraits<E>::abstract_behavior_type::template get<return_type> \ behavior_type; \ return_type tmp; \ tmp = behavior_type::check_##Name(lhs.exact().val(), \ @@ -124,7 +124,7 @@ { \ typedef ntg_return_type(Name, T1, T2) return_type; \ typedef typename \ - typetraits<E>::abstract_behavior_type::get<return_type> \ + typetraits<E>::abstract_behavior_type::template get<return_type> \ behavior_type; \ return_type tmp; \ tmp = behavior_type::check_##Name(lhs.exact(), \ Index: olena/oln/utils/histogram.hh --- olena/oln/utils/histogram.hh Sun, 23 May 2004 13:55:35 +0200 palma_g (oln/10_histogram. 1.6.1.14.1.14 600) +++ olena/oln/utils/histogram.hh Fri, 25 Jun 2004 18:02:30 +0200 thivol_d (oln/10_histogram. 1.6.1.14.1.14 600) @@ -233,7 +233,7 @@ histogram(const value_to_point_type & c2p = value_to_point_type()): v2p_(c2p), img_(internal::img_max_size<value_type>()()) { - clear(); + this->clear(); } /// This compute the histogram of an image. @@ -242,8 +242,8 @@ const value_to_point_type & v2p = value_to_point_type()): v2p_(v2p), img_(internal::img_max_size<value_type>()()) { - clear(); - init(input); + this->clear(); + this->init(input); } /// clear() should be called. @@ -408,7 +408,7 @@ at(const value_type& i) const { adjust(i); - return img_[v2p_(i)]; + return this->img_[v2p_(i)]; } /// operator[] should be called. @@ -416,7 +416,7 @@ at(const value_type& i) { adjust(i); - return img_[v2p_(i)]; + return this->img_[v2p_(i)]; } /// Quick function min. @@ -424,7 +424,7 @@ min() { for (; min_ != ntg_max_val(value_type); min_ = ntg::succ(min_)) - if (img_[v2p_(min_)] > ntg_zero_val(cpt_type)) + if (this->img_[v2p_(min_)] > ntg_zero_val(cpt_type)) break; return min_; } @@ -433,7 +433,7 @@ max() { for (; max_ != ntg_min_val(value_type); max_ = ntg::pred(max_)) - if (img_[v2p_(max_)] > ntg_zero_val(cpt_type)) + if (this->img_[v2p_(max_)] > ntg_zero_val(cpt_type)) break; return max_; } @@ -506,7 +506,7 @@ const cpt_type at(const value_type& i) const { - return img_[v2p_(i)]; + return this->img_[v2p_(i)]; } /// operator[] should be called. @@ -514,14 +514,14 @@ at(const value_type& i) { adjust(i); - return img_[v2p_(i)]; + return this->img_[v2p_(i)]; } /// Quick function min. value_type min() { for (; min_ != ntg_max_val(value_type); min_ = succ(min_)) - if (img_[v2p_(min_)] > ntg_zero_val(cpt_type)) + if (this->img_[v2p_(min_)] > ntg_zero_val(cpt_type)) break; return min_; } @@ -597,7 +597,7 @@ const cpt_type at(const value_type& i) const { - return img_[v2p_(i)]; + return this->img_[v2p_(i)]; } /// operator[] should be called. @@ -605,14 +605,14 @@ at(const value_type& i) { adjust(i); - return img_[v2p_(i)]; + return this->img_[v2p_(i)]; } /// Quick function max. value_type max() { for (; max_ != ntg_min_val(value_type); max_ = ntg::pred(max_)) - if (img_[v2p_(max_)] > ntg_zero_val(cpt_type)) + if (this->img_[v2p_(max_)] > ntg_zero_val(cpt_type)) break; return max_; } Index: olena/oln/morpho/attribute_closing_opening.hh --- olena/oln/morpho/attribute_closing_opening.hh Thu, 25 Mar 2004 15:00:37 +0100 palma_g (oln/q/49_attribute_ 1.23 600) +++ olena/oln/morpho/attribute_closing_opening.hh Sat, 26 Jun 2004 02:32:43 +0200 thivol_d (oln/q/49_attribute_ 1.23 600) @@ -163,7 +163,7 @@ ** \image latex oln_morpho_fast_card_closing.png ** */ - xxx_closing_decl(card); + xxx_closing_decl(card) /*! ** \brief Perform a cardinal opening. @@ -190,7 +190,7 @@ ** \image latex oln_morpho_fast_card_opening.png ** */ - xxx_opening_decl(card); + xxx_opening_decl(card) /*! ** \brief Perform an integral closing. @@ -217,7 +217,7 @@ ** \image latex oln_morpho_fast_integral_closing.png ** */ - xxx_closing_decl(integral); + xxx_closing_decl(integral) /*! ** \brief Perform an integral opening. @@ -244,7 +244,7 @@ ** \image latex oln_morpho_fast_integral_opening.png ** */ - xxx_opening_decl(integral); + xxx_opening_decl(integral) /*! ** \brief Perform a height closing. @@ -271,7 +271,7 @@ ** \image latex oln_morpho_fast_height_opening.png ** */ - xxx_opening_decl(height); + xxx_opening_decl(height) /*! ** \brief Perform a height closing. @@ -299,7 +299,7 @@ ** \image latex oln_morpho_fast_height_closing.png ** */ - xxx_closing_decl(height); + xxx_closing_decl(height) /*! @@ -328,7 +328,7 @@ ** \image latex oln_morpho_fast_maxvalue_closing.png ** */ - xxx_closing_decl(maxvalue); + xxx_closing_decl(maxvalue) /*! ** \brief Perform a maxvalue opening. @@ -356,7 +356,7 @@ ** \image latex oln_morpho_fast_maxvalue_opening.png ** */ - xxx_opening_decl(maxvalue); + xxx_opening_decl(maxvalue) /*! ** \brief Perform a minvalue opening. @@ -384,7 +384,7 @@ ** \image latex oln_morpho_fast_minvalue_opening.png ** */ - xxx_opening_decl(minvalue); + xxx_opening_decl(minvalue) /*! ** \brief Perform a minvalue closing. @@ -412,7 +412,7 @@ ** \image latex oln_morpho_fast_minvalue_closing.png ** */ - xxx_closing_decl(minvalue); + xxx_closing_decl(minvalue) /*! ** \brief Perform a ball opening. @@ -440,7 +440,7 @@ ** \image latex oln_morpho_fast_ball_opening.png ** */ - xxx_opening_im_decl(ball); + xxx_opening_im_decl(ball) /*! ** \brief Perform a ball closing. @@ -468,7 +468,7 @@ ** \image latex oln_morpho_fast_ball_closing.png ** */ - xxx_closing_im_decl(ball); + xxx_closing_im_decl(ball) /*! ** \brief Perform a dist opening. @@ -496,7 +496,7 @@ ** \image latex oln_morpho_fast_dist_opening.png ** */ - xxx_opening_im_decl(dist); + xxx_opening_im_decl(dist) /*! ** \brief Perform a dist closing. @@ -524,7 +524,7 @@ ** \image latex oln_morpho_fast_dist_closing.png ** */ - xxx_closing_im_decl(dist); + xxx_closing_im_decl(dist) /*! ** \brief Perform a cube closing. @@ -552,7 +552,7 @@ ** \image latex oln_morpho_fast_cube_closing.png ** */ - xxx_closing_im_decl(cube); + xxx_closing_im_decl(cube) /*! ** \brief Perform a cube opening. @@ -580,7 +580,7 @@ ** \image latex oln_morpho_fast_cube_opening.png ** */ - xxx_opening_im_decl(cube); + xxx_opening_im_decl(cube) /*! ** \brief Perform a box closing. @@ -609,7 +609,7 @@ ** \image latex oln_morpho_fast_box_closing.png ** */ - xxx_closing_im_decl(box); + xxx_closing_im_decl(box) /*! ** \brief Perform a box opening. @@ -638,7 +638,7 @@ ** \image latex oln_morpho_fast_box_opening.png ** */ - xxx_opening_im_decl(box); + xxx_opening_im_decl(box) } // !fast } // !morpho Index: olena/oln/topo/tarjan/flat-zone.hh --- olena/oln/topo/tarjan/flat-zone.hh Wed, 14 Apr 2004 00:08:50 +0200 thivol_d (oln/r/35_flat-zone. 1.14 600) +++ olena/oln/topo/tarjan/flat-zone.hh Sat, 26 Jun 2004 21:09:02 +0200 thivol_d (oln/r/35_flat-zone. 1.14 600) @@ -87,7 +87,7 @@ typedef mlc_exact_vt_type(self_type, Exact) exact_type; ///< Exact type of the class. typedef abstract::tarjan_with_attr<exact_type> super_type; ///< Type of parent class. - friend class super_type; + //friend class super_type; friend class abstract::tarjan<exact_type>; /*! ** \brief Constructor. @@ -104,9 +104,9 @@ get_processing_order_impl() { std::vector<point_type> res; - oln_iter_type(image_type) it(input_); + oln_iter_type(image_type) it(this->input_); - res.reserve(input_.npoints()); + res.reserve(this->input_.npoints()); for_all(it) res.push_back(it); return res; @@ -124,16 +124,16 @@ void mark_set_impl(const point_type &x) { - if (parent_.size() == parent_.capacity()) + if (this->parent_.size() == this->parent_.capacity()) { - capacity = parent_.capacity() + capacity_chunk; - parent_.reserve(capacity); - comp_value_.reserve(capacity); - } - to_comp_[x] = ncomps_ + 1; - data_.push_back(A(input_, x, env_)); - parent_.push_back(ncomps_ + 1); - comp_value_.push_back(ncomps_ + 1); + this->capacity = this->parent_.capacity() + this->capacity_chunk; + this->parent_.reserve(this->capacity); + this->comp_value_.reserve(this->capacity); + } + this->to_comp_[x] = this->ncomps_ + 1; + this->data_.push_back(A(this->input_, x, this->env_)); + this->parent_.push_back(this->ncomps_ + 1); + this->comp_value_.push_back(this->ncomps_ + 1); } /*! @@ -147,24 +147,24 @@ void uni_impl(const point_type& n, const point_type& p) { - comp_type r = find_root(to_comp_[n]); - precondition(to_comp_[n] <= ncomps_); - precondition(to_comp_[p] <= (ncomps_ + 1)); - if (r != to_comp_[p]) - if (input_[n] == input_[p]) - { - if (to_comp_[p] == (ncomps_ + 1)) // first merge of p component - { - precondition(r < comp_value_.capacity()); - data_[r] += data_[to_comp_[p]]; - precondition(r <= ncomps_); - to_comp_[p] = r; + comp_type r = find_root(this->to_comp_[n]); + precondition(this->to_comp_[n] <= this->ncomps_); + precondition(this->to_comp_[p] <= (this->ncomps_ + 1)); + if (r != this->to_comp_[p]) + if (this->input_[n] == this->input_[p]) + { + if (this->to_comp_[p] == (this->ncomps_ + 1)) // first merge of p component + { + precondition(r < this->comp_value_.capacity()); + this->data_[r] += this->data_[this->to_comp_[p]]; + precondition(r <= this->ncomps_); + this->to_comp_[p] = r; } else { - precondition(r < parent_.capacity()); - data_[parent_[to_comp_[p]]] += data_[parent_[r]]; - parent_[r] = parent_[to_comp_[p]]; + precondition(r < this->parent_.capacity()); + this->data_[this->parent_[this->to_comp_[p]]] += this->data_[this->parent_[r]]; + this->parent_[r] = this->parent_[this->to_comp_[p]]; } } Index: olena/oln/core/abstract/image_with_impl.hh --- olena/oln/core/abstract/image_with_impl.hh Mon, 29 Mar 2004 09:26:50 +0200 odou_s (oln/t/27_image_with 1.14.1.11 600) +++ olena/oln/core/abstract/image_with_impl.hh Fri, 25 Jun 2004 17:28:07 +0200 thivol_d (oln/t/27_image_with 1.14.1.11 600) @@ -152,7 +152,7 @@ const size_type& size() const { - assertion(has_impl()); + assertion(this->has_impl()); return this->exact().impl()->size(); } Index: olena/tests/utils/tests/histogram --- olena/tests/utils/tests/histogram Tue, 20 Apr 2004 15:16:21 +0200 van-vl_n (oln/u/27_histogram. 1.2.1.4 600) +++ olena/tests/utils/tests/histogram Sat, 26 Jun 2004 21:49:34 +0200 thivol_d (oln/u/27_histogram. 1.2.1.4 600) @@ -67,7 +67,7 @@ hu8[ntg_max_val(int_u8)] == 0 && hu8[ntg_min_val(int_u8)] == 0; return res; -}; +} bool check_int_s4_and_distr() @@ -141,7 +141,7 @@ utils::max(his4) == utils::max(his4_max) && utils::max(his4) == utils::max(his4_minmax); return res; -}; +} bool @@ -162,7 +162,7 @@ hr8[rgb_8(0, 0, 0)] == 0 && hr8[rgb_8(44, 44, 44)] == 0; return res; -}; +} bool check() Index: olena/oln/io/pnm_write_2d.hh --- olena/oln/io/pnm_write_2d.hh Mon, 15 Mar 2004 19:59:55 +0100 thivol_d (oln/u/44_pnm_write_ 1.6 600) +++ olena/oln/io/pnm_write_2d.hh Sat, 26 Jun 2004 20:57:20 +0200 thivol_d (oln/u/44_pnm_write_ 1.6 600) @@ -29,6 +29,8 @@ # define OLENA_IO_PNM_WRITE_2D_HH # include <ntg/basics.hh> +# include <ntg/real/typetraits_builtin_int.hh> +# include <ntg/real/int_u.hh> # include <oln/core/traverse.hh> # include <oln/utils/stat.hh> # include <oln/io/pnm_common.hh> @@ -154,7 +156,7 @@ info.rows = im.nrows(); info.max_val = ntg_max_val(oln_value_type(I)); - if (info.max_val > ntg::to_ntg(65535U)) + if (ntg::to_ntg(65535U) < info.max_val) return false; if (!pnm_write_header2d(out, pnm_id, info)) Index: olena/oln/topo/combinatorial-map/internal/anyfunc.hh --- olena/oln/topo/combinatorial-map/internal/anyfunc.hh Mon, 15 Mar 2004 15:32:27 +0100 van-vl_n (oln/v/3_anyfunc.hh 1.4 600) +++ olena/oln/topo/combinatorial-map/internal/anyfunc.hh Sat, 26 Jun 2004 20:47:03 +0200 thivol_d (oln/v/3_anyfunc.hh 1.4 600) @@ -76,26 +76,26 @@ /// Resize the domain of f. void resize(unsigned n) { - self().resize_(n); + this->self().resize_(n); } /// Assign a value \e to f(i). void assign(const U & i, const V & e) { assertion(i < f_.size()); - self().assign_(i, e); + this->self().assign_(i, e); } /// f(i) = 0. void erase(const U & i) { assertion(i < f_.size()); - self().erase_(i); + this->self().erase_(i); } /// Print the function. std::ostream & print(std::ostream & ostr) const { for (unsigned i = 1; i < f_.size(); ++i) - ostr << self().name() << "(" << i << ") = " << f_[i] << std::endl; + ostr << this->self().name() << "(" << i << ") = " << f_[i] << std::endl; return ostr; } Index: olena/oln/topo/combinatorial-map/internal/beta.hh --- olena/oln/topo/combinatorial-map/internal/beta.hh Sun, 14 Mar 2004 18:15:46 +0100 van-vl_n (oln/v/5_beta.hh 1.3 600) +++ olena/oln/topo/combinatorial-map/internal/beta.hh Sat, 26 Jun 2004 20:46:47 +0200 thivol_d (oln/v/5_beta.hh 1.3 600) @@ -54,13 +54,13 @@ void assign_(const U & i, const V & e) { - f_[i] = e; + this->f_[i] = e; } void erase_(const U & i) { - f_[i] = 0; + this->f_[i] = 0; } }; Index: olena/oln/topo/combinatorial-map/internal/lambda.hh --- olena/oln/topo/combinatorial-map/internal/lambda.hh Sun, 14 Mar 2004 18:15:46 +0100 van-vl_n (oln/v/6_lambda.hh 1.3 600) +++ olena/oln/topo/combinatorial-map/internal/lambda.hh Sat, 26 Jun 2004 20:46:35 +0200 thivol_d (oln/v/6_lambda.hh 1.3 600) @@ -59,20 +59,20 @@ void resize_(unsigned n) { - f_.resize(n+1); + this->f_.resize(n+1); } void assign_(const U & i, const V & e) { - f_[i] = e; + this->f_[i] = e; } void erase(const U & i) { - f_[i] = 0; - f_[alpha<U>::result(i)] = 0; + this->f_[i] = 0; + this->f_[alpha<U>::result(i)] = 0; } }; Index: olena/oln/topo/combinatorial-map/internal/level.hh --- olena/oln/topo/combinatorial-map/internal/level.hh Sun, 14 Mar 2004 18:15:46 +0100 van-vl_n (oln/v/7_level.hh 1.3 600) +++ olena/oln/topo/combinatorial-map/internal/level.hh Sat, 26 Jun 2004 21:20:19 +0200 thivol_d (oln/v/7_level.hh 1.3 600) @@ -28,6 +28,8 @@ #ifndef OLENA_TOPO_COMBINATORIAL_MAP_INTERNAL_LEVEL_HH # define OLENA_TOPO_COMBINATORIAL_MAP_INTERNAL_LEVEL_HH +# include <mlc/contract.hh> + # include <iostream> # include <vector> @@ -63,7 +65,7 @@ public: level(unsigned n) : tree_(n+1) { - assertion(n); + assertion(n != 0); } U father(const U & child) const Index: olena/oln/topo/combinatorial-map/internal/sigma.hh --- olena/oln/topo/combinatorial-map/internal/sigma.hh Sun, 14 Mar 2004 18:15:46 +0100 van-vl_n (oln/v/9_sigma.hh 1.3 600) +++ olena/oln/topo/combinatorial-map/internal/sigma.hh Sat, 26 Jun 2004 20:59:32 +0200 thivol_d (oln/v/9_sigma.hh 1.3 600) @@ -60,30 +60,30 @@ void resize_(unsigned n) { - f_.resize(n+1); - f_1_.resize(n+1); + this->f_.resize(n+1); + this->f_1_.resize(n+1); } void assign_(const U & i, const U & e) { - assertion(e < f_1_.size()); + assertion(e < this->f_1_.size()); - f_[i] = e; - f_1_[e] = i; + this->f_[i] = e; + this->f_1_[e] = i; } void erase_(const U & d) { - f_[f_1_[d]] = f_[d]; - f_1_[f_[d]] = f_1_[d]; - f_[d] = f_1_[d] = 0; + this->f_[this->f_1_[d]] = this->f_[d]; + this->f_1_[this->f_[d]] = this->f_1_[d]; + this->f_[d] = this->f_1_[d] = 0; unsigned d_ = alpha<U>::result(d); - f_[f_1_[d_]] = f_[d_]; - f_1_[f_[d_]] = f_1_[d_]; - f_[d_] = f_1_[d_] = 0; + this->f_[this->f_1_[d_]] = this->f_[d_]; + this->f_1_[this->f_[d_]] = this->f_1_[d_]; + this->f_[d_] = this->f_1_[d_] = 0; } private: Index: olena/oln/core/abstract/image_with_type_with_dim.hh --- olena/oln/core/abstract/image_with_type_with_dim.hh Thu, 11 Mar 2004 17:12:19 +0100 thivol_d (oln/v/11_image_with 1.5 600) +++ olena/oln/core/abstract/image_with_type_with_dim.hh Fri, 25 Jun 2004 18:14:44 +0200 thivol_d (oln/v/11_image_with 1.5 600) @@ -188,7 +188,7 @@ ** forces the function to only accept vectorial images. */ - oln_label_image_(vectorial_image, data_type_image); + oln_label_image_(vectorial_image, data_type_image) /*! This class, when used in a function declaration, ** forces the function to only accept vectorial images @@ -202,7 +202,7 @@ ** forces the function to only accept non vectorial images. */ - oln_label_image_(non_vectorial_image, data_type_image); + oln_label_image_(non_vectorial_image, data_type_image) /*! \class non_vectorial_image_with_dim ** @@ -218,7 +218,7 @@ ** forces the function to only accept binary images. */ - oln_label_image_(binary_image, non_vectorial_image); + oln_label_image_(binary_image, non_vectorial_image) /*! \class binary_image_with_dim ** @@ -234,7 +234,7 @@ ** forces the function to only accept integer images. */ - oln_label_image_(integer_image, non_vectorial_image); + oln_label_image_(integer_image, non_vectorial_image) /*! \class integer_image_with_dim ** @@ -250,7 +250,7 @@ ** forces the function to only accept decimal images. */ - oln_label_image_(decimal_image, non_vectorial_image); + oln_label_image_(decimal_image, non_vectorial_image) /*! \class decimal_image_with_dim ** Index: olena/oln/convert/rgbhsv.hh --- olena/oln/convert/rgbhsv.hh Mon, 15 Mar 2004 15:32:27 +0100 van-vl_n (oln/j/35_rgbhsv.hh 1.3 600) +++ olena/oln/convert/rgbhsv.hh Sat, 26 Jun 2004 00:50:29 +0200 thivol_d (oln/j/35_rgbhsv.hh 1.3 600) @@ -98,7 +98,7 @@ { std::ostringstream s; s << "f_rgb_to_hsv<" << inbits << ", " << outbits << '>'; - s.str(); + return s.str(); } }; @@ -182,7 +182,7 @@ { std::ostringstream s; s << "f_hsv_to_rgb<" << inbits << ", " << outbits << '>'; - s.str(); + return s.str(); } }; Index: olena/oln/convert/rgbhsl.hh --- olena/oln/convert/rgbhsl.hh Tue, 20 Apr 2004 16:03:16 +0200 van-vl_n (oln/j/36_rgbhsl.hh 1.5 600) +++ olena/oln/convert/rgbhsl.hh Sat, 26 Jun 2004 00:49:36 +0200 thivol_d (oln/j/36_rgbhsl.hh 1.5 600) @@ -129,7 +129,7 @@ { std::ostringstream s; s << "f_rgb_to_hsl<" << inbits << ", " << outbits << '>'; - s.str(); + return s.str(); } }; @@ -204,7 +204,7 @@ { std::ostringstream s; s << "f_hsl_to_rgb<" << inbits << ", " << outbits << '>'; - s.str(); + return s.str(); } }; Index: olena/oln/convert/rgbhsi.hh --- olena/oln/convert/rgbhsi.hh Mon, 15 Mar 2004 15:32:27 +0100 van-vl_n (oln/j/37_rgbhsi.hh 1.3 600) +++ olena/oln/convert/rgbhsi.hh Sat, 26 Jun 2004 00:44:38 +0200 thivol_d (oln/j/37_rgbhsi.hh 1.3 600) @@ -85,7 +85,7 @@ { std::ostringstream s; s << "f_rgb_to_hsi<" << inbits << ", " << outbits << '>'; - s.str(); + return s.str(); } }; @@ -130,7 +130,7 @@ { std::ostringstream s; s << "f_hsi_to_rgb<" << inbits << ", " << outbits << '>'; - s.str(); + return s.str(); } }; Index: olena/oln/convert/rgbyuv.hh --- olena/oln/convert/rgbyuv.hh Mon, 15 Mar 2004 15:32:27 +0100 van-vl_n (oln/j/38_rgbyuv.hh 1.3 600) +++ olena/oln/convert/rgbyuv.hh Sat, 26 Jun 2004 00:53:46 +0200 thivol_d (oln/j/38_rgbyuv.hh 1.3 600) @@ -75,7 +75,7 @@ { std::ostringstream s; s << "f_rgb_to_yuv<" << inbits << ", " << outbits << '>'; - s.str(); + return s.str(); } }; /* Conversion from RGB to YUV. @@ -116,7 +116,7 @@ { std::ostringstream s; s << "f_yuv_to_rgb<" << inbits << ", " << outbits << '>'; - s.str(); + return s.str(); } }; Index: olena/oln/convert/rgbyiq.hh --- olena/oln/convert/rgbyiq.hh Mon, 15 Mar 2004 15:32:27 +0100 van-vl_n (oln/j/39_rgbyiq.hh 1.3 600) +++ olena/oln/convert/rgbyiq.hh Sat, 26 Jun 2004 00:51:58 +0200 thivol_d (oln/j/39_rgbyiq.hh 1.3 600) @@ -76,7 +76,7 @@ { std::ostringstream s; s << "f_rgb_to_yiq<" << inbits << ", " << outbits << '>'; - s.str(); + return s.str(); } }; @@ -118,7 +118,7 @@ { std::ostringstream s; s << "f_yiq_to_rgb<" << inbits << ", " << outbits << '>'; - s.str(); + return s.str(); } }; Index: olena/oln/morpho/attributes.hh --- olena/oln/morpho/attributes.hh Sun, 23 May 2004 12:21:34 +0200 palma_g (oln/j/45_attributes 1.13.1.3 600) +++ olena/oln/morpho/attributes.hh Sat, 26 Jun 2004 02:31:22 +0200 thivol_d (oln/j/45_attributes 1.13.1.3 600) @@ -245,7 +245,7 @@ const env_type&): value_(ntg_unit_val(value_type)) { - }; + } /*! @@ -342,7 +342,7 @@ const oln_point_type(I2) &p, const env_type &env): super_type(im, p, env) { - }; + } }; /*-----------* @@ -390,7 +390,7 @@ area_(1), value_(1) { - }; + } // interface part /*! @@ -552,7 +552,7 @@ const env_type &) : value_(input[p]) { - }; + } // interface part /*! @@ -673,7 +673,7 @@ const oln_point_type(I) &p, const env_type & e): super_type(e.getImage(), p, e) { - }; + } }; /*----------------------* @@ -732,7 +732,7 @@ std::copy(e.getParent()[p].begin(), e.getParent()[p].end(), std::back_inserter(points_)); - }; + } /*! ** \brief Accessor to value_. @@ -893,7 +893,7 @@ min_(input[p]), max_(input[p]) { - }; + } /*! ** \brief Accessor to min value. @@ -1038,7 +1038,7 @@ const env_type &): value_(input[p]) { - }; + } /*! ** \brief Accessor to value_. @@ -1154,7 +1154,7 @@ const env_type &) : value_(input[p]) { - }; + } /*! ** \brief Accessor to value_. Index: olena/oln/core/abstract/behavior.hh --- olena/oln/core/abstract/behavior.hh Wed, 09 Jun 2004 20:13:57 +0200 van-vl_n (oln/j/46_behavior.h 1.4 600) +++ olena/oln/core/abstract/behavior.hh Fri, 25 Jun 2004 18:38:26 +0200 thivol_d (oln/j/46_behavior.h 1.4 600) @@ -61,7 +61,7 @@ void adapt_border(const oln::abstract::image<I> &im, coord border_size) const { mlc_dispatch(adapt_border)(im, border_size); - }; + } protected: /*! ** \brief CTor Index: olena/oln/core/behavior.hh --- olena/oln/core/behavior.hh Tue, 15 Jun 2004 20:36:26 +0200 odou_s (oln/j/47_behavior.h 1.5 600) +++ olena/oln/core/behavior.hh Sat, 26 Jun 2004 23:01:16 +0200 thivol_d (oln/j/47_behavior.h 1.5 600) @@ -51,7 +51,7 @@ coord border_size) const { im.border_adapt_mirror(border_size); - }; + } }; // set the border to a specific value @@ -81,7 +81,7 @@ { im.border_adapt_assign(border_size, ntg::cast::force<oln_value_type(I)>(value_)); - }; + } /// Empty constructor for any_with_diamond hierarchy. value_behavior() {} @@ -111,7 +111,8 @@ coord border_size) const { im.border_adapt_copy(border_size); - }; + } + }; // tools to call ctors with type inference Index: olena/oln/morpho/attribute_closing_opening_map.hh --- olena/oln/morpho/attribute_closing_opening_map.hh Thu, 25 Mar 2004 15:00:37 +0100 palma_g (oln/j/49_attribute_ 1.11 600) +++ olena/oln/morpho/attribute_closing_opening_map.hh Sat, 26 Jun 2004 02:36:12 +0200 thivol_d (oln/j/49_attribute_ 1.11 600) @@ -281,7 +281,7 @@ ** \image latex oln_morpho_slow_card_closing.png ** */ - xxx_closing_map_decl(card); + xxx_closing_map_decl(card) /*! ** \brief Perform a cardinal opening. @@ -307,7 +307,7 @@ ** \image latex oln_morpho_slow_card_opening.png ** */ - xxx_opening_map_decl(card); + xxx_opening_map_decl(card) /*! ** \brief Perform an integral closing. @@ -334,7 +334,7 @@ ** \image latex oln_morpho_slow_integral_closing.png ** */ - xxx_closing_map_decl(integral); + xxx_closing_map_decl(integral) /*! ** \brief Perform an integral opening. @@ -361,7 +361,7 @@ ** \image latex oln_morpho_slow_integral_opening.png ** */ - xxx_opening_map_decl(integral); + xxx_opening_map_decl(integral) /*! ** \brief Perform a height closing. @@ -387,7 +387,7 @@ ** \image latex oln_morpho_slow_height_opening.png ** */ - xxx_opening_map_decl(height); + xxx_opening_map_decl(height) /*! ** \brief Perform a height closing. @@ -414,7 +414,7 @@ ** \image latex oln_morpho_slow_height_closing.png ** */ - xxx_closing_map_decl(height); + xxx_closing_map_decl(height) /*! @@ -442,7 +442,7 @@ ** \image latex oln_morpho_slow_maxvalue_closing.png ** */ - xxx_closing_map_decl(maxvalue); + xxx_closing_map_decl(maxvalue) /*! ** \brief Perform a maxvalue opening. @@ -469,7 +469,7 @@ ** \image latex oln_morpho_slow_maxvalue_opening.png ** */ - xxx_opening_map_decl(maxvalue); + xxx_opening_map_decl(maxvalue) /*! ** \brief Perform a minvalue opening. @@ -496,7 +496,7 @@ ** \image latex oln_morpho_slow_minvalue_opening.png ** */ - xxx_opening_map_decl(minvalue); + xxx_opening_map_decl(minvalue) /*! ** \brief Perform a minvalue closing. @@ -523,7 +523,7 @@ ** \image latex oln_morpho_slow_minvalue_closing.png ** */ - xxx_closing_map_decl(minvalue); + xxx_closing_map_decl(minvalue) /*! ** \brief Perform a ball opening. @@ -550,7 +550,7 @@ ** \image latex oln_morpho_slow_ball_opening.png ** */ - xxx_opening_im_map_decl(ball); + xxx_opening_im_map_decl(ball) /*! ** \brief Perform a ball closing. @@ -577,7 +577,7 @@ ** \image latex oln_morpho_slow_ball_closing.png ** */ - xxx_closing_im_map_decl(ball); + xxx_closing_im_map_decl(ball) /*! ** \brief Perform a dist opening. @@ -604,7 +604,7 @@ ** \image latex oln_morpho_slow_dist_opening.png ** */ - xxx_opening_im_map_decl(dist); + xxx_opening_im_map_decl(dist) /*! ** \brief Perform a dist closing. @@ -631,7 +631,7 @@ ** \image latex oln_morpho_slow_dist_closing.png ** */ - xxx_closing_im_map_decl(dist); + xxx_closing_im_map_decl(dist) /*! ** \brief Perform a cube closing. @@ -658,7 +658,7 @@ ** \image latex oln_morpho_slow_cube_closing.png ** */ - xxx_closing_im_map_decl(cube); + xxx_closing_im_map_decl(cube) /*! ** \brief Perform a cube opening. @@ -685,7 +685,7 @@ ** \image latex oln_morpho_slow_cube_opening.png ** */ - xxx_opening_im_map_decl(cube); + xxx_opening_im_map_decl(cube) /*! ** \brief Perform a box closing. @@ -713,7 +713,7 @@ ** \image latex oln_morpho_slow_box_closing.png ** */ - xxx_closing_im_map_decl(box); + xxx_closing_im_map_decl(box) /*! ** \brief Perform a box opening. @@ -741,7 +741,7 @@ ** \image latex oln_morpho_slow_box_opening.png ** */ - xxx_opening_im_map_decl(box); + xxx_opening_im_map_decl(box) } // end of namespace slow Index: integre/ntg/core/pred_succ.hh --- integre/ntg/core/pred_succ.hh Tue, 30 Mar 2004 12:40:46 +0200 van-vl_n (oln/k/8_pred_succ. 1.2 600) +++ integre/ntg/core/pred_succ.hh Fri, 25 Jun 2004 18:18:37 +0200 thivol_d (oln/k/8_pred_succ. 1.2 600) @@ -59,7 +59,7 @@ T succ(const T &t) { - return T(internal::with_arith<T>::ret(t) + 1); + return T(typename internal::with_arith<T>::ret(t) + 1); } /*! Return the predecessor of \a t. @@ -70,7 +70,7 @@ T pred(const T&t) { - return T(internal::with_arith<T>::ret(t) - 1); + return T(typename internal::with_arith<T>::ret(t) - 1); } namespace internal { Index: olena/oln/utils/buffer.hxx --- olena/oln/utils/buffer.hxx Fri, 19 Mar 2004 17:28:35 +0100 palma_g (oln/k/9_buffer.hxx 1.2 600) +++ olena/oln/utils/buffer.hxx Sat, 26 Jun 2004 01:10:37 +0200 thivol_d (oln/k/9_buffer.hxx 1.2 600) @@ -39,7 +39,7 @@ { data_.reserve(length_); data_.push_back(ntg_zero_val(value_type)); -}; +} // add implementation template <class E> @@ -54,7 +54,7 @@ push_back(e_cast & mask, !count); mask >>= 1; } -}; +} // push_back implementation inline @@ -109,7 +109,7 @@ precondition(n < data_.size()); return reorder(data_[n]); -}; +} // append padding implementation inline @@ -119,7 +119,7 @@ while (((data_.size() * 32) % 512) != 448) push_back(false, true); padding_appended_ = true; -}; +} // append_length implementation inline @@ -130,14 +130,14 @@ add(reorder(len2_), false); add(reorder(len1_), false); length_appended_ = true; -}; +} // size implementation. inline unsigned buffer::size() const { return data_.size(); -}; +} // bit len implementation. inline Index: olena/oln/utils/key.hxx --- olena/oln/utils/key.hxx Fri, 19 Mar 2004 17:28:35 +0100 palma_g (oln/k/11_key.hxx 1.2 600) +++ olena/oln/utils/key.hxx Sat, 26 Jun 2004 01:10:10 +0200 thivol_d (oln/k/11_key.hxx 1.2 600) @@ -50,7 +50,7 @@ { precondition(i < 16); return data_[i]; -}; +} // [] operator inline @@ -58,7 +58,7 @@ { precondition(i < 16); return data_[i]; -}; +} // == operator inline Index: olena/oln/utils/md5.hxx --- olena/oln/utils/md5.hxx Tue, 13 Apr 2004 21:22:13 +0200 van-vl_n (oln/k/13_md5.hxx 1.3 600) +++ olena/oln/utils/md5.hxx Sat, 26 Jun 2004 01:29:42 +0200 thivol_d (oln/k/13_md5.hxx 1.3 600) @@ -110,7 +110,7 @@ T.push_back(0xbd3af235); /* 62 */ T.push_back(0x2ad7d2bb); /* 63 */ T.push_back(0xeb86d391); /* 64 */ -}; +} // sav() implementation. inline @@ -226,7 +226,7 @@ b += bb; c += cc; d += dd; -}; +} // sub step implementation. template <class Fun> Index: olena/oln/utils/md5.hh --- olena/oln/utils/md5.hh Tue, 13 Apr 2004 21:22:13 +0200 van-vl_n (oln/k/14_md5.hh 1.3 600) +++ olena/oln/utils/md5.hh Sat, 26 Jun 2004 01:32:12 +0200 thivol_d (oln/k/14_md5.hh 1.3 600) @@ -142,7 +142,7 @@ ** ** F(X,Y,Z) = XY v not(X) Z */ - struct + struct F_ { storage_type operator()(const storage_type &x, const storage_type &y, @@ -151,14 +151,16 @@ // return z ^ (x & (y ^ z)); return x & y | ~x & z; } - } F; + }; + + F_ F; /*! ** \brief Functor for bit operations. ** ** G(X,Y,Z) = XZ v Y not(Z) */ - struct + struct G_ { storage_type operator()(const storage_type &x, const storage_type &y, @@ -166,14 +168,16 @@ { return x & z | y & ~z; } - } G; + }; + + G_ G; /*! ** \brief Functor for bit operations. ** ** H(X,Y,Z) = X xor Y xor Z */ - struct + struct H_ { storage_type operator()(const storage_type &x, const storage_type &y, @@ -181,14 +185,16 @@ { return x ^ y ^ z; } - } H; + }; + + H_ H; /*! ** \brief Functor for bit operations. ** ** I(X,Y,Z) = Y xor (X v not(Z)) */ - struct + struct I_ { storage_type operator()(const storage_type &x, const storage_type &y, @@ -196,7 +202,10 @@ { return y ^ (x | ~z); } - } I; + }; + + I_ I; + }; #include <oln/utils/md5.hxx> Index: olena/oln/morpher/subq_morpher.hh --- olena/oln/morpher/subq_morpher.hh Sat, 03 Apr 2004 14:42:26 +0200 thivol_d (oln/m/25_subq_morph 1.3 600) +++ olena/oln/morpher/subq_morpher.hh Sat, 26 Jun 2004 02:21:14 +0200 thivol_d (oln/m/25_subq_morph 1.3 600) @@ -184,7 +184,7 @@ const impl_type* impl() const { - return ima_.impl(); + return this->ima_.impl(); } static std::string Index: olena/oln/morpher/color_morpher.hh --- olena/oln/morpher/color_morpher.hh Sat, 03 Apr 2004 23:02:21 +0200 thivol_d (oln/m/26_color_morp 1.4 600) +++ olena/oln/morpher/color_morpher.hh Fri, 25 Jun 2004 18:35:21 +0200 thivol_d (oln/m/26_color_morp 1.4 600) @@ -141,14 +141,14 @@ impl_type* impl() { - return ima_.impl(); + return this->ima_.impl(); } /// Return the image implementation. const impl_type* impl() const { - return ima_.impl(); + return this->ima_.impl(); } Index: olena/oln/morpher/piece_morpher.hh --- olena/oln/morpher/piece_morpher.hh Sun, 04 Apr 2004 16:48:06 +0200 odou_s (oln/m/40_piece_morp 1.2 600) +++ olena/oln/morpher/piece_morpher.hh Sat, 26 Jun 2004 01:02:26 +0200 thivol_d (oln/m/40_piece_morp 1.2 600) @@ -206,7 +206,7 @@ at(const point_type& p) { return const_cast<value_type &> - ( const_cast<SrcType &>(this->ima_)[p + p_] ); + ( const_cast<SrcType &>(this->ima_)[p + this->p_] ); } /*! @@ -217,7 +217,7 @@ const value_type at(const point_type& p) const { - return this->ima_[p + p_]; + return this->ima_[p + this->p_]; } /*! Perform a shallow copy from the decorated image of \a rhs @@ -301,7 +301,7 @@ const value_type at(const point_type &p) const { - return this->ima_[p + p_]; + return this->ima_[p + this->p_]; } /// Useful to debug. Index: olena/oln/morpher/slicing_morpher.hh --- olena/oln/morpher/slicing_morpher.hh Sun, 04 Apr 2004 16:48:06 +0200 odou_s (oln/m/42_slicing_mo 1.3 600) +++ olena/oln/morpher/slicing_morpher.hh Sat, 26 Jun 2004 02:22:34 +0200 thivol_d (oln/m/42_slicing_mo 1.3 600) @@ -205,7 +205,7 @@ ** since it is protected. */ super_slicing_morpher(const SrcType &ima, const coord slice) - : super_type(ima), slice_(slice), size_(image_size_dec(ima_.size())), impl_(size_) + : super_type(ima), slice_(slice), size_(image_size_dec(this->ima_.size())), impl_(size_) {} /*! @@ -273,13 +273,13 @@ value_type& at(const point_type &p) { - typename SrcType::point_type tmp_p(p, slice_); + typename SrcType::point_type tmp_p(p, this->slice_); return const_cast<value_type &>(this->ima_)[tmp_p]; } const value_type at(const point_type& p) const { - typename SrcType::point_type tmp_p(p, slice_); + typename SrcType::point_type tmp_p(p, this->slice_); return this->ima_[tmp_p]; } @@ -363,7 +363,7 @@ const value_type at(const point_type &p) const { - typename SrcType::point_type tmp_p(p, slice_); + typename SrcType::point_type tmp_p(p, this->slice_); return this->ima_[tmp_p]; } Index: olena/oln/topo/tarjan/tarjan_with_attr.hh --- olena/oln/topo/tarjan/tarjan_with_attr.hh Fri, 02 Apr 2004 18:35:46 +0200 palma_g (oln/m/46_tarjan_wit 1.3 600) +++ olena/oln/topo/tarjan/tarjan_with_attr.hh Sat, 26 Jun 2004 20:58:29 +0200 thivol_d (oln/m/46_tarjan_wit 1.3 600) @@ -70,7 +70,8 @@ typedef tarjan<exact_type> super_type; ///< Type of parent class. // Make parent class able to call implementations. - friend class super_type; + friend class tarjan<exact_type>; + //friend class super_type; /*! ** \brief Return the attribute value associated to a @@ -148,7 +149,7 @@ image_out_type get_compute_impl(const oln::abstract::neighborhood<N> &Ng) { - std::vector<point_type> I(get_processing_order()); + std::vector<point_type> I(this->get_processing_order()); level::fill(to_comp_, ntg_sup_val(comp_type)); to_comp_.border_adapt_assign(Ng.delta(), ntg_sup_val(comp_type)); Index: olena/oln/utils/qsort.hh --- olena/oln/utils/qsort.hh Sun, 23 May 2004 13:55:35 +0200 palma_g (oln/r/9_qsort.hh 1.1 600) +++ olena/oln/utils/qsort.hh Sat, 26 Jun 2004 20:48:03 +0200 thivol_d (oln/r/9_qsort.hh 1.1 600) @@ -28,6 +28,7 @@ # define OLN_UTILS_QSORT_HH # include <vector> # include <oln/core/abstract/image.hh> +# include <oln/core/abstract/image_with_type_with_dim.hh> # include <algorithm> # include <iostream> Index: olena/oln/transforms/shapelets.hh --- olena/oln/transforms/shapelets.hh Tue, 15 Jun 2004 19:50:21 +0200 thivol_d (oln/r/10_shapelets. 1.3 600) +++ olena/oln/transforms/shapelets.hh Fri, 25 Jun 2004 14:12:22 +0200 thivol_d (oln/r/10_shapelets. 1.3 600) @@ -111,7 +111,7 @@ oln_iter_type(I) it(ima); for_all(it) { - s += (ima[it] - ntg_max_val(oln_value_type(I)) / 2) * + s += (ima[it]) * //ntg_max_val(oln_value_type(I)) - ima[it]) * func(k, l, double(it.row() - row), double(it.col() - col), b); } res[k * n + l] = s; @@ -137,18 +137,18 @@ oln_iter_type(tmp_type) it(resf); - oln::level::fill(resf, ntg_max_val(D) / 2); + oln::level::fill(resf, ntg_min_val(D)); // For each vector for (int k = 0; k < m; k++) for (int l = 0; l < n; l++) // Add the value at the point { - if (vec[k * n + l] * vec[k * n + l] > 40000) + if (vec[k * n + l] * vec[k * n + l] > 20000) { for_all(it) resf[it] += vec[k * n + l] * shapelets_basis<2, double>()(k, l, double(it.row() - nrows / 2), double(it.col() - ncols / 2), b); - //std::cout << k << " - " << l << std::endl; + std::cout << k << " - " << l << " = " << vec[k * n + l] << std::endl; } } Index: olena/oln/morpher/func_morpher.hh --- olena/oln/morpher/func_morpher.hh Tue, 15 Jun 2004 19:50:21 +0200 thivol_d (oln/r/14_func_morph 1.1 600) +++ olena/oln/morpher/func_morpher.hh Fri, 25 Jun 2004 17:29:08 +0200 thivol_d (oln/r/14_func_morph 1.1 600) @@ -117,14 +117,14 @@ const value_type at(const point_type& p) const { - return f(ima_, p); + return f(this->ima_, p); } /// Return the implementation. const impl_type* impl() const { - return ima_.impl(); + return this->ima_.impl(); } static std::string Index: olena/oln/core/fpoint2d.hh --- olena/oln/core/fpoint2d.hh Tue, 15 Jun 2004 19:50:21 +0200 thivol_d (oln/r/15_fpoint2d.h 1.1 600) +++ olena/oln/core/fpoint2d.hh Sat, 26 Jun 2004 20:11:44 +0200 thivol_d (oln/r/15_fpoint2d.h 1.1 600) @@ -30,6 +30,7 @@ # include <iostream> +# include <oln/core/image2d.hh> # include <oln/core/abstract/image.hh> # include <oln/core/point2d.hh> Merci d'etre arrive jusque la, au passage, je sais pas trop si c'est correct: Make ... compliant to g++-3.4 :) -- Damien Thivolle damien.thivolle@lrde.epita.fr

Super !
+++ olena/oln/transforms/shapelets.hh Fri, 25 Jun 2004 14:12:22 +0200 thivol_d (oln/r/10_shapelets. 1.3 600) + s += (ima[it]) * //ntg_max_val(oln_value_type(I)) - ima[it]) *
- if (vec[k * n + l] * vec[k * n + l] > 40000) + if (vec[k * n + l] * vec[k * n + l] > 20000)
+ std::cout << k << " - " << l << " = " << vec[k * n + l] << std::endl;
(Il y a du code de débogage, je n'en tiens pas compte et je suppose que ce sera supprimé. Pense à retirer la constante.)
Merci d'etre arrive jusque la, au passage, je sais pas trop si c'est correct: Make ... compliant to g++-3.4 :)
Il y a des fichiers pour dire ça. Je pense notament à build.texi et compilers.def. Encore bravo, on en parle demain. -- Niels Van Vliet

"Damien" == Damien Thivolle <damien@lrde.epita.fr> writes:
Index: olena/oln/convert/rgbnrgb.hh --- olena/oln/convert/rgbnrgb.hh Mon, 15 Mar 2004 15:32:27 +0100 van-vl_n (oln/17_rgbnrgb.hh 1.13 600) +++ olena/oln/convert/rgbnrgb.hh Sat, 26 Jun 2004 00:54:31 +0200 thivol_d (oln/17_rgbnrgb.hh 1.13 600) @@ -77,7 +77,7 @@ { std::ostringstream s; s << "f_rgb_to_nrgb<" << inbits << ", " << outbits << '>'; - s.str(); + return s.str(); } };
@@ -122,7 +122,7 @@ { std::ostringstream s; s << "f_nrgb_to_rgb<" << inbits << ", " << outbits << '>'; - s.str(); + return s.str(); } };
Euh... Ça fait peur ça. Le code n'est pas exercé ?

"Damien" == Damien Thivolle <damien@lrde.epita.fr> writes:
Index: olena/oln/convert/rgbnrgb.hh --- olena/oln/convert/rgbnrgb.hh Mon, 15 Mar 2004 15:32:27 +0100 van-vl_n (oln/17_rgbnrgb.hh 1.13 600) +++ olena/oln/convert/rgbnrgb.hh Sat, 26 Jun 2004 00:54:31 +0200 thivol_d (oln/17_rgbnrgb.hh 1.13 600) @@ -77,7 +77,7 @@ { std::ostringstream s; s << "f_rgb_to_nrgb<" << inbits << ", " << outbits << '>'; - s.str(); + return s.str(); } };
@@ -122,7 +122,7 @@ { std::ostringstream s; s << "f_nrgb_to_rgb<" << inbits << ", " << outbits << '>'; - s.str(); + return s.str(); } };
Index: olena/oln/convert/rgbxyz.hh --- olena/oln/convert/rgbxyz.hh Mon, 15 Mar 2004 15:32:27 +0100 van-vl_n (oln/19_rgbxyz.hh 1.14 600) +++ olena/oln/convert/rgbxyz.hh Sat, 26 Jun 2004 00:51:19 +0200 thivol_d (oln/19_rgbxyz.hh 1.14 600) @@ -74,7 +74,7 @@ { std::ostringstream s; s << "f_rgb_to_xyz<" << inbits << ", " << outbits << '>'; - s.str(); + return s.str(); } };
@@ -120,7 +120,7 @@ { std::ostringstream s; s << "f_xyz_to_rgb<" << inbits << ", " << outbits << '>'; - s.str(); + return s.str(); } };
C'est trop répétitif pour être correct. Qq'1 se colle à la factorisation ?

"Damien" == Damien Thivolle <damien@lrde.epita.fr> writes:
@@ -79,7 +81,7 @@
typetraits<int_u> | `------------------*/
- template <unsigned nbits, class behavior> + template <unsigned nbits, typename behavior> struct typetraits<int_u<nbits, behavior> > : public typetraits<uint_value<int_u<nbits, behavior> > > {
Euh... Je suppose que là c'est une question de goût, c'est pas 3.4.

Akim Demaille <akim@epita.fr> writes:
"Damien" == Damien Thivolle <damien@lrde.epita.fr> writes:
@@ -79,7 +81,7 @@
typetraits<int_u> | `------------------*/
- template <unsigned nbits, class behavior> + template <unsigned nbits, typename behavior> struct typetraits<int_u<nbits, behavior> > : public typetraits<uint_value<int_u<nbits, behavior> > > {
Euh... Je suppose que là c'est une question de goût, c'est pas 3.4.
Ouais desole, j'ai eu enormement de mal a trouver d'ou venait le probleme dans ce fichier, alors j'ai essaye plusieurs trucs, et j'ai oublie de remettre comme avant. -- Damien Thivolle damien.thivolle@lrde.epita.fr

Akim Demaille <akim@epita.fr> writes:
"Damien" == Damien Thivolle <damien@lrde.epita.fr> writes:
@@ -63,7 +65,7 @@ public: level(unsigned n) : tree_(n+1) { - assertion(n); + assertion(n != 0); }
??? Goût ?
La aussi, j'ai fait des tests parce que je voyais vraiment pas ce qui allait, et quand j'ai trouve, j'ai oublie de remettre comme avant :) -- Damien Thivolle damien.thivolle@lrde.epita.fr

"Damien" == Damien Thivolle <damien@lrde.epita.fr> writes:
@@ -142,7 +142,7 @@ ** ** F(X,Y,Z) = XY v not(X) Z */ - struct + struct F_ { storage_type operator()(const storage_type &x, const storage_type &y, @@ -151,14 +151,16 @@ // return z ^ (x & (y ^ z)); return x & y | ~x & z; } - } F; + }; + + F_ F;
??? C'est 3.4, où question de style ?

Akim Demaille <akim@epita.fr> writes:
"Damien" == Damien Thivolle <damien@lrde.epita.fr> writes:
@@ -142,7 +142,7 @@ ** ** F(X,Y,Z) = XY v not(X) Z */ - struct + struct F_ { storage_type operator()(const storage_type &x, const storage_type &y, @@ -151,14 +151,16 @@ // return z ^ (x & (y ^ z)); return x & y | ~x & z; } - } F; + }; + + F_ F;
???
C'est 3.4, où question de style ?
La c'est g++-3.4, il trouvait pas F, G, H et I. -- Damien Thivolle damien.thivolle@lrde.epita.fr

"Damien" == Damien Thivolle <damien@lrde.epita.fr> writes:
Akim Demaille <akim@epita.fr> writes:
"Damien" == Damien Thivolle <damien@lrde.epita.fr> writes:
@@ -142,7 +142,7 @@ ** ** F(X,Y,Z) = XY v not(X) Z */ - struct + struct F_ { storage_type operator()(const storage_type &x, const storage_type &y, @@ -151,14 +151,16 @@ // return z ^ (x & (y ^ z)); return x & y | ~x & z; } - } F; + }; + + F_ F;
???
C'est 3.4, où question de style ?
La c'est g++-3.4, il trouvait pas F, G, H et I.
Là, je ne comprends pas son problème. C'est pas un bug ? Tu peux résumer tout ça en un exemple plus court qui explique le pb ?

Akim Demaille <akim@epita.fr> writes:
"Damien" == Damien Thivolle <damien@lrde.epita.fr> writes:
Akim Demaille <akim@epita.fr> writes:
"Damien" == Damien Thivolle <damien@lrde.epita.fr> writes:
@@ -142,7 +142,7 @@ ** ** F(X,Y,Z) = XY v not(X) Z */ - struct + struct F_ { storage_type operator()(const storage_type &x, const storage_type &y, @@ -151,14 +151,16 @@ // return z ^ (x & (y ^ z)); return x & y | ~x & z; } - } F; + }; + + F_ F;
???
C'est 3.4, où question de style ?
La c'est g++-3.4, il trouvait pas F, G, H et I.
Là, je ne comprends pas son problème. C'est pas un bug ? Tu peux résumer tout ça en un exemple plus court qui explique le pb ?
J'arrive pas a simplifier l'exemple, et je ne comprend pas ce qui va pas, et j'obtiens l'erreur suivante: ../../../olena/oln/utils/md5.hxx:132: error: no matching function for call to `oln::utils::MD5::sub_step(oln::utils::MD5::<anonymous struct
&, unsigned int&, unsigned int&, unsigned int&, unsigned int&, int, int, int)'
<anonymous struct> etant F. Avec ce que j'ai change, ca compile, mais en simplifiant le code, ca finit par compiler. -- Damien Thivolle damien.thivolle@lrde.epita.fr

"Damien" == Damien Thivolle <damien@lrde.epita.fr> writes:
Akim Demaille <akim@epita.fr> writes:
"Damien" == Damien Thivolle <damien@lrde.epita.fr> writes:
Akim Demaille <akim@epita.fr> writes:
> "Damien" == Damien Thivolle <damien@lrde.epita.fr> writes:
@@ -142,7 +142,7 @@ ** ** F(X,Y,Z) = XY v not(X) Z */ - struct + struct F_ { storage_type operator()(const storage_type &x, const storage_type &y, @@ -151,14 +151,16 @@ // return z ^ (x & (y ^ z)); return x & y | ~x & z; } - } F; + }; + + F_ F;
???
C'est 3.4, où question de style ?
La c'est g++-3.4, il trouvait pas F, G, H et I.
Là, je ne comprends pas son problème. C'est pas un bug ? Tu peux résumer tout ça en un exemple plus court qui explique le pb ?
J'arrive pas a simplifier l'exemple, et je ne comprend pas ce qui va pas, et j'obtiens l'erreur suivante:
../../../olena/oln/utils/md5.hxx:132: error: no matching function for call to `oln::utils::MD5::sub_step(oln::utils::MD5::<anonymous struct
&, unsigned int&, unsigned int&, unsigned int&, unsigned int&, int, int, int)'
<anonymous struct> etant F.
Avec ce que j'ai change, ca compile, mais en simplifiant le code, ca finit par compiler.
Essaie mieux :)

Akim Demaille <akim@epita.fr> writes:
"Damien" == Damien Thivolle <damien@lrde.epita.fr> writes:
Akim Demaille <akim@epita.fr> writes:
"Damien" == Damien Thivolle <damien@lrde.epita.fr> writes:
Akim Demaille <akim@epita.fr> writes:
>> "Damien" == Damien Thivolle <damien@lrde.epita.fr> writes:
@@ -142,7 +142,7 @@ ** ** F(X,Y,Z) = XY v not(X) Z */ - struct + struct F_ { storage_type operator()(const storage_type &x, const storage_type &y, @@ -151,14 +151,16 @@ // return z ^ (x & (y ^ z)); return x & y | ~x & z; } - } F; + }; + + F_ F;
???
C'est 3.4, où question de style ?
La c'est g++-3.4, il trouvait pas F, G, H et I.
Là, je ne comprends pas son problème. C'est pas un bug ? Tu peux résumer tout ça en un exemple plus court qui explique le pb ?
J'arrive pas a simplifier l'exemple, et je ne comprend pas ce qui va pas, et j'obtiens l'erreur suivante:
../../../olena/oln/utils/md5.hxx:132: error: no matching function for call to `oln::utils::MD5::sub_step(oln::utils::MD5::<anonymous struct
&, unsigned int&, unsigned int&, unsigned int&, unsigned int&, int, int, int)'
<anonymous struct> etant F.
Avec ce que j'ai change, ca compile, mais en simplifiant le code, ca finit par compiler.
Essaie mieux :)
J'y compte bien :) -- Damien Thivolle damien.thivolle@lrde.epita.fr
participants (3)
-
Akim Demaille
-
Damien Thivolle
-
Niels van Vliet