27 #ifndef MLN_LINEAR_CONVOLVE_DIRECTIONAL_HH
28 # define MLN_LINEAR_CONVOLVE_DIRECTIONAL_HH
34 # include <mln/linear/convolve.hh>
35 # include <mln/make/w_window_directional.hh>
36 # include <mln/literal/zero.hh>
60 template <
typename I,
typename W,
unsigned S>
65 # ifndef MLN_INCLUDE_ONLY
67 template <
typename I,
typename W,
unsigned S>
72 mln_trace(
"linear::convolve_directional");
74 mlc_bool(S % 2 == 1)::check();
76 mln_precondition(
exact(input).is_valid());
77 typedef mln_site(I) P;
78 mln_precondition(dir < P::dim);
80 typedef mln_delta(P) D;
83 w_window<D,W> w_win = make::w_window_directional(dp, weights);
84 mln_ch_convolve(I, W) output =
convolve(input, w_win);
89 # endif // ! MLN_INCLUDE_ONLY
96 #endif // ! MLN_LINEAR_CONVOLVE_DIRECTIONAL_HH