26 #ifndef MLN_SET_DIFF_HH
27 # define MLN_SET_DIFF_HH
39 # include <mln/core/site_set/p_set.hh>
40 # include <mln/convert/from_to.hh>
41 # include <mln/util/ord.hh>
55 template <
typename Sl,
typename Sr>
57 diff(
const Site_Set<Sl>& lhs,
const Site_Set<Sr>&
rhs);
61 # ifndef MLN_INCLUDE_ONLY
63 template <
typename Sl,
typename Sr>
66 diff(
const Site_Set<Sl>& lhs,
const Site_Set<Sr>&
rhs)
68 mln_trace(
"set::diff");
70 typedef mln_site(Sl) P;
71 mlc_converts_to(mln_psite(Sr), P)::check();
72 std::set< P, util::ord<P> > sl, sr, sd;
75 std::set_difference(sl.begin(), sl.end(),
77 std::inserter(sd, sd.begin()),
85 # endif // ! MLN_INCLUDE_ONLY
92 #endif // ! MLN_SET_DIFF_HH