26 #ifndef MLN_FUN_P2B_BIG_CHESS_HH
27 # define MLN_FUN_P2B_BIG_CHESS_HH
34 # include <mln/core/concept/function.hh>
35 # include <mln/core/alias/point2d.hh>
49 struct big_chess :
public Function_v2b< big_chess<B> >
52 typedef mln_psite(B) P;
54 big_chess(const B& box, const
unsigned div);
56 bool operator()(const P& p) const;
63 # ifndef MLN_INCLUDE_ONLY
65 template <
typename B>
66 big_chess<B>::big_chess(
const B& box,
const unsigned div)
71 template <
typename B>
74 big_chess<B>::operator()(
const P& p)
const
78 for (
short i = 0; i < P::dim; i++)
79 ret += p[i] / ((box.pmax()[i] - 1) / div);
84 # endif // ! MLN_INCLUDE_ONLY
93 #endif // ! MLN_FUN_P2B_BIG_CHESS_HH