27 #ifndef MLN_MORPHO_ATTRIBUTE_HEIGHT_HH
28 # define MLN_MORPHO_ATTRIBUTE_HEIGHT_HH
34 # include <mln/accu/internal/base.hh>
36 # include <mln/util/pix.hh>
37 # include <mln/math/diff_abs.hh>
38 # include <mln/math/min.hh>
39 # include <mln/math/max.hh>
48 template <
typename I>
struct height;
61 typedef accumulator::has_untake::no
has_untake;
63 typedef accumulator::has_stop::no
has_stop;
64 typedef accumulator::when_pix::use_v
when_pix;
91 void take(const mln_value(I)& v);
92 void take(const util::pix<I>& v);
120 # ifndef MLN_INCLUDE_ONLY
122 template <
typename I>
125 : initialized_ (false)
129 template <
typename I>
137 template <
typename I>
149 template <
typename I>
157 template <
typename I>
162 mln_invariant(((ref_ <= cur_) && (other.ref_ <= other.cur_))
163 || ((ref_ >= cur_) && (other.ref_ >= other.cur_)));
170 else if (ref_ < cur_)
184 template <
typename I>
193 template <
typename I>
198 take_as_init_(px.v());
202 template <
typename I>
207 mln_invariant(is_valid());
212 template <
typename I>
220 template <
typename I>
229 template <
typename I>
237 # endif // ! MLN_INCLUDE_ONLY
246 #endif // ! MLN_MORPHO_ATTRIBUTE_HEIGHT_HH