|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
The contract matrix of the shortest paths of all the pairs, of the k shortest paths and of the minimum spanning trees: Floyd-Warshall, Johnson, Yen, Eppstein, Kruskal and Prim. More...
#include <set>#include <stdexcept>#include <string>#include <type_traits>#include <utility>#include <gtest/gtest.h>#include <tpl_graph.H>#include <Floyd_Warshall.H>#include <Johnson.H>#include <K_Shortest_Paths.H>#include <Kruskal.H>#include <Prim.H>#include "graph_harness.H"#include "graph_filter_catalog.H"#include "graph_contract_matrix.H"Go to the source code of this file.
Classes | |
| class | ContractPathsAllPairs< GT > |
| class | ContractPathsJohnson< GT > |
| class | ContractPathsSpanningTree< GT > |
Functions | |
| TYPED_TEST_SUITE (ContractPathsAllPairs, All_Kinds) | |
| TYPED_TEST (ContractPathsAllPairs, FloydAllShortestPaths) | |
| TYPED_TEST (ContractPathsAllPairs, YenKShortestPaths) | |
| TYPED_TEST (ContractPathsAllPairs, EppsteinKShortestPaths) | |
| TYPED_TEST_SUITE (ContractPathsJohnson, Directed_Kinds) | |
| TYPED_TEST (ContractPathsJohnson, Johnson) | |
| TYPED_TEST (ContractPathsJohnson, JohnsonFiltersTheArcsOfTheGraph) | |
| TYPED_TEST_SUITE (ContractPathsSpanningTree, Undirected_Kinds) | |
| TYPED_TEST (ContractPathsSpanningTree, KruskalMinSpanningTree) | |
| TYPED_TEST (ContractPathsSpanningTree, PrimMinSpanningTree) | |
The contract matrix of the shortest paths of all the pairs, of the k shortest paths and of the minimum spanning trees: Floyd-Warshall, Johnson, Yen, Eppstein, Kruskal and Prim.
Each test instantiates one template of Floyd_Warshall.H, Johnson.H, K_Shortest_Paths.H, Kruskal.H or Prim.H with every kind of graph that its documentation supports and every arc filter of graph_filter_catalog.H, on a const graph too, and calls each of its public entry points once, on a small graph whose shortest path or tree needs the arc that the filters hide. The distance is the default one, Dft_Dist, which reads the info of the arcs: the weights are the numbers of the arcs, unless a test writes others in the infos.
Every combination of these templates compiles, as it should. A check that fails at run time from a defect found by the matrix is marked as a known failure, which must keep failing until the defect is fixed.
Definition in file graph_contract_matrix_paths_all_pairs_test.cc.
| TYPED_TEST | ( | ContractPathsAllPairs | , |
| EppsteinKShortestPaths | |||
| ) |
Definition at line 260 of file graph_contract_matrix_paths_all_pairs_test.cc.
References arcs, graph_contract_matrix::for_each_constness(), graph_harness::Built< GT >::g, Aleph::DynList< T >::get_first(), Aleph::HTList::is_empty(), l, and graph_harness::Built< GT >::nodes.
| TYPED_TEST | ( | ContractPathsAllPairs | , |
| FloydAllShortestPaths | |||
| ) |
Definition at line 179 of file graph_contract_matrix_paths_all_pairs_test.cc.
References arcs, Aleph::find(), graph_contract_matrix::for_each_constness(), graph_harness::Built< GT >::g, and graph_harness::Built< GT >::nodes.
| TYPED_TEST | ( | ContractPathsAllPairs | , |
| YenKShortestPaths | |||
| ) |
Definition at line 226 of file graph_contract_matrix_paths_all_pairs_test.cc.
References arcs, graph_contract_matrix::for_each_constness(), graph_harness::Built< GT >::g, Aleph::DynList< T >::get_first(), l, graph_harness::Built< GT >::nodes, and Aleph::DynList< T >::size().
| TYPED_TEST | ( | ContractPathsJohnson | , |
| Johnson | |||
| ) |
Definition at line 302 of file graph_contract_matrix_paths_all_pairs_test.cc.
References arcs, graph_contract_matrix::for_each_constness(), graph_harness::Built< GT >::g, and graph_harness::Built< GT >::nodes.
| TYPED_TEST | ( | ContractPathsJohnson | , |
| JohnsonFiltersTheArcsOfTheGraph | |||
| ) |
Definition at line 331 of file graph_contract_matrix_paths_all_pairs_test.cc.
References graph_harness::Spec::arcs, graph_harness::Built< GT >::arcs, graph_harness::Check::expect(), graph_harness::Check::fail(), graph_harness::Built< GT >::g, Aleph::Johnson< GT, Distance, Ait, NAit, SA >::get_distance(), graph_harness::Spec::n, graph_harness::Built< GT >::nodes, graph_harness::Check::run(), and y.
| TYPED_TEST | ( | ContractPathsSpanningTree | , |
| KruskalMinSpanningTree | |||
| ) |
Definition at line 385 of file graph_contract_matrix_paths_all_pairs_test.cc.
References arcs, graph_contract_matrix::for_each_constness(), and graph_harness::Built< GT >::g.
| TYPED_TEST | ( | ContractPathsSpanningTree | , |
| PrimMinSpanningTree | |||
| ) |
Definition at line 412 of file graph_contract_matrix_paths_all_pairs_test.cc.
References arcs, graph_contract_matrix::for_each_constness(), and graph_harness::Built< GT >::g.
| TYPED_TEST_SUITE | ( | ContractPathsAllPairs | , |
| All_Kinds | |||
| ) |
| TYPED_TEST_SUITE | ( | ContractPathsJohnson | , |
| Directed_Kinds | |||
| ) |
| TYPED_TEST_SUITE | ( | ContractPathsSpanningTree | , |
| Undirected_Kinds | |||
| ) |