27 #ifndef MLN_CORE_SITE_SET_P_EDGES_HH
28 # define MLN_CORE_SITE_SET_P_EDGES_HH
34 # include <mln/core/concept/function.hh>
35 # include <mln/core/concept/graph.hh>
36 # include <mln/core/internal/site_set_base.hh>
37 # include <mln/core/site_set/p_graph_piter.hh>
38 # include <mln/core/site_set/p_edges_psite.hh>
39 # include <mln/util/graph.hh>
40 # include <mln/util/internal/id2element.hh>
42 # include <mln/metal/equal.hh>
49 template <
typename G,
typename F>
class p_edges;
54 template <
typename G,
typename F>
55 struct site_set_< p_edges<G, F> >
58 typedef trait::site_set::nsites::known
nsites;
59 typedef trait::site_set::bbox::unknown bbox;
60 typedef trait::site_set::contents::fixed contents;
61 typedef trait::site_set::arity::unique arity;
70 template <
typename G,
typename F = util::
internal::
id2element<G,util::edge<G> > >
72 :
public internal::site_set_base_< mln_result(F), p_edges<G, F> >
76 typedef internal::site_set_base_< mln_result(F), self_ > super_;
113 template <
typename F2>
148 bool has(const psite& p) const;
151 template <typename G2>
152 bool has(const util::
edge<G2>& e) const;
164 const G&
graph() const;
180 template <typename G, typename F>
189 template <typename G, typename F>
196 # ifndef MLN_INCLUDE_ONLY
202 template <
typename G,
typename F>
208 template <
typename G,
typename F>
212 typedef util::internal::id2element<G,util::edge<G> > F_REF;
213 mlc_equal(F, F_REF)::check();
215 mln_precondition(exact(g).
is_valid());
217 f_ = util::internal::id2element< G, util::edge<G> >(g);
220 template <
typename G,
typename F>
224 mln_precondition(exact(g).
is_valid());
229 template <
typename G,
typename F>
230 template <
typename F2>
234 mln_precondition(exact(g).
is_valid());
235 mlc_converts_to(F2,F)::check();
238 convert::from_to(f, f_);
242 template <
typename G,
typename F>
250 template <
typename G,
typename F>
255 return this->g_.e_nmax();
258 template <
typename G,
typename F>
263 return g_.is_valid();
266 template <
typename G,
typename F>
274 template <
typename G,
typename F>
283 template <
typename G,
typename F>
284 template <
typename G2>
290 return e.
graph().is_subgraph_of(g_) && g_.has(e) && e.
is_valid();
303 template <
typename G,
typename F>
313 template <
typename G,
typename F>
322 template <
typename G,
typename F>
330 template <
typename G,
typename F>
337 template <
typename G,
typename F>
346 # endif // ! MLN_INCLUDE_ONLY
348 #endif // ! MLN_CORE_SITE_SET_P_EDGES_HH