@@ -29,16 +29,17 @@ TEST_CASE_TEMPLATE_DEFINE(
2929 REQUIRE_EQ (sut.n_vertices (), constants::n_elements);
3030 REQUIRE_EQ (sut.n_unique_edges (), constants::zero_elements);
3131
32- std::ranges::for_each (constants::vertex_id_view, [&sut](const lib_t ::id_type vertex_id) {
32+ std::ranges::for_each (constants::vertex_id_view, [&sut](const gl::types ::id_type vertex_id) {
3333 CHECK_EQ (sut.adjacent_edges (vertex_id).distance (), constants::zero_elements);
3434 });
3535 }
3636
3737 SUBCASE (" add_vertex should properly extend the current adjacency list" ) {
3838 SutType sut{};
39- constexpr lib_t ::size_type target_n_vertices = constants::n_elements;
39+ constexpr gl::types ::size_type target_n_vertices = constants::n_elements;
4040
41- for (lib_t ::size_type n_vertices = constants::one_element; n_vertices <= target_n_vertices;
41+ for (gl::types::size_type n_vertices = constants::one_element;
42+ n_vertices <= target_n_vertices;
4243 n_vertices++) {
4344 sut.add_vertex ();
4445 CHECK_EQ (sut.n_vertices (), n_vertices);
@@ -59,35 +60,37 @@ TEST_CASE_TEMPLATE_DEFINE(
5960
6061TEST_CASE_TEMPLATE_INSTANTIATE (
6162 edge_directional_tag_sut_template,
62- lib_i:: adjacency_list<lib ::list_graph_traits<lib ::directed_t >>, // directed adj list
63- lib_i:: adjacency_list<lib ::list_graph_traits<lib ::undirected_t >> // undirected adj list
63+ gl::impl:: adjacency_list<gl ::list_graph_traits<gl ::directed_t >>, // directed adj list
64+ gl::impl:: adjacency_list<gl ::list_graph_traits<gl ::undirected_t >> // undirected adj list
6465);
6566
6667namespace {
6768
68- constexpr lib_t ::size_type n_incident_edges_for_fully_connected_vertex =
69+ constexpr gl::types ::size_type n_incident_edges_for_fully_connected_vertex =
6970 constants::n_elements - constants::one_element;
7071
7172} // namespace
7273
7374struct test_directed_adjacency_list {
74- using vertex_type = lib ::vertex_descriptor<>;
75- using edge_type = lib ::directed_edge<vertex_type>;
76- using edge_ptr_type = lib ::directed_t ::edge_ptr_type<edge_type>;
77- using sut_type = lib_i:: adjacency_list<lib ::list_graph_traits<lib ::directed_t >>;
75+ using vertex_type = gl ::vertex_descriptor<>;
76+ using edge_type = gl ::directed_edge<vertex_type>;
77+ using edge_ptr_type = gl ::directed_t ::edge_ptr_type<edge_type>;
78+ using sut_type = gl::impl:: adjacency_list<gl ::list_graph_traits<gl ::directed_t >>;
7879
7980 test_directed_adjacency_list () {
8081 for (const auto id : constants::vertex_id_view)
8182 vertices.emplace_back (id);
8283 }
8384
84- const edge_type& add_edge (const lib_t ::id_type first_id, const lib_t ::id_type second_id) {
85+ const edge_type& add_edge (
86+ const gl::types::id_type first_id, const gl::types::id_type second_id
87+ ) {
8588 return sut.add_edge (
86- lib ::detail::make_edge<edge_type>(vertices[first_id], vertices[second_id])
89+ gl ::detail::make_edge<edge_type>(vertices[first_id], vertices[second_id])
8790 );
8891 }
8992
90- void fully_connect_vertex (const lib_t ::id_type first_id, const bool no_loops = true ) {
93+ void fully_connect_vertex (const gl::types ::id_type first_id, const bool no_loops = true ) {
9194 for (const auto second_id : constants::vertex_id_view) {
9295 if (second_id == first_id and no_loops)
9396 continue ;
@@ -109,7 +112,7 @@ struct test_directed_adjacency_list {
109112 sut_type sut{constants::n_elements};
110113 std::vector<vertex_type> vertices;
111114
112- const lib_t ::size_type n_unique_edges_in_full_graph =
115+ const gl::types ::size_type n_unique_edges_in_full_graph =
113116 n_incident_edges_for_fully_connected_vertex * constants::n_elements;
114117};
115118
@@ -229,7 +232,7 @@ TEST_CASE_FIXTURE(
229232 test_directed_adjacency_list,
230233 " get_edges(id, id) should return a valid edge view if the given vertices are connected"
231234) {
232- std::vector<lib_t ::const_ref_wrap<edge_type>> expected_edges;
235+ std::vector<gl::types ::const_ref_wrap<edge_type>> expected_edges;
233236 for (auto _ = constants::first_element_idx; _ < constants::n_elements; _++)
234237 expected_edges.push_back (std::cref (add_edge (constants::vertex_id_1, constants::vertex_id_2))
235238 );
@@ -306,7 +309,7 @@ TEST_CASE_FIXTURE(
306309) {
307310 init_complete_graph ();
308311
309- std::function<lib_t:: size_type (const lib_t ::id_type)> deg_proj;
312+ std::function<gl::types:: size_type (const gl::types ::id_type)> deg_proj;
310313
311314 SUBCASE (" in_degree" ) {
312315 deg_proj = [this ](const auto vertex_id) { return sut.in_degree (vertex_id); };
@@ -363,7 +366,7 @@ TEST_CASE_FIXTURE(
363366 init_complete_graph (false );
364367 const auto expected_deg = constants::n_elements;
365368
366- std::vector<lib_t ::id_type> degree_map;
369+ std::vector<gl::types ::id_type> degree_map;
367370
368371 SUBCASE (" in_degree" ) {
369372 degree_map = sut.in_degree_map ();
@@ -387,7 +390,7 @@ TEST_CASE_FIXTURE(
387390 init_complete_graph (false );
388391 const auto expected_deg = constants::n_elements * constants::two;
389392
390- std::vector<lib_t ::id_type> degree_map = sut.degree_map ();
393+ std::vector<gl::types ::id_type> degree_map = sut.degree_map ();
391394
392395 REQUIRE_EQ (degree_map.size (), constants::n_elements);
393396 CHECK_EQ (std::ranges::count (degree_map, expected_deg), constants::n_elements);
@@ -420,23 +423,25 @@ TEST_CASE_FIXTURE(
420423}
421424
422425struct test_undirected_adjacency_list {
423- using vertex_type = lib ::vertex_descriptor<>;
424- using edge_type = lib ::undirected_edge<vertex_type>;
425- using edge_ptr_type = lib ::undirected_t ::edge_ptr_type<edge_type>;
426- using sut_type = lib_i:: adjacency_list<lib ::list_graph_traits<lib ::undirected_t >>;
426+ using vertex_type = gl ::vertex_descriptor<>;
427+ using edge_type = gl ::undirected_edge<vertex_type>;
428+ using edge_ptr_type = gl ::undirected_t ::edge_ptr_type<edge_type>;
429+ using sut_type = gl::impl:: adjacency_list<gl ::list_graph_traits<gl ::undirected_t >>;
427430
428431 test_undirected_adjacency_list () {
429432 for (const auto id : constants::vertex_id_view)
430433 vertices.emplace_back (id);
431434 }
432435
433- const edge_type& add_edge (const lib_t ::id_type first_id, const lib_t ::id_type second_id) {
436+ const edge_type& add_edge (
437+ const gl::types::id_type first_id, const gl::types::id_type second_id
438+ ) {
434439 return sut.add_edge (
435- lib ::detail::make_edge<edge_type>(vertices[first_id], vertices[second_id])
440+ gl ::detail::make_edge<edge_type>(vertices[first_id], vertices[second_id])
436441 );
437442 }
438443
439- void fully_connect_vertex (const lib_t ::id_type first_id, const bool no_loops = true ) {
444+ void fully_connect_vertex (const gl::types ::id_type first_id, const bool no_loops = true ) {
440445 for (const auto second_id : constants::vertex_id_view) {
441446 if (second_id == first_id and no_loops)
442447 continue ;
@@ -461,7 +466,7 @@ struct test_undirected_adjacency_list {
461466 sut_type sut{constants::n_elements};
462467 std::vector<vertex_type> vertices;
463468
464- const lib_t ::size_type n_unique_edges_in_full_graph =
469+ const gl::types ::size_type n_unique_edges_in_full_graph =
465470 (n_incident_edges_for_fully_connected_vertex * constants::n_elements) / 2 ;
466471};
467472
@@ -605,7 +610,7 @@ TEST_CASE_FIXTURE(
605610 test_undirected_adjacency_list,
606611 " get_edges(id, id) should return a valid edge view if the given vertices are connected"
607612) {
608- std::vector<lib_t ::const_ref_wrap<edge_type>> expected_edges;
613+ std::vector<gl::types ::const_ref_wrap<edge_type>> expected_edges;
609614 for (auto _ = constants::first_element_idx; _ < constants::n_elements; _++)
610615 expected_edges.push_back (std::cref (add_edge (constants::vertex_id_1, constants::vertex_id_2))
611616 );
@@ -702,7 +707,7 @@ TEST_CASE_FIXTURE(
702707) {
703708 init_complete_graph ();
704709
705- std::function<lib_t:: size_type (const lib_t ::id_type)> deg_proj;
710+ std::function<gl::types:: size_type (const gl::types ::id_type)> deg_proj;
706711
707712 SUBCASE (" degree" ) {
708713 deg_proj = [this ](const auto vertex_id) { return sut.degree (vertex_id); };
@@ -740,7 +745,7 @@ TEST_CASE_FIXTURE(
740745 init_complete_graph (false );
741746 const auto expected_deg = constants::n_elements + 1 ;
742747
743- std::vector<lib_t ::id_type> degree_map;
748+ std::vector<gl::types ::id_type> degree_map;
744749
745750 SUBCASE (" in_degree" ) {
746751 degree_map = sut.in_degree_map ();
0 commit comments