26 #ifndef MLN_FUN_COMPONENT_COMP_HH
27 # define MLN_FUN_COMPONENT_COMP_HH
33 # include <mln/fun/unary_param.hh>
34 # include <mln/value/rgb.hh>
35 # include <mln/value/int_u.hh>
36 # include <mln/algebra/vec.hh>
44 struct comp : unary_param<comp,unsigned>
46 comp() : unary_param<comp,unsigned>(0) {};
47 comp(
unsigned i) : unary_param<comp,unsigned>(i) {};
52 # ifndef MLN_INCLUDE_ONLY
63 typedef set_precise_unary_ ret;
67 typedef argument& lvalue;
69 static result read(
unsigned p_i,
const argument& v)
74 static void write(
unsigned p_i, lvalue l,
const result& x)
80 template <
unsigned n,
typename T>
81 struct set_precise_unary_<mln::fun::comp, mln::algebra::vec<n,T> >
83 typedef set_precise_unary_ ret;
85 typedef mln::algebra::vec<n,T> argument;
87 typedef argument& lvalue;
89 static result read(
unsigned p_i,
const argument& v)
94 static void write(
unsigned p_i, lvalue l,
const result& x)
104 # endif // ! MLN_INCLUDE_ONLY
108 #endif // ! MLN_FUN_COMPONENT_COMP_HH