26 #ifndef MLN_ACCU_MATH_COUNT_HH
27 # define MLN_ACCU_MATH_COUNT_HH
35 # include <mln/accu/internal/base.hh>
36 # include <mln/core/concept/meta_accumulator.hh>
45 template <
typename T>
struct count;
56 struct accumulator_< accu::math::count<T> >
58 typedef accumulator::has_untake::yes
has_untake;
60 typedef accumulator::has_stop::no
has_stop;
61 typedef accumulator::when_pix::use_none
when_pix;
133 # ifndef MLN_INCLUDE_ONLY
135 template <
typename T>
142 template <
typename T>
150 template <
typename T>
158 template <
typename T>
163 mln_precondition(count_ > 0);
167 template <
typename T>
172 count_ += other.count_;
175 template <
typename T>
180 mln_precondition(other.count_ <= count_);
181 count_ -= other.count_;
184 template <
typename T>
192 template <
typename T>
200 template <
typename T>
208 # endif // ! MLN_INCLUDE_ONLY
217 #endif // ! MLN_ACCU_MATH_COUNT_HH