26 #ifndef MLN_TOPO_IS_SIMPLE_PAIR_HH
27 # define MLN_TOPO_IS_SIMPLE_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_facet.hh>
59 template <
typename I,
typename NL,
typename NH>
108 bool operator()(
const mln_psite(I)& f,
const mln_psite(I)& g)
const;
117 const NL& lower_adj_nbh_;
118 const NH& higher_adj_nbh_;
123 # ifndef MLN_INCLUDE_ONLY
125 template <
typename I,
typename NL,
typename NH>
130 lower_adj_nbh_(
exact(lower_adj_nbh)),
131 higher_adj_nbh_(
exact(higher_adj_nbh))
133 mlc_equal(mln_value(I),
bool)::check();
136 template <
typename I,
typename NL,
typename NH>
142 lower_adj_nbh_(
exact(lower_adj_nbh)),
143 higher_adj_nbh_(
exact(higher_adj_nbh))
145 mlc_equal(mln_value(I),
bool)::check();
148 template <
typename I,
typename NL,
typename NH>
156 template <
typename I,
typename NL,
typename NH>
160 const mln_psite(I)& g)
const
162 mln_precondition(ima_);
165 const I& ima = *ima_;
169 if (!ima(f) || !ima(g))
173 if (!
is_facet(ima, f, higher_adj_nbh_))
181 bool f_g_adjacent =
false;
182 mln_niter(NH) h(higher_adj_nbh_, g);
194 mln_niter(NH) h(higher_adj_nbh_, g);
196 if (h != f && ima.has(h) && ima(h))
203 template <typename I, typename NL, typename NH>
206 is_simple_pair<I, NL, NH>::operator()(const mln_psite(I)& f)
const
208 mln_niter(NL) g(lower_adj_nbh_, f);
219 # endif // MLN_INCLUDE_ONLY
225 #endif // ! MLN_TOPO_IS_SIMPLE_PAIR_HH