27 #ifndef MLN_CORE_BOX_RUNSTART_PITER_HH
28 # define MLN_CORE_BOX_RUNSTART_PITER_HH
34 # include <mln/core/internal/site_iterator_base.hh>
35 # include <mln/core/site_set/box.hh>
38 #define mln_box_runstart_piter(I) typename mln::box_runstart_piter<mln_psite(I)>
39 #define mln_box_runstart_piter_(I) mln::box_runstart_piter<mln_psite_(I)>
54 box_runstart_piter<P> >
61 enum {
dim = super_::dim };
80 bool is_valid_()
const;
103 # ifndef MLN_INCLUDE_ONLY
108 template <
typename P>
114 template <
typename P>
121 template <
typename P>
130 template <
typename P>
133 box_runstart_piter<P>::is_valid_()
const
135 return p_[0] !=
static_cast<mln_coord(P)
>(s_->pmax()[0] + 1);
138 template <
typename P>
141 box_runstart_piter<P>::invalidate_()
143 p_[0] =
static_cast<mln_coord(P)
>(s_->pmax()[0] + 1);
146 template <
typename P>
149 box_runstart_piter<P>::start_()
154 template <
typename P>
157 box_runstart_piter<P>::next_()
162 for (
int c = dim - 2; c >= 0; --c)
164 if (p_[c] != s_->pmax()[c])
170 p_[c] = s_->pmin()[c];
173 if (p_ == s_->pmin())
177 template <
typename P>
182 return s_->len(dim - 1);
186 # endif // ! MLN_INCLUDE_ONLY
191 #endif // ! MLN_CORE_BOX_RUNSTART_PITER_HH