27 #ifndef MLN_VALUE_INT_U_HH
28 # define MLN_VALUE_INT_U_HH
35 # include <mln/value/ops.hh>
37 # include <mln/metal/math/pow.hh>
38 # include <mln/value/internal/value_like.hh>
39 # include <mln/value/internal/encoding.hh>
40 # include <mln/value/concept/integer.hh>
41 # include <mln/trait/value_.hh>
43 # include <mln/value/internal/make_generic_name.hh>
53 template <
unsigned n>
struct int_u;
54 template <
unsigned n>
struct rgb;
81 struct value_< mln::value::int_u<n> >
91 card = mln_value_card_from_(n)
94 typedef trait::value::nature::integer
nature;
95 typedef trait::value::kind::data
kind;
96 typedef mln_value_quant_from_(card) quant;
98 static const self_
min() {
return 0; }
99 static const self_
max() {
return mlc_pow_int(2, n) - 1; }
100 static const self_ epsilon() {
return 0; }
102 typedef unsigned comp;
106 static const char* name()
128 template <
unsigned n>
134 typename internal::encoding_unsigned_<n>::ret,
172 template <>
struct int_u<0>;
173 template <>
struct int_u<1>;
183 template <
unsigned n>
184 std::ostream& operator<<(std::ostream& ostr, const int_u<n>& i);
193 template <
unsigned n>
201 template <
unsigned n>
205 template <
unsigned n>
209 template <
unsigned n>
213 template <
unsigned n>
217 template <
unsigned m>
221 template <
unsigned m>
230 # include <mln/value/rgb.hh>
231 # include <mln/value/qt/rgb32.hh>
234 # ifndef MLN_INCLUDE_ONLY
235 # include <mln/value/int_u.hxx>
236 # endif // ! MLN_INCLUDE_ONLY
239 #endif // ! MLN_VALUE_INT_U_HH