26 #ifndef MLN_TOPO_DETACH_PAIR_HH
27 # define MLN_TOPO_DETACH_PAIR_HH
33 # include <mln/core/concept/function.hh>
34 # include <mln/core/concept/image.hh>
35 # include <mln/core/concept/neighborhood.hh>
37 # include <mln/topo/is_simple_pair.hh>
55 template <
typename I,
typename NL,
typename NH>
100 void operator()(
const mln_psite(I)& f,
const mln_psite(I)& g);
109 const NL& lower_adj_nbh_;
110 const NH& higher_adj_nbh_;
117 # ifndef MLN_INCLUDE_ONLY
119 template <
typename I,
typename NL,
typename NH>
124 lower_adj_nbh_(
exact(lower_adj_nbh)),
125 higher_adj_nbh_(
exact(higher_adj_nbh)),
126 is_simple_(lower_adj_nbh, higher_adj_nbh)
128 mlc_equal(mln_value(I),
bool)::check();
131 template <
typename I,
typename NL,
typename NH>
137 lower_adj_nbh_(
exact(lower_adj_nbh)),
138 higher_adj_nbh_(
exact(higher_adj_nbh)),
139 is_simple_(ima, lower_adj_nbh, higher_adj_nbh)
141 mlc_equal(mln_value(I),
bool)::check();
144 template <
typename I,
typename NL,
typename NH>
150 is_simple_.set_image(ima);
153 template <
typename I,
typename NL,
typename NH>
157 const mln_psite(I)& g)
159 mln_precondition(ima_);
160 mln_precondition(is_simple_(f, g));
171 template <
typename I,
typename NL,
typename NH>
176 mln_niter(NL) g(lower_adj_nbh_, f);
179 if (is_simple_(f, g))
181 return (*
this)(f, g);
185 # endif // MLN_INCLUDE_ONLY
191 #endif // ! MLN_TOPO_DETACH_PAIR_HH