
* mln/core/image/complex_image.hh (complex_image<D, P, V>::operator()(const faces_psite<N, D, P>) const) (complex_image<D, P, V>::operator()(const faces_psite<N, D, P>)): Remove operators. * tests/core/image/complex_image.cc: Update, and make use of p_complex_faces_iter's. --- milena/ChangeLog | 11 +++++++++++ milena/mln/core/image/complex_image.hh | 29 ----------------------------- milena/tests/core/image/complex_image.cc | 14 +++++++------- 3 files changed, 18 insertions(+), 36 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 62fb495..6cd837a 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -41,6 +41,17 @@ 2008-09-24 Roland Levillain <roland@lrde.epita.fr> + Get back to the previous, simpler interface of mln::complex_image. + + * mln/core/image/complex_image.hh + (complex_image<D, P, V>::operator()(const faces_psite<N, D, P>) const) + (complex_image<D, P, V>::operator()(const faces_psite<N, D, P>)): + Remove operators. + * tests/core/image/complex_image.cc: Update, and make use of + p_complex_faces_iter's. + +2008-09-24 Roland Levillain <roland@lrde.epita.fr> + Have mln::p_complex known p_complex_faces_iter's. * mln/core/site_set/p_complex.hh: Add forward declarations for diff --git a/milena/mln/core/image/complex_image.hh b/milena/mln/core/image/complex_image.hh index 0512d0f..09d6e13 100644 --- a/milena/mln/core/image/complex_image.hh +++ b/milena/mln/core/image/complex_image.hh @@ -148,13 +148,6 @@ namespace mln /// Read-write access of face value at point site \p p. lvalue operator()(const complex_psite<D, P>& p); - /// Read-only access of face value at point site \p p. - template <unsigned N> - rvalue operator()(const faces_psite<N, D, P>& p) const; - /// Read-write access of face value at point site \p p. - template <unsigned N> - lvalue operator()(const faces_psite<N, D, P>& p); - /// Accessors. /// \{ /// Return the domain of psites od the image. @@ -277,28 +270,6 @@ namespace mln } template <unsigned D, typename P, typename V> - template <unsigned N> - inline - typename complex_image<D, P, V>::rvalue - complex_image<D, P, V>::operator()(const faces_psite<N, D, P>& p) const - { - /* FIXME: We should ensure data_->pc_ has P, but it is not - trivial: a daces_psite has no idea what a p_complex is. */ - return this->data_->values_[p.n()][p.face_id()]; - } - - template <unsigned D, typename P, typename V> - template <unsigned N> - inline - typename complex_image<D, P, V>::lvalue - complex_image<D, P, V>::operator()(const faces_psite<N, D, P>& p) - { - /* FIXME: We should ensure data_->pc_ has P, but it is not - trivial: a daces_psite has no idea what a p_complex is. */ - return this->data_->values_[p.n()][p.face_id()]; - } - - template <unsigned D, typename P, typename V> inline const metal::vec< D + 1, std::vector<V> >& complex_image<D, P, V>::face_values() const diff --git a/milena/tests/core/image/complex_image.cc b/milena/tests/core/image/complex_image.cc index 1b06036..24f0a2c 100644 --- a/milena/tests/core/image/complex_image.cc +++ b/milena/tests/core/image/complex_image.cc @@ -100,6 +100,10 @@ int main() | Faces-based psets. | `--------------------*/ + /* FIXME: Not that p_faces have become less interesting since the + introduction of p_complex_faces_{fwd,bkd}_piter_. Keep this part + of the test? */ + // Pset of 0-faces. p_faces<0, D, point2d> pf0(c); // Pset of 1-faces. @@ -164,14 +168,10 @@ int main() // that it can be referenced later by face_psites held by iterators // (as for windows and neighborhoods). - typedef p_faces<0, D, point2d> p0f_t; - p0f_t pf(ima.domain()); - mln_piter_(p0f_t) f0p(pf); + // FIXME: Sugar the name of the iterator. + p_complex_faces_fwd_piter_<0, D, point2d> f0p(ima.domain()); for_all(f0p) - /* FIXME: This explicit call to unproxy_() is not elegant... But - is required for ima() to work, since the target operator() is - templated. */ - std::cout << "ima(" << f0p << ") = " << ima(f0p.unproxy_()) << std::endl; + std::cout << "ima(" << f0p << ") = " << ima(f0p) << std::endl; /* FIXME: Implement other psite iterators, for instance: -- 1.6.0.1