26 #ifndef MLN_FUN_V2V_PROJECTION_HH
27 # define MLN_FUN_V2V_PROJECTION_HH
33 # include <mln/core/concept/function.hh>
34 # include <mln/core/point.hh>
35 # include <mln/core/grids.hh>
47 template <
typename P,
unsigned dir>
48 struct projection :
public Function_v2v< projection<P,dir> >
51 typedef mln_grid(P) G_;
52 typedef mln_coord(P) C_;
53 enum { n_ = G_::dim };
57 typedef point<mln_regular_grid_from_dim(n_ - 1), C_> result;
60 result operator()(
const P& p)
const;
64 # ifndef MLN_INCLUDE_ONLY
66 template <
typename P,
unsigned dir>
68 typename projection<P, dir>::result
69 projection<P, dir>::operator()(
const P& p)
const
72 for (
unsigned i = 0, j = 0; i < n_; ++i)
80 # endif // ! MLN_INCLUDE_ONLY
89 #endif // ! MLN_FUN_V2V_PROJECTION_HH