27 #ifndef MLN_CORE_INTERNAL_IS_MASKED_IMPL_SELECTOR_HH
28 # define MLN_CORE_INTERNAL_IS_MASKED_IMPL_SELECTOR_HH
34 # include <mln/util/edge.hh>
41 template <
typename G,
typename F>
class p_edges;
42 template <
typename G,
typename F>
class p_vertices;
54 template <
typename S,
typename D,
typename E>
58 bool is_masked(
const mln_graph_element(S)& center,
59 const mln_graph_element(S)& element)
const;
66 template <
typename G1,
typename F1,
typename G2,
typename F2,
typename E>
72 bool is_masked(
const mln_graph_element(
S)& center,
73 const mln_graph_element(
S)& element)
const;
80 template <
typename G1,
typename F1,
typename G2,
typename F2,
typename E>
86 bool is_masked(
const mln_graph_element(
S)& center,
87 const mln_graph_element(
S)& element)
const;
91 # ifndef MLN_INCLUDE_ONLY
94 template <
typename S,
typename I,
typename E>
98 const mln_graph_element(S)& element)
const
101 E& iter = internal::force_exact<E>(*this);
102 return ! iter.target_()->mask()(element.id());
106 template <
typename G1,
typename F1,
typename G2,
typename F2,
typename E>
110 ::is_masked(
const mln_graph_element(S)& center,
111 const mln_graph_element(S)& element)
const
113 E& iter = internal::force_exact<E>(*this);
118 return ! iter.target_()->mask()(e.
id());
128 template <
typename G1,
typename F1,
typename G2,
typename F2,
typename E>
131 is_masked_impl_selector< p_edges<G1,F1>, p_vertices<G2,F2>, E >
132 ::is_masked(
const mln_graph_element(S)& center,
133 const mln_graph_element(S)& element)
const
135 E& iter = internal::force_exact<E>(*this);
137 if (center.v1() == element.v2() || center.v2() == element.v2())
138 return ! iter.target_()->mask()(element.v1());
141 return ! iter.target_()->mask()(element.v2());
144 # endif // ! MLN_INCLUDE_ONLY
151 #endif // ! MLN_CORE_INTERNAL_IS_MASKED_IMPL_SELECTOR_HH