42 search::search_visitor_ref<G> V,
45 store::storage_provider_ref<ST, vertex_of<G>> PP
46 = store::default_provided_t<ST, vertex_of<G>>,
47 store::storage_provider_ref<store::storage_type::UNORDERED_SET, vertex_of<G>, vertex_hash_of<G>, vertex_compare_of<G>> PS
48 = store::default_provided_t<store::storage_type::UNORDERED_SET, vertex_of<G>, vertex_hash_of<G>, vertex_compare_of<G>>
52 (non_directed_graph<G> && in_edges_graph<G>)
66 if (
auto result = visitor.begin_search_base(
graph); result == NVR::STOP_SEARCH)
return false;
69 decltype(
auto) pending = pending_provider();
70 emplace(pending, root);
72 decltype(
auto) seen = set_provider();
76 while (!rng::empty(pending)) {
80 switch (visitor.discover_vertex_base(next,
graph)) {
81 case VR::STOP_SEARCH:
return false;
82 case VR::STOP_TREE:
continue;
83 case VR::CONTINUE:
break;
87 if constexpr (graph_is_directed<G>) {
89 switch (visitor.discover_branch_base(next,
graph)) {
90 case VR::STOP_SEARCH:
return false;
91 case VR::STOP_TREE:
continue;
92 case VR::CONTINUE:
break;
97 switch (visitor.discover_leaf_base(next,
graph)) {
98 case VR::STOP_SEARCH:
return false;
99 case VR::STOP_TREE:
continue;
100 case VR::CONTINUE:
break;
107 if (seen.contains(edge.second)) {
108 switch (visitor.discover_edge_to_known_vertex_base(edge,
graph)) {
109 case VR::STOP_SEARCH:
return false;
110 case VR::STOP_TREE:
continue;
111 case VR::CONTINUE:
continue;
114 switch (visitor.discover_edge_to_new_vertex_base(edge,
graph)) {
115 case VR::STOP_SEARCH:
return false;
116 case VR::STOP_TREE:
continue;
118 seen.emplace(edge.second);
119 emplace(pending, edge.second);
127 if (
auto result = visitor.finish_search_base(
graph); result == NVR::STOP_SEARCH)
return false;
typename std::remove_cvref_t< G >::vertex_hash_t vertex_hash_of
typename std::remove_cvref_t< G >::vertex_compare_t vertex_compare_of
typename std::remove_cvref_t< G >::vertex_type vertex_of
constexpr bool search(G &&graph, vertex_of< G > root, V &&visitor, EmplacePP &&emplace, TakePP &&take, PP &&pending_provider=store::get_default_storage_provider< ST, vertex_of< G > >(), PS &&set_provider=store::get_default_storage_provider< store::storage_type::UNORDERED_SET, vertex_of< G >, vertex_hash_of< G >, vertex_compare_of< G > >())
constexpr bool is_leaf(G &&graph, vertex_of< G > vertex)
constexpr auto out_edges(G &&graph, vertex_of< G > vertex)
constexpr bool is_branch(G &&graph, vertex_of< G > vertex)
constexpr auto get_default_storage_provider(void)