
https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena Index: ChangeLog from Thierry Geraud <thierry.geraud@lrde.epita.fr> Update site set concepts and generic box. * mln/trait/site_set/print.hh (ostr): Add default. * mln/core/macros.hh (mln_site, mln_site_): New. * mln/core/internal/point_set_base.hh (mesh, dpoint): Remove. (point): Rename as... (site): ...this. Update. * mln/core/box.hh: Likewise. (trait::site_set_): New. * mln/core/concept/box.hh (point): Rename as... (site): ...this. * mln/core/concept/point_set.hh: Likewise. Remove npoints and bbox from comments. (point_set): Add props check in ctor. (operator==, operator <=): Remove test over npoints. (operator <): Rely on != instead of npoints. * mln/core/concept/doc/box.hh (point): Rename as... (site): ...this. * mln/core/concept/doc/point_set.hh: Likewise. (bbox, npoints): Remove. * tests/core/box2d.cc: Add print props test. * mln/core/pset_array.hh, * mln/core/p_priority_queue_fast.hh, * mln/core/p_priority_queue_fast_with_array.hh, * mln/core/p_queue_fast.hh, * mln/core/p_image2d.hh, * mln/core/p_line_graph.hh, * mln/core/p_queue.hh, * mln/core/p_graph.hh, * mln/core/p_priority_queue.hh, * mln/core/p_set.hh, * mln/core/line2d.hh, * mln/core/p_bgraph.hh, * mln/core/p_run.hh, * mln/core/pset_if.hh, * mln/core/p_array.hh, * mln/core/p_runs.hh (point_set_base_): Rename as... (site_set_base_): ...this. * mln/metal/not_equal.hh: New. * mln/metal/all.hh: Include not_equal. mln/core/box.hh | 41 +++++++++----- mln/core/concept/box.hh | 35 ++++++------ mln/core/concept/doc/box.hh | 9 +-- mln/core/concept/doc/point_set.hh | 24 ++------ mln/core/concept/point_set.hh | 75 ++++++++++----------------- mln/core/internal/point_set_base.hh | 24 +++----- mln/core/line2d.hh | 2 mln/core/macros.hh | 12 +++- mln/core/p_array.hh | 2 mln/core/p_bgraph.hh | 2 mln/core/p_graph.hh | 2 mln/core/p_image2d.hh | 2 mln/core/p_line_graph.hh | 2 mln/core/p_priority_queue.hh | 2 mln/core/p_priority_queue_fast.hh | 2 mln/core/p_priority_queue_fast_with_array.hh | 2 mln/core/p_queue.hh | 2 mln/core/p_queue_fast.hh | 2 mln/core/p_run.hh | 2 mln/core/p_runs.hh | 2 mln/core/p_set.hh | 2 mln/core/pset_array.hh | 2 mln/core/pset_if.hh | 4 - mln/metal/all.hh | 1 mln/metal/not_equal.hh | 63 ++++++++++++++++++++++ mln/trait/site_set/print.hh | 4 - tests/core/box2d.cc | 2 27 files changed, 192 insertions(+), 132 deletions(-) Index: tests/core/box2d.cc --- tests/core/box2d.cc (revision 1950) +++ tests/core/box2d.cc (working copy) @@ -43,4 +43,6 @@ box2d b_(2, 3); mln_assertion(b == b_); + + // trait::site_set::print(b); } Index: mln/trait/site_set/print.hh --- mln/trait/site_set/print.hh (revision 1950) +++ mln/trait/site_set/print.hh (working copy) @@ -53,10 +53,10 @@ { template <typename S> - void print(std::ostream& ostr); + void print(std::ostream& ostr = std::cout); template <typename S> - void print(const Site_Set<S>& ima, std::ostream& ostr); + void print(const Site_Set<S>& ima, std::ostream& ostr = std::cout); # ifndef MLN_INCLUDE_ONLY Index: mln/core/macros.hh --- mln/core/macros.hh (revision 1950) +++ mln/core/macros.hh (working copy) @@ -1,4 +1,5 @@ -// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory (LRDE) +// 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 @@ -242,6 +243,15 @@ /// \} +// s + +/// Shortcuts to access the site type associated to T. +/// \{ +# define mln_site(T) typename T::site +# define mln_site_(T) T::site +/// \} + + // v /// Shortcuts to access the value type associated to T. Index: mln/core/pset_array.hh --- mln/core/pset_array.hh (revision 1950) +++ mln/core/pset_array.hh (working copy) @@ -67,7 +67,7 @@ */ template <typename Pset> class pset_array: - public internal::point_set_base_<pset_array_psite<Pset>, pset_array<Pset> > + public internal::site_set_base_<pset_array_psite<Pset>, pset_array<Pset> > { public: Index: mln/core/internal/point_set_base.hh --- mln/core/internal/point_set_base.hh (revision 1950) +++ mln/core/internal/point_set_base.hh (working copy) @@ -30,7 +30,7 @@ /*! \file mln/core/internal/point_set_base.hh * - * \brief Definition of a base class for point set classes. + * \brief Definition of a base class for site set classes. */ # include <mln/core/concept/point_set.hh> @@ -43,26 +43,20 @@ namespace internal { - /*! \internal A base class for point set classes. - * \p P is a point site type. + /*! \internal A base class for site set classes. + * \p P is a psite type. */ template <typename P, typename E> - struct point_set_base_ : public Site_Set<E> + struct site_set_base_ : public Site_Set<E> { - /// Point_Site associated type. + /// PSite associated type. typedef P psite; - /// Mesh associated type. - typedef mln_mesh(P) mesh; - - /// Point associated type. - typedef mln_point(P) point; - - /// Dpoint associated type. - typedef mln_dpoint(point) dpoint; + /// Site associated type. + typedef mln_site(P) site; protected: - point_set_base_(); + site_set_base_(); }; @@ -70,7 +64,7 @@ template <typename S, typename E> inline - point_set_base_<S,E>::point_set_base_() + site_set_base_<S,E>::site_set_base_() { } Index: mln/core/p_priority_queue_fast.hh --- mln/core/p_priority_queue_fast.hh (revision 1950) +++ mln/core/p_priority_queue_fast.hh (working copy) @@ -63,7 +63,7 @@ * a call to npoints() when this container is multiple. */ template <typename P, typename T> - class p_priority_queue_fast : public internal::point_set_base_< P, p_priority_queue_fast<P, T> > + class p_priority_queue_fast : public internal::site_set_base_< P, p_priority_queue_fast<P, T> > { public: Index: mln/core/p_priority_queue_fast_with_array.hh --- mln/core/p_priority_queue_fast_with_array.hh (revision 1950) +++ mln/core/p_priority_queue_fast_with_array.hh (working copy) @@ -63,7 +63,7 @@ * a call to npoints() when this container is multiple. */ template <typename P, typename T, unsigned S> - class p_priority_queue_fast_with_array : public internal::point_set_base_< P, p_priority_queue_fast_with_array<P, T, S> > + class p_priority_queue_fast_with_array : public internal::site_set_base_< P, p_priority_queue_fast_with_array<P, T, S> > { public: Index: mln/core/p_queue_fast.hh --- mln/core/p_queue_fast.hh (revision 1950) +++ mln/core/p_queue_fast.hh (working copy) @@ -62,7 +62,7 @@ * a call to npoints() when this container is multiple. */ template <typename P> - class p_queue_fast : public internal::point_set_base_< P, p_queue_fast<P> > + class p_queue_fast : public internal::site_set_base_< P, p_queue_fast<P> > { public: Index: mln/core/p_image2d.hh --- mln/core/p_image2d.hh (revision 1950) +++ mln/core/p_image2d.hh (working copy) @@ -55,7 +55,7 @@ template <typename P> struct p_image2d_bkd_piter_; template <typename P> - class p_image2d : public internal::point_set_base_<P, p_image2d<P> > + class p_image2d : public internal::site_set_base_<P, p_image2d<P> > { public: Index: mln/core/p_line_graph.hh --- mln/core/p_line_graph.hh (revision 1950) +++ mln/core/p_line_graph.hh (working copy) @@ -53,7 +53,7 @@ template<typename P> struct p_line_graph - : public internal::point_set_base_< line_graph_psite<P>, p_line_graph<P> > + : public internal::site_set_base_< line_graph_psite<P>, p_line_graph<P> > { typedef util::graph<P> graph; Index: mln/core/box.hh --- mln/core/box.hh (revision 1950) +++ mln/core/box.hh (working copy) @@ -42,12 +42,29 @@ namespace mln { - // fwd decl + // Fwd decls. + template <typename P> struct box_; template <typename P> struct box_fwd_piter_; template <typename P> struct box_bkd_piter_; - /*! \brief Generic box class. + namespace trait + { + + template <typename P> + struct site_set_< box_<P> > + { + typedef trait::site_set::nsites::known nsites; + typedef trait::site_set::bbox::straight bbox; + typedef trait::site_set::contents::fixed contents; + typedef trait::site_set::arity::unique arity; + }; + + } // end of namespace trait + + + /*! \brief Generic box class: site set containing points of a + * regular grid. * * Parameter \c P is the corresponding type of point. */ @@ -58,22 +75,16 @@ /// Dimension. enum { dim = P::dim }; - /// Mesh associated type. - typedef mln_mesh(P) mesh; - - /// Point_Site associated type. + /// PSite associated type. typedef P psite; - /// Point associated type. - typedef P point; - - /// Dpoint associated type. - typedef mln_dpoint(P) dpoint; + /// Site associated type. + typedef P site; - /// Forward Point_Iterator associated type. + /// Forward Site_Iterator associated type. typedef box_fwd_piter_<P> fwd_piter; - /// Backward Point_Iterator associated type. + /// Backward Site_Iterator associated type. typedef box_bkd_piter_<P> bkd_piter; /// Minimum point. @@ -92,7 +103,7 @@ box_(); /// Constructor of a box going from \p pmin to \p pmax. - box_(const point& pmin, const point& pmax); + box_(const site& pmin, const site& pmax); /// \{ Constructors with different numbers of arguments /// (sizes) w.r.t. the dimension. @@ -173,7 +184,7 @@ template <typename P> inline - box_<P>::box_(const point& pmin, const point& pmax) + box_<P>::box_(const site& pmin, const site& pmax) : pmin_(pmin), pmax_(pmax) { Index: mln/core/p_queue.hh --- mln/core/p_queue.hh (revision 1950) +++ mln/core/p_queue.hh (working copy) @@ -63,7 +63,7 @@ * a call to npoints() when this container is multiple. */ template <typename P> - class p_queue : public internal::point_set_base_< P, p_queue<P> > + class p_queue : public internal::site_set_base_< P, p_queue<P> > { public: Index: mln/core/p_graph.hh --- mln/core/p_graph.hh (revision 1950) +++ mln/core/p_graph.hh (working copy) @@ -47,7 +47,7 @@ template<typename P> struct p_graph - : public internal::point_set_base_< graph_psite<P>, p_graph<P> > + : public internal::site_set_base_< graph_psite<P>, p_graph<P> > { typedef util::graph<P> graph; Index: mln/core/p_priority_queue.hh --- mln/core/p_priority_queue.hh (revision 1950) +++ mln/core/p_priority_queue.hh (working copy) @@ -63,7 +63,7 @@ * a call to npoints() when this container is multiple. */ template <typename P, typename T> - class p_priority_queue : public internal::point_set_base_< P, p_priority_queue<P, T> > + class p_priority_queue : public internal::site_set_base_< P, p_priority_queue<P, T> > { public: Index: mln/core/p_set.hh --- mln/core/p_set.hh (revision 1950) +++ mln/core/p_set.hh (working copy) @@ -50,7 +50,7 @@ * \todo Test if \p P being a Point_Site is ok. */ template <typename P> - class p_set : public internal::point_set_base_< P, p_set<P> >, + class p_set : public internal::site_set_base_< P, p_set<P> >, private internal::set_of_<P> { typedef internal::set_of_<P> super_; Index: mln/core/line2d.hh --- mln/core/line2d.hh (revision 1950) +++ mln/core/line2d.hh (working copy) @@ -47,7 +47,7 @@ /*! \brief 2D line point set class. */ - class line2d : public internal::point_set_base_< point2d, line2d > + class line2d : public internal::site_set_base_< point2d, line2d > { public: Index: mln/core/p_bgraph.hh --- mln/core/p_bgraph.hh (revision 1950) +++ mln/core/p_bgraph.hh (working copy) @@ -49,7 +49,7 @@ template<typename P> struct p_bgraph - : public internal::point_set_base_< graph_psite<P>, p_bgraph<P> > + : public internal::site_set_base_< graph_psite<P>, p_bgraph<P> > { typedef util::internal::boost_graph<P, util::empty> graph; Index: mln/core/p_run.hh --- mln/core/p_run.hh (revision 1950) +++ mln/core/p_run.hh (working copy) @@ -53,7 +53,7 @@ * \todo Test if \p P being a Point_Site is ok. */ template <typename P> - class p_run : public internal::point_set_base_< P, p_run<P> > + class p_run : public internal::site_set_base_< P, p_run<P> > { public: Index: mln/core/pset_if.hh --- mln/core/pset_if.hh (revision 1950) +++ mln/core/pset_if.hh (working copy) @@ -65,10 +65,10 @@ * from point to Boolean. */ template <typename S, typename F> - class pset_if : public internal::point_set_base_< mln_psite(S), pset_if<S,F> > + class pset_if : public internal::site_set_base_< mln_psite(S), pset_if<S,F> > { typedef pset_if<S,F> self_; - typedef internal::point_set_base_<mln_psite(S), self_> super_; + typedef internal::site_set_base_<mln_psite(S), self_> super_; public: typedef mln_psite(super_) psite; Index: mln/core/p_array.hh --- mln/core/p_array.hh (revision 1950) +++ mln/core/p_array.hh (working copy) @@ -57,7 +57,7 @@ * \todo Make it work with P being a Point_Site. */ template <typename P> - class p_array : public internal::point_set_base_< P, p_array<P> > + class p_array : public internal::site_set_base_< P, p_array<P> > { public: /// The associated psite type. Index: mln/core/concept/box.hh --- mln/core/concept/box.hh (revision 1950) +++ mln/core/concept/box.hh (working copy) @@ -1,4 +1,4 @@ -// Copyright (C) 2007 EPITA Research and Development Laboratory +// Copyright (C) 2007, 2008 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 @@ -29,6 +29,7 @@ # define MLN_CORE_CONCEPT_BOX_HH /*! \file mln/core/concept/box.hh + * * \brief Definition of the concept of mln::Box. */ @@ -40,8 +41,8 @@ /*! \brief Base class for implementation classes of boxes. * - * Boxes are particular point sets useful to bound any set of - * points. + * Boxes are particular site sets useful to bound any set of + * sites defined on a regular grid. * * \see mln::doc::Box for a complete documentation of this class * contents. @@ -50,35 +51,35 @@ struct Box : public Site_Set<E> { /* - const point& pmin() const; - const point& pmax() const; + const site& pmin() const; + const site& pmax() const; */ /*! \brief Give the length of the \p i-th side of the box. * - * \pre i < point::dim + * \pre i < site::dim * * \warning This method is final for all box classes. */ unsigned len(unsigned i) const; - /*! \brief Give the bounding box of this point set. + /*! \brief Give the bounding box of this site set. * - * Return the bounding box of this point set, so that is itself. + * Return the bounding box of this site set, so that is itself. * This method is declared by the mln::Site_Set concept. * * \warning This method is final for all box classes. */ const E& bbox() const; - /*! \brief Give the number of points of this box. + /*! \brief Give the number of sites of this box. * - * Return the number of points of this box. This method is + * Return the number of sites of this box. This method is * declared by the mln::Site_Set concept. * * \warning This method is final for all box classes. */ - std::size_t npoints() const; + std::size_t nsites() const; protected: Box(); @@ -144,20 +145,20 @@ inline Box<E>::Box() { - typedef mln_point(E) point; - point (E::*m1)() const = & E::pmin; + typedef mln_site(E) site; + site (E::*m1)() const = & E::pmin; m1 = 0; - point (E::*m2)() const = & E::pmax; + site (E::*m2)() const = & E::pmax; m2 = 0; } template <typename E> inline std::size_t - Box<E>::npoints() const + Box<E>::nsites() const { std::size_t count = 1; - typedef mln_point(E) P; // helps g++-3.3.5 + typedef mln_site(E) P; // helps g++-3.3.5 for (unsigned i = 0; i < P::dim; ++i) count *= exact(this)->len(i); return count; @@ -183,7 +184,7 @@ // FIXME: Same grid! const Bl& lhs = exact(lhs_); const Br& rhs = exact(rhs_); - typedef mln_point(Bl) P; + typedef mln_site(Bl) P; for (unsigned i = 0; i < P::dim; ++i) if (lhs.pmin()[i] < rhs.pmin()[i] || lhs.pmax()[i] > rhs.pmax()[i]) Index: mln/core/concept/point_set.hh --- mln/core/concept/point_set.hh (revision 1950) +++ mln/core/concept/point_set.hh (working copy) @@ -32,14 +32,13 @@ * * \brief Definition of the concept of mln::Site_Set. * - * \todo Think about adding an 'insert' method (not so easy because of - * pset_if...) - * * \todo Move out the ops. */ # include <mln/core/concept/point_site.hh> # include <mln/core/concept/point_iterator.hh> +# include <mln/trait/site_sets.hh> +# include <mln/metal/not_equal.hh> namespace mln @@ -57,7 +56,7 @@ }; - /*! \brief Base class for implementation classes of point sets. + /*! \brief Base class for implementation classes of site sets. * * \see mln::doc::Site_Set for a complete documentation of this * class contents. @@ -68,19 +67,13 @@ typedef Site_Set<void> category; /* - typedef mesh; - - typedef point; + typedef site; typedef psite; typedef fwd_piter; typedef bkd_piter; bool has(const psite& p) const; - std::size_t npoints() const; - - // FIXME: No longer required (at least, not this way). - const box_<point>& bbox() const; */ protected: @@ -88,10 +81,10 @@ }; - /*! \brief Equality test between point sets \p lhs and \p rhs. + /*! \brief Equality test between site sets \p lhs and \p rhs. * - * \param[in] lhs A point set. - * \param[in] rhs Another point set. + * \param[in] lhs A site set. + * \param[in] rhs Another site set. * * \relates mln::Site_Set */ @@ -100,10 +93,10 @@ - /*! \brief Inclusion test between point sets \p lhs and \p rhs. + /*! \brief Inclusion test between site sets \p lhs and \p rhs. * - * \param[in] lhs A point set (included?). - * \param[in] rhs Another point set (includer?). + * \param[in] lhs A site set (included?). + * \param[in] rhs Another site set (includer?). * * \relates mln::Site_Set */ @@ -112,11 +105,11 @@ - /*! \brief Strict inclusion test between point sets \p lhs and \p + /*! \brief Strict inclusion test between site sets \p lhs and \p * rhs. * - * \param[in] lhs A point set (strictly included?). - * \param[in] rhs Another point set (includer?). + * \param[in] lhs A site set (strictly included?). + * \param[in] rhs Another site set (includer?). * * \relates mln::Site_Set */ @@ -125,18 +118,18 @@ - /*! \brief Print a point set \p pset into the output stream \p + /*! \brief Print a site set \p set into the output stream \p * ostr. * * \param[in,out] ostr An output stream. - * \param[in] pset A point set. + * \param[in] set A site set. * * \return The modified output stream \p ostr. * * \relates mln::Site_Set */ template <typename S> - std::ostream& operator<<(std::ostream& ostr, const Site_Set<S>& pset); + std::ostream& operator<<(std::ostream& ostr, const Site_Set<S>& set); @@ -149,21 +142,21 @@ inline Site_Set<E>::Site_Set() { - typedef mln_mesh(E) mesh; + // Check properties. + mlc_not_equal( mln_trait_site_set_nsites(E), mln::trait::undef )::check(); + mlc_not_equal( mln_trait_site_set_bbox(E), mln::trait::undef )::check(); + mlc_not_equal( mln_trait_site_set_contents(E), mln::trait::undef )::check(); + mlc_not_equal( mln_trait_site_set_arity(E), mln::trait::undef )::check(); - typedef mln_point(E) point; + // Check associated types. + typedef mln_site(E) site; typedef mln_psite(E) psite; - typedef mln_fwd_piter(E) fwd_piter; typedef mln_bkd_piter(E) bkd_piter; - bool (E::*m1)(const psite& p) const = & E::has; - m1 = 0; - // FIXME: No longer required (at least, not this way). -// const box_<point>& (E::*m2)() const = & E::bbox; -// m2 = 0; - std::size_t (E::*m3)() const = & E::npoints; - m3 = 0; + // Check methods. + bool (E::*m)(const psite& p) const = & E::has; + m = 0; } @@ -178,10 +171,6 @@ const Sl& lhs = exact(lhs_); const Sr& rhs = exact(rhs_); - // easy test: - if (lhs.npoints() != rhs.npoints()) - return false; - // exhaustive test: mln_fwd_piter(Sl) pl(lhs); mln_fwd_piter(Sr) pr(rhs); @@ -205,10 +194,6 @@ const Sl& lhs = exact(lhs_); const Sr& rhs = exact(rhs_); - // easy test: - if (lhs.npoints() > rhs.npoints()) - return false; - // exhaustive test: mln_piter(Sl) pl(lhs); for_all(pl) @@ -226,17 +211,17 @@ // FIXME: Same grid! const Sl& lhs = exact(lhs_); const Sr& rhs = exact(rhs_); - return lhs <= rhs && lhs.npoints() != rhs.npoints(); + return lhs <= rhs && lhs != rhs; } template <typename S> inline - std::ostream& operator<<(std::ostream& ostr, const Site_Set<S>& pset_) + std::ostream& operator<<(std::ostream& ostr, const Site_Set<S>& set_) { - const S& pset = exact(pset_); + const S& set = exact(set_); ostr << '{'; - mln_piter(S) p(pset); + mln_piter(S) p(set); for_all(p) ostr << p; return ostr << '}'; Index: mln/core/concept/doc/box.hh --- mln/core/concept/doc/box.hh (revision 1950) +++ mln/core/concept/doc/box.hh (working copy) @@ -1,4 +1,4 @@ -// Copyright (C) 2007 EPITA Research and Development Laboratory +// Copyright (C) 2007, 2008 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 @@ -26,6 +26,7 @@ // Public License. /*! \file mln/core/concept/doc/box.hh + * * \brief This file documents the concept of mln::Box. */ @@ -47,7 +48,7 @@ * For instance, with mln::box2d, this minimum is the top left * point of the box. */ - const point& pmin() const; + const site& pmin() const; /*! \brief Give the box "maximum" point. * @@ -55,7 +56,7 @@ * For instance, with mln::box2d, this maximum is the bottom * right point of the box. */ - const point& pmax() const; + const site& pmax() const; /*! \brief Return the bounding box of this point set. * @@ -73,7 +74,7 @@ * * \warning This method is final for all box classes. */ - std::size_t npoints() const; + std::size_t nsites() const; }; } // end of namespace mln::doc Index: mln/core/concept/doc/point_set.hh --- mln/core/concept/doc/point_set.hh (revision 1950) +++ mln/core/concept/doc/point_set.hh (working copy) @@ -42,36 +42,28 @@ template <typename E> struct Site_Set : public Object<E> { - /*! \brief Point associated type. + /*! \brief Site associated type. */ - typedef void point; + typedef void site; - /*! \brief Point_Site associated type. + /*! \brief PSite associated type. */ typedef void psite; - /*! \brief Forward Point_Iterator associated type. + /*! \brief Forward Site_Iterator associated type. */ typedef void fwd_piter; - /*! \brief Backward Point_Iterator associated type. + /*! \brief Backward Site_Iterator associated type. */ typedef void bkd_piter; - /*! \brief Test if \p p belongs to this point set. + /*! \brief Test if \p p belongs to this site set. * - * \param[in] p A point site. - * \return True if \p p is an element of the point set. + * \param[in] p A psite. + * \return True if \p p is an element of the site set. */ bool has(const psite& p) const; - - /*! \brief Give the bounding box of this point set. - */ - const box_<point>& bbox() const; - - /*! \brief Give the number of points of this point set. - */ - std::size_t npoints() const; }; } // end of namespace mln::doc Index: mln/core/p_runs.hh --- mln/core/p_runs.hh (revision 1950) +++ mln/core/p_runs.hh (working copy) @@ -57,7 +57,7 @@ * Parameter \c P is the type of the image point. */ template <typename P> - class p_runs_ : public internal::point_set_base_< runs_psite<P>, p_runs_<P> > + class p_runs_ : public internal::site_set_base_< runs_psite<P>, p_runs_<P> > { public: Index: mln/metal/not_equal.hh --- mln/metal/not_equal.hh (revision 0) +++ mln/metal/not_equal.hh (revision 0) @@ -0,0 +1,63 @@ +// Copyright (C) 2008 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_METAL_NOT_EQUAL_HH +# define MLN_METAL_NOT_EQUAL_HH + +/*! + * \file mln/metal/not_equal.hh + * + * \brief FIXME. + */ + +# include <mln/metal/bool.hh> + + +# define mlc_not_equal(T1, T2) mln::metal::not_equal< T1, T2 > + + +namespace mln +{ + + namespace metal + { + + template <typename T1, typename T2> + struct not_equal : true_ + {}; + + template <typename T> + struct not_equal< T, T > : false_ + {}; + + + } // end of namespace mln::metal + +} // end of namespace mln + + +#endif // ! MLN_METAL_NOT_EQUAL_HH Index: mln/metal/all.hh --- mln/metal/all.hh (revision 1950) +++ mln/metal/all.hh (working copy) @@ -56,6 +56,7 @@ # include <mln/metal/bexpr.hh> # include <mln/metal/bool.hh> # include <mln/metal/equal.hh> +# include <mln/metal/not_equal.hh> # include <mln/metal/if.hh> # include <mln/metal/converts_to.hh>