26 #ifndef MLN_ACCU_MAX_SITE_HH
27 # define MLN_ACCU_MAX_SITE_HH
36 # include <mln/core/concept/meta_accumulator.hh>
37 # include <mln/accu/internal/base.hh>
38 # include <mln/util/pix.hh>
53 struct max_site :
public mln::accu::internal::base< mln_psite(I), max_site<I> >
56 typedef mln_psite(I) result;
69 operator mln_psite(I) ()
const;
72 mln_value(I) value_()
const;
102 # ifndef MLN_INCLUDE_ONLY
104 template <
typename I>
111 template <
typename I>
117 max_v_ = mln_min(mln_value(I));
120 template <
typename I>
132 template <
typename I>
135 max_site<I>::take(
const max_site<I>& other)
137 mln_precondition(other.is_valid());
139 if (other.value_() > max_v_)
141 max_v_ = other.value_();
142 max_p_ = other.to_result();
147 template <
typename I>
152 mln_precondition(is_valid());
156 template <
typename I>
163 template <
typename I>
166 max_site<I>::value_()
const
171 template <
typename I>
179 # endif // ! MLN_INCLUDE_ONLY
186 #endif // ! MLN_ACCU_MAX_SITE_HH