26 #ifndef MLN_FUN_X2V_NNEIGHBOR_HH
27 # define MLN_FUN_X2V_NNEIGHBOR_HH
29 # include <mln/core/concept/function.hh>
30 # include <mln/fun/internal/selector.hh>
31 # include <mln/algebra/vec.hh>
32 # include <mln/convert/to.hh>
48 template <
typename I >
50 :
public fun::internal::selector_<const algebra::vec<3,float>,
52 mln_value(I), nneighbor<I> >::ret
54 typedef mln_value(I) result;
56 nneighbor(const I& ima);
58 template <
unsigned n, typename T >
60 operator()(const algebra::vec<n,T>& x) const;
66 # ifndef MLN_INCLUDE_ONLY
68 template <
typename I >
69 nneighbor<I>::nneighbor(
const I& ima) : ima(ima)
73 template <
typename I >
74 template <
unsigned n,
typename T >
76 nneighbor<I>::operator()(const algebra::vec<n,T>& x)
const
78 mln_psite(I) p = convert::to<mln_psite(I)>(x);
83 # endif // ! MLN_INCLUDE_ONLY
92 #endif // ! MLN_FUN_X2V_NNEIGHBOR_HH