27 #ifndef MLN_CORE_DPSITES_PITER_HH
28 # define MLN_CORE_DPSITES_PITER_HH
36 # include <mln/core/internal/site_relative_iterator_base.hh>
49 :
public internal::site_relative_iterator_base< V, dpsites_fwd_piter<V> >
62 void init_(
const V& v,
const P& c);
68 bool is_valid_()
const;
80 mln_psite(V) compute_p_()
const;
95 public internal::site_relative_iterator_base< V, dpsites_bkd_piter<V> >
103 template <
typename P>
110 template <
typename P>
111 void init_(
const V& v,
const P& c);
114 bool is_valid_()
const;
126 mln_psite(V) compute_p_()
const;
135 # ifndef MLN_INCLUDE_ONLY
140 template <
typename V>
146 template <
typename V>
147 template <
typename P>
154 template <
typename V>
155 template <
typename P>
160 this->change_target(v);
165 template <
typename V>
168 dpsites_fwd_piter<V>::is_valid_()
const
170 return i_ != this->s_->std_vector().size();
173 template <
typename V>
176 dpsites_fwd_piter<V>::invalidate_()
178 i_ = this->s_->std_vector().size();
181 template <
typename V>
184 dpsites_fwd_piter<V>::do_start_()
189 template <
typename V>
192 dpsites_fwd_piter<V>::do_next_()
197 template <
typename V>
200 dpsites_fwd_piter<V>::compute_p_()
const
202 return *this->c_ + this->s_->std_vector()[i_];
208 template <
typename V>
214 template <
typename V>
215 template <
typename P>
222 template <
typename V>
223 template <
typename P>
228 this->change_target(v);
233 template <
typename V>
236 dpsites_bkd_piter<V>::is_valid_()
const
241 template <
typename V>
244 dpsites_bkd_piter<V>::invalidate_()
249 template <
typename V>
252 dpsites_bkd_piter<V>::do_start_()
254 i_ = this->s_->std_vector().size() - 1;
257 template <
typename V>
260 dpsites_bkd_piter<V>::do_next_()
265 template <
typename V>
268 dpsites_bkd_piter<V>::compute_p_()
const
270 return *this->c_ + this->s_->std_vector()[i_];
273 # endif // ! MLN_INCLUDE_ONLY
278 #endif // ! MLN_CORE_DPSITES_PITER_HH