2401: Update complex-based images w.r.t. the creation of mln/topo/.

* mln/core/faces_psite.hh, * mln/core/complex_psite.hh, * mln/core/site_set/p_complex.hh, * mln/core/site_set/p_complex_faces_piter.hh, * mln/core/site_set/p_complex_piter.hh, * mln/core/site_set/p_faces.hh, * mln/core/site_set/p_faces_piter.hh, * tests/core/image/complex_image.cc: Adjust names. --- milena/ChangeLog | 14 +++++++++++ milena/mln/core/complex_psite.hh | 13 +++++----- milena/mln/core/faces_psite.hh | 12 +++++----- milena/mln/core/site_set/p_complex.hh | 17 ++++++------- milena/mln/core/site_set/p_complex_faces_piter.hh | 11 ++++----- milena/mln/core/site_set/p_complex_piter.hh | 11 ++++----- milena/mln/core/site_set/p_faces.hh | 19 +++++++-------- milena/mln/core/site_set/p_faces_piter.hh | 11 ++++----- milena/tests/core/image/complex_image.cc | 26 ++++++++++---------- 9 files changed, 72 insertions(+), 62 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 0963983..6db7873 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,19 @@ 2008-09-24 Roland Levillain <roland@lrde.epita.fr> + Update complex-based images w.r.t. the creation of mln/topo/. + + * mln/core/faces_psite.hh, + * mln/core/complex_psite.hh, + * mln/core/site_set/p_complex.hh, + * mln/core/site_set/p_complex_faces_piter.hh, + * mln/core/site_set/p_complex_piter.hh, + * mln/core/site_set/p_faces.hh, + * mln/core/site_set/p_faces_piter.hh, + * tests/core/image/complex_image.cc: + Adjust names. + +2008-09-24 Roland Levillain <roland@lrde.epita.fr> + Move complex-related entities to mln/topo/. * mln/topo/: New directory. diff --git a/milena/mln/core/complex_psite.hh b/milena/mln/core/complex_psite.hh index 2a9a0e7..d6692e7 100644 --- a/milena/mln/core/complex_psite.hh +++ b/milena/mln/core/complex_psite.hh @@ -33,7 +33,7 @@ # include <mln/core/internal/pseudo_site_base.hh> -# include <mln/core/complex.hh> +# include <mln/topo/complex.hh> // FIXME: There's a circular dependency issue between complex_psite // and p_complex (likewise for faces_psite and p_faces): they have to @@ -72,7 +72,8 @@ namespace mln /// \{ complex_psite(); /// \pre pc.cplx() == face.cplx(). - complex_psite(const p_complex<D, P>& pc, const any_face_handle<D>& face); + complex_psite(const p_complex<D, P>& pc, + const topo::any_face_handle<D>& face); complex_psite(const p_complex<D, P>& pc, unsigned n, unsigned face_id); /// \} @@ -106,7 +107,7 @@ namespace mln /// Face handle manipulators. /// \{ /// Return the face handle of this point site. - any_face_handle<D> face() const; + topo::any_face_handle<D> face() const; /// Return the dimension of the face of this psite. unsigned n() const; @@ -141,7 +142,7 @@ namespace mln /// The mln::p_faces this point site belongs to. const target* pc_; /// The handle of the face this psite is pointing towards. - any_face_handle<D> face_; + topo::any_face_handle<D> face_; /// \} }; @@ -208,7 +209,7 @@ namespace mln template <unsigned D, typename P> inline complex_psite<D, P>::complex_psite(const p_complex<D, P>& pc, - const any_face_handle<D>& face) + const topo::any_face_handle<D>& face) : pc_(&pc), face_(face) { @@ -288,7 +289,7 @@ namespace mln template <unsigned D, typename P> inline - any_face_handle<D> + topo::any_face_handle<D> complex_psite<D, P>::face() const { return face_; diff --git a/milena/mln/core/faces_psite.hh b/milena/mln/core/faces_psite.hh index 102394b..dd213b6 100644 --- a/milena/mln/core/faces_psite.hh +++ b/milena/mln/core/faces_psite.hh @@ -34,7 +34,7 @@ # include <mln/core/internal/pseudo_site_base.hh> -# include <mln/core/complex.hh> +# include <mln/topo/complex.hh> // FIXME: Factor complex_psite and faces_psite? @@ -66,7 +66,7 @@ namespace mln /// \{ faces_psite(); /// \pre pf.cplx() == face.cplx(). - faces_psite(const p_faces<N, D, P>& pf, const face_handle<N, D>& face); + faces_psite(const p_faces<N, D, P>& pf, const topo::face_handle<N, D>& face); faces_psite(const p_faces<N, D, P>& pf, unsigned face_id); /// \} @@ -100,7 +100,7 @@ namespace mln /// Face handle manipulators. /// \{ /// Return the face handle of this point site. - face_handle<N, D> face() const; + topo::face_handle<N, D> face() const; /// Return the dimension of the face of this psite. unsigned n() const; @@ -134,7 +134,7 @@ namespace mln /// The mln::p_faces this point site belongs to. const target* pf_; /// The handle of the face this psite is pointing towards. - face_handle<N, D> face_; + topo::face_handle<N, D> face_; /// \} }; @@ -199,7 +199,7 @@ namespace mln template <unsigned N, unsigned D, typename P> inline faces_psite<N, D, P>::faces_psite(const p_faces<N, D, P>& pf, - const face_handle<N, D>& face) + const topo::face_handle<N, D>& face) : pf_(&pf), face_(face) { @@ -285,7 +285,7 @@ namespace mln template <unsigned N, unsigned D, typename P> inline - face_handle<N, D> + topo::face_handle<N, D> faces_psite<N, D, P>::face() const { return face_; diff --git a/milena/mln/core/site_set/p_complex.hh b/milena/mln/core/site_set/p_complex.hh index de6e0ad..ecbc0fa 100644 --- a/milena/mln/core/site_set/p_complex.hh +++ b/milena/mln/core/site_set/p_complex.hh @@ -33,7 +33,7 @@ # include <mln/core/internal/site_set_base.hh> -# include <mln/core/complex.hh> +# include <mln/topo/complex.hh> # include <mln/core/complex_psite.hh> # include <mln/core/site_set/p_complex_piter.hh> @@ -105,7 +105,7 @@ namespace mln /// \brief Construct a complex psite set from a complex. /// /// \param gr The complex upon which the complex psite set is built. - p_complex (const complex<D>& cplx); + p_complex (const topo::complex<D>& cplx); /// Associated types. /// \{ @@ -158,10 +158,10 @@ namespace mln /// version) /* FIXME: Move back the const qualifier on this return type (see comment below on cplx_). */ - complex<D>& cplx() const; + topo::complex<D>& cplx() const; /// Return the complex associated to the p_complex domain (mutable /// version). - complex<D>& cplx(); + topo::complex<D>& cplx(); /// \} private: @@ -179,7 +179,7 @@ namespace mln on a complex, leading to a design of complexes similar to graphs, where vertex and edge handles (named `id's) are not tied to a specific graph. */ - mutable complex<D> cplx_; + mutable topo::complex<D> cplx_; }; @@ -209,7 +209,7 @@ namespace mln template <unsigned D, typename P> inline - p_complex<D, P>::p_complex(const complex<D>& cplx) + p_complex<D, P>::p_complex(const topo::complex<D>& cplx) : cplx_(cplx) { } @@ -262,7 +262,7 @@ namespace mln } template <unsigned D, typename P> - complex<D>& + topo::complex<D>& p_complex<D, P>::cplx() const { mln_precondition(is_valid()); @@ -270,7 +270,7 @@ namespace mln } template <unsigned D, typename P> - complex<D>& + topo::complex<D>& p_complex<D, P>::cplx() { mln_precondition(is_valid()); @@ -304,5 +304,4 @@ namespace mln } // end of mln - #endif // MLN_CORE_SITE_SET_P_COMPLEX_HH diff --git a/milena/mln/core/site_set/p_complex_faces_piter.hh b/milena/mln/core/site_set/p_complex_faces_piter.hh index ef77272..de10d54 100644 --- a/milena/mln/core/site_set/p_complex_faces_piter.hh +++ b/milena/mln/core/site_set/p_complex_faces_piter.hh @@ -37,7 +37,7 @@ # include <mln/core/site_set/p_complex.hh> # include <mln/core/internal/p_complex_piter_base.hh> -# include <mln/core/complex_faces_iter.hh> +# include <mln/topo/complex_faces_iter.hh> /* FIXME: p_complex_faces_fwd_piter_ and p_complex_faces_bkd_piter_ are really long names: find something shorter. */ @@ -61,13 +61,13 @@ namespace mln /// mln::p_complex<D, P>. template <unsigned N, unsigned D, typename P> class p_complex_faces_fwd_piter_ - : public internal::p_complex_piter_base_< complex_faces_fwd_iter_<N, D>, + : public internal::p_complex_piter_base_< topo::complex_faces_fwd_iter_<N, D>, p_complex<D, P>, P, p_complex_faces_fwd_piter_<N, D, P> > { typedef p_complex_faces_fwd_piter_<N, D, P> self_; - typedef internal::p_complex_piter_base_< complex_faces_fwd_iter_<N, D>, + typedef internal::p_complex_piter_base_< topo::complex_faces_fwd_iter_<N, D>, p_complex<D, P>, P, self_ > super_; @@ -91,13 +91,13 @@ namespace mln class p_complex_faces_bkd_piter_ /* FIXME: Rename internal::p_complex_piter_base_ to something else, as it is also used for p_faces piters! */ - : public internal::p_complex_piter_base_< complex_faces_bkd_iter_<N, D>, + : public internal::p_complex_piter_base_< topo::complex_faces_bkd_iter_<N, D>, p_complex<D, P>, P, p_complex_faces_bkd_piter_<N, D, P> > { typedef p_complex_faces_bkd_piter_<N, D, P> self_; - typedef internal::p_complex_piter_base_< complex_faces_bkd_iter_<N, D>, + typedef internal::p_complex_piter_base_< topo::complex_faces_bkd_iter_<N, D>, p_complex<D, P>, P, self_ > super_; @@ -153,5 +153,4 @@ namespace mln } // end of mln - #endif // ! MLN_CORE_SITE_SET_P_COMPLEX_FACES_PITER_HH diff --git a/milena/mln/core/site_set/p_complex_piter.hh b/milena/mln/core/site_set/p_complex_piter.hh index 114eed6..996b637 100644 --- a/milena/mln/core/site_set/p_complex_piter.hh +++ b/milena/mln/core/site_set/p_complex_piter.hh @@ -36,7 +36,7 @@ # include <mln/core/site_set/p_complex.hh> # include <mln/core/internal/p_complex_piter_base.hh> -# include <mln/core/complex_iter.hh> +# include <mln/topo/complex_iter.hh> namespace mln { @@ -55,13 +55,13 @@ namespace mln /// \brief Forward iterator on (all) the faces of an mln::p_complex<D, P>. template <unsigned D, typename P> class p_complex_fwd_piter_ - : public internal::p_complex_piter_base_< complex_fwd_iter_<D>, + : public internal::p_complex_piter_base_< topo::complex_fwd_iter_<D>, p_complex<D, P>, P, p_complex_fwd_piter_<D, P> > { typedef p_complex_fwd_piter_<D, P> self_; - typedef internal::p_complex_piter_base_< complex_fwd_iter_<D>, + typedef internal::p_complex_piter_base_< topo::complex_fwd_iter_<D>, p_complex<D, P>, P, self_ > super_; @@ -82,13 +82,13 @@ namespace mln /// \brief Backward iterator on (all) the faces of an mln::p_complex<D, P>. template <unsigned D, typename P> class p_complex_bkd_piter_ - : public internal::p_complex_piter_base_< complex_bkd_iter_<D>, + : public internal::p_complex_piter_base_< topo::complex_bkd_iter_<D>, p_complex<D, P>, P, p_complex_bkd_piter_<D, P> > { typedef p_complex_bkd_piter_<D, P> self_; - typedef internal::p_complex_piter_base_< complex_bkd_iter_<D>, + typedef internal::p_complex_piter_base_< topo::complex_bkd_iter_<D>, p_complex<D, P>, P, self_ > super_; @@ -144,5 +144,4 @@ namespace mln } // end of mln - #endif // ! MLN_CORE_SITE_SET_P_COMPLEX_PITER_HH diff --git a/milena/mln/core/site_set/p_faces.hh b/milena/mln/core/site_set/p_faces.hh index 21cd898..b17f85a 100644 --- a/milena/mln/core/site_set/p_faces.hh +++ b/milena/mln/core/site_set/p_faces.hh @@ -34,7 +34,7 @@ # include <mln/core/internal/site_set_base.hh> -# include <mln/core/complex.hh> +# include <mln/topo/complex.hh> # include <mln/core/faces_psite.hh> # include <mln/core/site_set/p_faces_piter.hh> @@ -71,7 +71,7 @@ namespace mln template <unsigned N, unsigned D, typename P> struct p_faces : public internal::site_set_base_< faces_psite<N, D, P>, - p_faces<N, D, P> > + p_faces<N, D, P> > { typedef p_faces<N, D, P> self_; typedef internal::site_set_base_< faces_psite<N, D, P>, self_ > super_; @@ -79,7 +79,7 @@ namespace mln /// \brief Construct a faces psite set from an mln::complex. /// /// \param gr The complex upon which the complex psite set is built. - p_faces(const complex<D>& cplx); + p_faces(const topo::complex<D>& cplx); /// \brief Construct a faces psite set from an mln::p_complex. /// @@ -140,10 +140,10 @@ namespace mln /// version). /* FIXME: Move back the const qualifier on this return type (see comment below on cplx_). */ - complex<D>& cplx() const; + topo::complex<D>& cplx() const; /// Return the complex associated to the p_faces domain (mutable /// version). - complex<D>& cplx(); + topo::complex<D>& cplx(); /// \} private: @@ -160,7 +160,7 @@ namespace mln on a complex, leading to a design of complexes similar to graphs, where vertex and edge handles (named `id's) are not tied to a specific graph. */ - mutable complex<D> cplx_; + mutable topo::complex<D> cplx_; }; @@ -190,7 +190,7 @@ namespace mln template <unsigned N, unsigned D, typename P> inline - p_faces<N, D, P>::p_faces(const complex<D>& cplx) + p_faces<N, D, P>::p_faces(const topo::complex<D>& cplx) : cplx_(cplx) { // Ensure N is compatible with D. @@ -254,7 +254,7 @@ namespace mln } template <unsigned N, unsigned D, typename P> - complex<D>& + topo::complex<D>& p_faces<N, D, P>::cplx() const { mln_precondition(is_valid()); @@ -262,7 +262,7 @@ namespace mln } template <unsigned N, unsigned D, typename P> - complex<D>& + topo::complex<D>& p_faces<N, D, P>::cplx() { mln_precondition(is_valid()); @@ -296,5 +296,4 @@ namespace mln } // end of mln - #endif // MLN_CORE_SITE_SET_P_FACES_HH diff --git a/milena/mln/core/site_set/p_faces_piter.hh b/milena/mln/core/site_set/p_faces_piter.hh index 65f07fd..bfd1031 100644 --- a/milena/mln/core/site_set/p_faces_piter.hh +++ b/milena/mln/core/site_set/p_faces_piter.hh @@ -36,7 +36,7 @@ # include <mln/core/site_set/p_faces.hh> # include <mln/core/internal/p_complex_piter_base.hh> -# include <mln/core/faces_iter.hh> +# include <mln/topo/faces_iter.hh> namespace mln @@ -57,13 +57,13 @@ namespace mln /// mln::p_faces<N, D, P>. template <unsigned N, unsigned D, typename P> class p_faces_fwd_piter_ - : public internal::p_complex_piter_base_< faces_fwd_iter_<N, D>, + : public internal::p_complex_piter_base_< topo::faces_fwd_iter_<N, D>, p_faces<N, D, P>, P, p_faces_fwd_piter_<N, D, P> > { typedef p_faces_fwd_piter_<N, D, P> self_; - typedef internal::p_complex_piter_base_< faces_fwd_iter_<N, D>, + typedef internal::p_complex_piter_base_< topo::faces_fwd_iter_<N, D>, p_faces<N, D, P>, P, self_ > super_; @@ -87,13 +87,13 @@ namespace mln class p_faces_bkd_piter_ /* FIXME: Rename internal::p_complex_piter_base_ to something else, as it is also used for p_faces piters! */ - : public internal::p_complex_piter_base_< faces_bkd_iter_<N, D>, + : public internal::p_complex_piter_base_< topo::faces_bkd_iter_<N, D>, p_faces<N, D, P>, P, p_faces_bkd_piter_<N, D, P> > { typedef p_faces_bkd_piter_<N, D, P> self_; - typedef internal::p_complex_piter_base_< faces_bkd_iter_<N, D>, + typedef internal::p_complex_piter_base_< topo::faces_bkd_iter_<N, D>, p_faces<N, D, P>, P, self_ > super_; @@ -149,5 +149,4 @@ namespace mln } // end of mln - #endif // ! MLN_CORE_SITE_SET_P_FACES_PITER_HH diff --git a/milena/tests/core/image/complex_image.cc b/milena/tests/core/image/complex_image.cc index 24f0a2c..3b40fba 100644 --- a/milena/tests/core/image/complex_image.cc +++ b/milena/tests/core/image/complex_image.cc @@ -65,24 +65,24 @@ int main() const unsigned D = 2; - complex<D> c; + topo::complex<D> c; // 0-faces (points). - face_handle<0, D> v0 = c.add_face(); - face_handle<0, D> v1 = c.add_face(); - face_handle<0, D> v2 = c.add_face(); - face_handle<0, D> v3 = c.add_face(); + topo::face_handle<0, D> v0 = c.add_face(); + topo::face_handle<0, D> v1 = c.add_face(); + topo::face_handle<0, D> v2 = c.add_face(); + topo::face_handle<0, D> v3 = c.add_face(); // 1-faces (segments). - face_handle<1, D> e0 = c.add_face(v0 + v1); - face_handle<1, D> e1 = c.add_face(v0 + v2); - face_handle<1, D> e2 = c.add_face(v1 + v2); - face_handle<1, D> e3 = c.add_face(v0 + v3); - face_handle<1, D> e4 = c.add_face(v2 + v3); + topo::face_handle<1, D> e0 = c.add_face(v0 + v1); + topo::face_handle<1, D> e1 = c.add_face(v0 + v2); + topo::face_handle<1, D> e2 = c.add_face(v1 + v2); + topo::face_handle<1, D> e3 = c.add_face(v0 + v3); + topo::face_handle<1, D> e4 = c.add_face(v2 + v3); // 2-faces (triangles). - face_handle<2, D> t0 = c.add_face(e0 + e1 + e2); - face_handle<2, D> t1 = c.add_face(e1 + e3 + e4); + topo::face_handle<2, D> t0 = c.add_face(e0 + e1 + e2); + topo::face_handle<2, D> t1 = c.add_face(e1 + e3 + e4); /*---------------------. @@ -91,7 +91,7 @@ int main() // A pset. p_complex<D, point2d> pc(c); - any_face_handle<D> af(e0); + topo::any_face_handle<D> af(e0); // An associated psite. complex_psite<D, point2d> cs(pc, af); -- 1.6.0.1
participants (1)
-
Roland Levillain