26 #ifndef MLN_MAKE_W_WINDOW_HH
27 # define MLN_MAKE_W_WINDOW_HH
34 # include <mln/core/concept/window.hh>
35 # include <mln/core/concept/function.hh>
36 # include <mln/core/w_window.hh>
53 template <
typename W,
typename F>
55 w_window(
const Window<W>& win,
const Function_v2v<F>& wei);
58 # ifndef MLN_INCLUDE_ONLY
60 template <
typename W,
typename F>
63 w_window(
const Window<W>& win_,
const Function_v2v<F>& wei_)
65 mln_trace(
"make::w_window");
67 mln_is_simple_window(W)::check();
70 const F& wei =
exact(wei_);
71 mln_precondition(! win.is_empty());
73 typedef mln_dpsite(W) D;
74 mln::
w_window<D, mln_result(F)> w_win;
76 typedef mln_psite(D) P;
77 P O = literal::origin;
78 mln_qiter(W) q(win, O);
80 w_win.insert(wei(q), q - O);
85 # endif // ! MLN_INCLUDE_ONLY
92 #endif // ! MLN_MAKE_W_WINDOW_HH