26 #ifndef MLN_MAKE_DOUBLE_NEIGHB2D_HH
27 # define MLN_MAKE_DOUBLE_NEIGHB2D_HH
35 # include <mln/convert/to.hh>
36 # include <mln/core/alias/window2d.hh>
37 # include <mln/win/multiple.hh>
38 # include <mln/core/neighb.hh>
47 template <
typename A,
unsigned St,
unsigned Sf>
48 neighb< win::multiple<window2d, bool(*)(A)> >
49 double_neighb2d(
bool (*test)(A),
50 bool const (&when_true) [St],
51 bool const (&when_false)[Sf]);
53 template <
typename F,
unsigned St,
unsigned Sf>
54 neighb< win::multiple<window2d, F> >
55 double_neighb2d(
const F& test,
56 bool const (&when_true) [St],
57 bool const (&when_false)[Sf]);
60 # ifndef MLN_INCLUDE_ONLY
62 template <
typename A,
unsigned St,
unsigned Sf>
64 neighb< win::multiple<window2d, bool(*)(A)> >
65 double_neighb2d(
bool (*test)(A),
66 bool const (&when_true) [St],
67 bool const (&when_false)[Sf])
69 typedef win::multiple<window2d, bool(*)(A)> W;
71 wm.set_window(
false, convert::to<window2d>(when_false));
72 wm.set_window(
true, convert::to<window2d>(when_true) );
77 template <
typename F,
unsigned St,
unsigned Sf>
79 neighb< win::multiple<window2d, F> >
80 double_neighb2d(
const F& test,
81 bool const (&when_true) [St],
82 bool const (&when_false)[Sf])
84 typedef win::multiple<window2d, F> W;
86 wm.set_window(
false, convert::to<window2d>(when_false));
87 wm.set_window(
true, convert::to<window2d>(when_true) );
92 # endif // ! MLN_INCLUDE_ONLY
99 #endif // ! MLN_MAKE_DOUBLE_NEIGHB2D_HH