26 #ifndef MLN_CANVAS_BROWSING_INTERNAL_GRAPH_FIRST_SEARCH_HH
27 # define MLN_CANVAS_BROWSING_INTERNAL_GRAPH_FIRST_SEARCH_HH
72 # include <mln/core/concept/iterator.hh>
73 # include <mln/core/concept/browsing.hh>
74 # include <mln/core/concept/graph.hh>
75 # include <mln/util/vertex.hh>
92 template <
typename E,
93 template <
typename T,
typename Seq>
class C >
97 typedef C< T_, std::deque<T_> > container_t;
99 template <
typename G,
typename F>
105 # ifndef MLN_INCLUDE_ONLY
110 template <
typename T>
113 next(
const std::queue<T>& queue)
115 return queue.front();
118 template <
typename T>
121 next(
const std::stack<T>& stack)
126 template <
typename S>
141 template <
typename E,
142 template <
typename T,
typename Seq>
class C>
143 template <
typename G,
typename F>
148 mln_trace(
"canvas::browsing::internal::graph_first_search");
150 const G& g =
exact(g_);
151 mln_precondition(g.is_valid());
155 mln_vertex_iter(G) v(g);
157 if (f.to_be_treated(v.
id()))
161 f.new_component_from_vertex(v.id());
165 f.process_vertex(current_v.
id());
180 # endif // ! MLN_INCLUDE_ONLY
191 #endif // ! MLN_CANVAS_BROWSING_INTERNAL_GRAPH_FIRST_SEARCH_HH