26 #ifndef MLN_SET_INTER_HH
27 # define MLN_SET_INTER_HH
36 # include <mln/core/site_set/p_set.hh>
37 # include <mln/convert/from_to.hh>
38 # include <mln/util/ord.hh>
52 template <
typename Sl,
typename Sr>
54 inter(
const Site_Set<Sl>& lhs,
const Site_Set<Sr>&
rhs);
57 # ifndef MLN_INCLUDE_ONLY
59 template <
typename Sl,
typename Sr>
62 inter(
const Site_Set<Sl>& lhs,
const Site_Set<Sr>&
rhs)
64 mln_trace(
"set::inter");
66 typedef mln_site(Sl) P;
67 mlc_converts_to(mln_psite(Sr), P)::check();
68 std::set< P, util::ord<P> > sl, sr, si;
71 std::set_intersection(sl.begin(), sl.end(),
73 std::inserter(si, si.begin()),
81 # endif // ! MLN_INCLUDE_ONLY
88 #endif // ! MLN_SET_INTER_HH