|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Graph types and probe helpers shared by negative_cycles_test.cc and bounded_negative_cycle_test.cc.
More...
#include <cmath>#include <cstddef>#include <tuple>#include <vector>#include <tpl_agraph.H>#include <tpl_graph.H>Go to the source code of this file.
Namespaces | |
| namespace | Negative_Cycles_Test_Support |
Typedefs | |
| using | Negative_Cycles_Test_Support::Graph = List_Digraph< Graph_Node< int >, Graph_Arc< long long > > |
| using | Negative_Cycles_Test_Support::Float_Graph = List_Digraph< Graph_Node< int >, Graph_Arc< double > > |
| using | Negative_Cycles_Test_Support::Arr_Digraph = Array_Digraph< Graph_Anode< int >, Graph_Aarc< long long > > |
| using | Negative_Cycles_Test_Support::UGraph = List_Graph< Graph_Node< int >, Graph_Arc< long long > > |
| using | Negative_Cycles_Test_Support::Node = Graph::Node |
| using | Negative_Cycles_Test_Support::Arc = Graph::Arc |
| using | Negative_Cycles_Test_Support::Edge_Def = std::tuple< size_t, size_t, long long > |
Functions | |
| template<class GT , typename Weight_Type > | |
| Built_Graph_T< GT > | Negative_Cycles_Test_Support::build_graph_generic (const size_t n, const std::vector< std::tuple< size_t, size_t, Weight_Type > > &edges) |
| Built_Graph_T< Graph > | Negative_Cycles_Test_Support::build_graph (const size_t n, const std::vector< Edge_Def > &edges) |
Graph types and probe helpers shared by negative_cycles_test.cc and bounded_negative_cycle_test.cc.
Both suites build the same small digraphs, count how often the distance accessor and the arc filter are called, hide or reject arcs, and check that a search leaves the cookies and control bits of the graph untouched. The helpers live here so that the two files do not keep verbatim copies in sync. What each suite checks about a result (the validators, the oracles and the test graphs of one function) stays in its own file.
Definition in file negative_cycles_test_support.H.