26 #ifndef MLN_SET_COMPUTE_HH
27 # define MLN_SET_COMPUTE_HH
33 # include <mln/core/concept/meta_accumulator.hh>
34 # include <mln/core/concept/image.hh>
35 # include <mln/core/concept/site_set.hh>
50 template <
typename A,
typename S>
52 compute(const Accumulator<A>& a, const Site_Set<S>& s);
61 template <typename A, typename S>
63 compute(const Meta_Accumulator<A>& a, const Site_Set<S>& s);
67 # ifndef MLN_INCLUDE_ONLY
79 template <
typename A,
typename S>
82 compute(const Accumulator<A>& a_, const Site_Set<S>& s_)
84 trace::entering(
"set::impl::generic::compute");
86 mlc_converts_to(mln_site(S), mln_argument(A))::check();
89 const S& s = exact(s_);
96 trace::exiting("set::impl::generic::
compute");
109 template <typename A, typename S>
114 trace::entering(
"set::compute");
116 mlc_converts_to(mln_site(S), mln_argument(A))::check();
118 mln_result(A) r = impl::generic::compute(a, s);
120 trace::exiting(
"set::compute");
125 template <
typename A,
typename S>
129 trace::entering(
"set::compute");
131 typedef mln_accu_with(A, mln_site(S)) A_;
132 A_ a_ = accu::unmeta(exact(a), mln_site(S)());
134 mln_result(A_) r = impl::generic::
compute(a_, s);
140 # endif // ! MLN_INCLUDE_ONLY
147 #endif // ! MLN_SET_COMPUTE_HH