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>
62 mln_meta_accu_result(A, mln_site(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 mln_trace(
"set::impl::generic::compute");
86 mlc_converts_to(mln_site(S), mln_argument(A))::check();
89 const S& s =
exact(s_);
108 template <typename A, typename S>
111 compute(const Accumulator<A>& a, const Site_Set<S>& s)
113 mln_trace(
"set::compute");
115 mlc_converts_to(mln_site(S), mln_argument(A))::check();
117 mln_result(A) r = impl::generic::
compute(a, s);
123 template <typename A, typename S>
124 mln_meta_accu_result(A, mln_site(S))
125 compute(const Meta_Accumulator<A>& a, const Site_Set<S>& s)
127 mln_trace(
"set::compute");
129 typedef mln_accu_with(A, mln_site(S)) A_;
130 A_ a_ = accu::unmeta(
exact(a), mln_site(S)());
132 mln_result(A_) r = impl::generic::
compute(a_, s);
137 # endif // ! MLN_INCLUDE_ONLY
144 #endif // ! MLN_SET_COMPUTE_HH