27 #ifndef MLN_CONVERT_IMPL_FROM_IMAGE_TO_SITE_SET_HH
28 # define MLN_CONVERT_IMPL_FROM_IMAGE_TO_SITE_SET_HH
39 # include <mln/core/site_set/p_run.hh>
40 # include <mln/core/site_set/p_array.hh>
41 # include <mln/metal/converts_to.hh>
49 template <
typename E>
struct Site_Set;
50 template <
typename E>
struct Image;
51 template <
typename E>
struct Gpoint;
60 template <
typename I,
typename S>
66 # ifndef MLN_INCLUDE_ONLY
73 template <
typename I,
typename P,
typename S>
79 mln_fwd_piter(I)
p(input.domain());
84 while (
p.is_valid() && input(
p) ==
false)
88 mln_invariant(input(
p) ==
true);
96 while (
p.is_valid() && input(
p) ==
true &&
98 cut_(
p.to_site()) ==
cut_(q) &&
p.last_coord() == q.last_coord() + 1);
104 template <
typename I,
typename P,
typename S>
108 const std::pair< mln_value(I),
p_run<P> >&)
111 mln_fwd_piter(I)
p(input.domain());
117 mln_value(I) v = input(
p);
125 while (
p.is_valid() && input(
p) == v &&
126 cut_(
p.to_site()) ==
cut_(q) &&
p.last_coord() == q.last_coord() + 1);
132 template <
typename I,
typename P,
typename S>
136 const std::pair< mln_value(I), P >&)
139 mln_fwd_piter(I)
p(input.domain());
141 s.insert(input(
p),
p);
145 template <
typename I,
typename S>
151 exact(to), mln_i_element(S)());
154 template <
typename I>
159 const I& from =
exact(from_);
161 mln_piter(I)
p(from.domain());
173 template <
typename I,
typename S>
181 # endif // ! MLN_INCLUDE_ONLY
190 #endif // ! MLN_CONVERT_IMPL_FROM_IMAGE_TO_SITE_SET_HH