27 template <graphle::meta::list_of_types DataStructures,
typename Algorithm>
29 DataStructures::foreach([&] <
typename DS> {
33 std::span ordering = vertex_order_copy;
35 auto structure = DS::from_ve_list(src);
36 auto graph = structure.view_as_graph();
45 auto it = std::ranges::find(ordering.front(),
vertex->vertex_id);
48 ordering.front().erase(it);
49 if (ordering.front().empty()) ordering = ordering.subspan(1);
51 .finish_search = [&] (
auto&
graph) {
58 auto root_vertex = [&] {
61 }
else if constexpr (
requires { structure.root; }) {
62 if (structure.root->vertex_id == root)
return structure.root.get();
65 FAIL(
"Cannot find root vertex for the given graph type.");
typename std::remove_cvref_t< G >::edge_type edge_of
typename std::remove_cvref_t< G >::vertex_type vertex_of
std::vector< std::size_t > vertex_list
std::vector< vertex_list > vertex_order
void test_visit_order(const graphle::test::ve_list_graph &src, std::size_t root, const vertex_order &vertex_ordering, Algorithm &&algorithm)
constexpr vertex_of< G > find_vertex(G &&graph, F &&pred)
meta::deduce_as_t< Graph > deduce_graph_type
#define SUBTEST_SCOPE(Name)
#define ASSERT_FALSE(...)