26 #ifndef MLN_TRANSFORM_INTERNAL_DISTANCE_FUNCTOR_HH
27 # define MLN_TRANSFORM_INTERNAL_DISTANCE_FUNCTOR_HH
35 # include <mln/core/macros.hh>
49 struct distance_functor
51 typedef mln_value(I) V;
52 typedef mln_site(I) P;
55 bool inqueue_p_wrt_input_p(const V& input_p);
56 void init_p(const P&);
57 bool inqueue_p_wrt_input_n(const V& input_n);
58 void process(const P&, const P&);
62 bool inqueue_p_wrt_input_p_(const V& input_p);
63 void init_p_(
unsigned);
64 bool inqueue_p_wrt_input_n_(const V& input_n);
65 void process_(
unsigned,
unsigned);
69 # ifndef MLN_INCLUDE_ONLY
77 distance_functor<I>::init(
const I&)
84 distance_functor<I>::inqueue_p_wrt_input_p(
const V& input_p)
86 return input_p ==
true;
92 distance_functor<I>::init_p(
const mln_site(I)&)
99 distance_functor<I>::inqueue_p_wrt_input_n(
const V& input_n)
101 return input_n ==
false;
104 template <
typename I>
106 void distance_functor<I>::process(
const P&,
const P&)
114 template <
typename I>
117 distance_functor<I>::init_(
const I&)
121 template <
typename I>
124 distance_functor<I>::inqueue_p_wrt_input_p_(
const V& input_p)
126 return input_p ==
true;
129 template <
typename I>
132 distance_functor<I>::init_p_(
unsigned)
136 template <
typename I>
139 distance_functor<I>::inqueue_p_wrt_input_n_(
const V& input_n)
141 return input_n ==
false;
144 template <
typename I>
146 void distance_functor<I>::process_(
unsigned,
unsigned)
150 # endif // ! MLN_INCLUDE_ONLY
159 #endif // ! MLN_TRANSFORM_INTERNAL_DISTANCE_FUNCTOR_HH