27 #ifndef MLN_CORE_SITE_SET_P_DOUBLE_HH
28 # define MLN_CORE_SITE_SET_P_DOUBLE_HH
39 # include <mln/core/internal/pseudo_site_base.hh>
40 # include <mln/core/internal/site_set_iterator_base.hh>
48 template <
typename S,
typename Sp>
50 p_double_psite<S,Sp> >
60 const S* target_()
const;
67 unsigned index()
const;
68 const mln_psite(Sp)&
p()
const;
76 const mln_psite(Sp)& subj_();
83 mutable mln_psite(Sp) p_;
90 template <typename S, typename I1, typename I2>
93 public internal::site_set_iterator_base< S,
110 bool is_valid_()
const;
136 # ifndef MLN_INCLUDE_ONLY
141 template <
typename S,
typename Sp>
147 template <
typename S,
typename Sp>
150 p_double_psite<S,Sp>::subj_()
155 template <
typename S,
typename Sp>
158 p_double_psite<S,Sp>::target_()
const
163 template <
typename S,
typename Sp>
171 template <
typename S,
typename Sp>
176 return s_ != 0 && p_.is_valid();
179 template <
typename S,
typename Sp>
187 template <
typename S,
typename Sp>
195 template <
typename S,
typename Sp>
203 template <
typename S,
typename Sp>
214 template <
typename S,
typename I1,
typename I2>
216 p_double_piter<S,I1,I2>::p_double_piter()
220 template <
typename S,
typename I1,
typename I2>
222 p_double_piter<S,I1,I2>::p_double_piter(
const S& s)
227 template <
typename S,
typename I1,
typename I2>
233 i1_.change_target(newtarget.set_1_());
237 template <
typename S,
typename I1,
typename I2>
240 p_double_piter<S,I1,I2>::is_valid_()
const
242 return i2_.is_valid();
245 template <
typename S,
typename I1,
typename I2>
248 p_double_piter<S,I1,I2>::invalidate_()
253 template <
typename S,
typename I1,
typename I2>
256 p_double_piter<S,I1,I2>::start_()
261 i2_.change_target(s_->set_2_(i1_));
263 if (! i2_.is_valid())
267 p_.change_i(i1_.index_());
273 mln_postcondition(
implies(i2_.is_valid(), i1_.is_valid()));
276 template <
typename S,
typename I1,
typename I2>
279 p_double_piter<S,I1,I2>::next_()
282 if (! i2_.is_valid())
286 mln_postcondition(
implies(i2_.is_valid(), i1_.is_valid()));
289 template <
typename S,
typename I1,
typename I2>
292 p_double_piter<S,I1,I2>::progress_()
296 while (! i2_.is_valid() && i1_.is_valid())
299 if (! i1_.is_valid())
305 i2_.change_target(s_->set_2_(i1_));
310 p_.change_i(i1_.index_());
315 # endif // ! MLN_INCLUDE_ONLY
320 #endif // ! MLN_CORE_SITE_SET_P_DOUBLE_HH