27 #ifndef MLN_CORE_BOX_RUNEND_PITER_HH
28 # define MLN_CORE_BOX_RUNEND_PITER_HH
34 # include <mln/core/internal/site_iterator_base.hh>
35 # include <mln/core/site_set/box.hh>
38 #define mln_box_runend_piter(I) typename mln::box_runend_piter<mln_psite(I)>
39 #define mln_box_runend_piter_(I) mln::box_runend_piter<mln_psite_(I)>
61 enum {
dim = super_::dim };
79 bool is_valid_()
const;
102 # ifndef MLN_INCLUDE_ONLY
107 template <
typename P>
113 template <
typename P>
120 template <
typename P>
129 template <
typename P>
132 box_runend_piter<P>::is_valid_()
const
134 return p_[0] !=
static_cast<mln_coord(P)
>(s_->pmin()[0] - 1);
137 template <
typename P>
140 box_runend_piter<P>::invalidate_()
142 p_[0] =
static_cast<mln_coord(P)
>(s_->pmin()[0] - 1);
145 template <
typename P>
148 box_runend_piter<P>::start_()
153 template <
typename P>
156 box_runend_piter<P>::next_()
159 for (
int c = dim - 2; c >= 0; --c)
161 if (p_[c] != s_->pmin()[c])
167 p_[c] = s_->pmax()[c];
170 if (p_ == s_->pmax())
174 template <
typename P>
179 return s_->len(dim - 1);
183 # endif // ! MLN_INCLUDE_ONLY
188 #endif // ! MLN_CORE_BOX_RUNEND_PITER_HH