|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Tests for Johnson. More...
#include <gtest/gtest.h>#include <tpl_graph.H>#include <Johnson.H>#include <Dijkstra.H>#include <Bellman_Ford.H>#include <tpl_graph_utils.H>#include <random>#include <limits>#include <vector>#include <map>#include <chrono>#include <cmath>Go to the source code of this file.
Classes | |
| struct | WeightedNode |
| struct | WeightedArc |
| struct | DoubleDistance |
| class | JohnsonTest |
Typedefs | |
| using | TestDigraph = List_Digraph< WeightedNode, WeightedArc > |
| using | Node = TestDigraph::Node |
| using | Arc = TestDigraph::Arc |
Functions | |
| TEST_F (JohnsonTest, BellmanFordBasic) | |
| TEST_F (JohnsonTest, BellmanFordNegativeWeights) | |
| TEST_F (JohnsonTest, BellmanFordNegativeCycle) | |
| TEST_F (JohnsonTest, BellmanFordComputeNodesWeights) | |
| TEST_F (JohnsonTest, BellmanFordComputeNodesWeightsThrowsOnNegativeCycle) | |
| TEST_F (JohnsonTest, JohnsonBasicPath) | |
| TEST_F (JohnsonTest, JohnsonNegativeWeights) | |
| TEST_F (JohnsonTest, JohnsonNegativeCycleDetection) | |
| TEST_F (JohnsonTest, JohnsonAllPairs) | |
| TEST_F (JohnsonTest, ReweightingPreservesShortestPaths) | |
| TEST_F (JohnsonTest, DijkstraAfterReweighting) | |
| TEST_F (JohnsonTest, AllPairsSmallComplete) | |
| TEST_F (JohnsonTest, AllPairsSparse) | |
| TEST_F (JohnsonTest, SingleNode) | |
| TEST_F (JohnsonTest, TwoNodesNoEdge) | |
| TEST_F (JohnsonTest, TwoNodesOneEdge) | |
| TEST_F (JohnsonTest, SelfLoop) | |
| TEST_F (JohnsonTest, NegativeSelfLoop) | |
| TEST_F (JohnsonTest, ParallelEdges) | |
| TEST_F (JohnsonTest, MediumGraph) | |
| TEST_F (JohnsonTest, DISABLED_LargeGraphPerformance) | |
| TEST_F (JohnsonTest, CorrectnessVsFloydWarshall) | |
| TEST_F (JohnsonTest, SPFAvsStandard) | |
| TEST_F (JohnsonTest, NegativeCyclePathRetrieval) | |
| TEST_F (JohnsonTest, NegativeCycleNotReachable) | |
| TEST_F (JohnsonTest, ManualJohnsonImplementation) | |
| int | main (int argc, char **argv) |
Tests for Johnson.
Intensive tests for Johnson's all-pairs shortest paths algorithm.
Tests cover:
Definition in file johnson_test.cc.
| using Arc = TestDigraph::Arc |
Definition at line 83 of file johnson_test.cc.
| using Node = TestDigraph::Node |
Definition at line 82 of file johnson_test.cc.
| using TestDigraph = List_Digraph<WeightedNode, WeightedArc> |
Definition at line 81 of file johnson_test.cc.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 888 of file johnson_test.cc.
References Aleph::maps().
| TEST_F | ( | JohnsonTest | , |
| AllPairsSmallComplete | |||
| ) |
Definition at line 513 of file johnson_test.cc.
References Aleph::DynList< T >::empty(), StlAlephIterator< SetName >::end(), Aleph::maps(), and nodes.
| TEST_F | ( | JohnsonTest | , |
| AllPairsSparse | |||
| ) |
Definition at line 531 of file johnson_test.cc.
References StlAlephIterator< SetName >::end(), Aleph::maps(), and nodes.
| TEST_F | ( | JohnsonTest | , |
| BellmanFordBasic | |||
| ) |
Definition at line 253 of file johnson_test.cc.
References Aleph::maps(), and nodes.
| TEST_F | ( | JohnsonTest | , |
| BellmanFordComputeNodesWeights | |||
| ) |
Definition at line 285 of file johnson_test.cc.
References Aleph::maps(), nodes, and Aleph::HTList::size().
| TEST_F | ( | JohnsonTest | , |
| BellmanFordComputeNodesWeightsThrowsOnNegativeCycle | |||
| ) |
Definition at line 306 of file johnson_test.cc.
References Aleph::maps().
| TEST_F | ( | JohnsonTest | , |
| BellmanFordNegativeCycle | |||
| ) |
Definition at line 275 of file johnson_test.cc.
References Aleph::maps(), and nodes.
| TEST_F | ( | JohnsonTest | , |
| BellmanFordNegativeWeights | |||
| ) |
Definition at line 265 of file johnson_test.cc.
References Aleph::maps(), and nodes.
| TEST_F | ( | JohnsonTest | , |
| CorrectnessVsFloydWarshall | |||
| ) |
Definition at line 670 of file johnson_test.cc.
References Aleph::maps(), and nodes.
| TEST_F | ( | JohnsonTest | , |
| DijkstraAfterReweighting | |||
| ) |
Definition at line 464 of file johnson_test.cc.
References Aleph::copy(), Aleph::DynList< T >::insert(), Aleph::maps(), Aleph::Filter_Iterator< Container, It, Show_Item >::next(), nodes, and w.
| TEST_F | ( | JohnsonTest | , |
| DISABLED_LargeGraphPerformance | |||
| ) |
Definition at line 640 of file johnson_test.cc.
References Aleph::maps().
| TEST_F | ( | JohnsonTest | , |
| JohnsonAllPairs | |||
| ) |
Definition at line 384 of file johnson_test.cc.
References Aleph::maps(), and nodes.
| TEST_F | ( | JohnsonTest | , |
| JohnsonBasicPath | |||
| ) |
Definition at line 318 of file johnson_test.cc.
References Aleph::maps(), and nodes.
| TEST_F | ( | JohnsonTest | , |
| JohnsonNegativeCycleDetection | |||
| ) |
Definition at line 375 of file johnson_test.cc.
References Aleph::maps().
| TEST_F | ( | JohnsonTest | , |
| JohnsonNegativeWeights | |||
| ) |
Definition at line 338 of file johnson_test.cc.
References Aleph::maps(), and nodes.
| TEST_F | ( | JohnsonTest | , |
| ManualJohnsonImplementation | |||
| ) |
Definition at line 785 of file johnson_test.cc.
References StlAlephIterator< SetName >::end(), FAIL, h, Aleph::maps(), Aleph::Filter_Iterator< Container, It, Show_Item >::next(), nodes, and w.
| TEST_F | ( | JohnsonTest | , |
| MediumGraph | |||
| ) |
Definition at line 621 of file johnson_test.cc.
References Aleph::Path< GT >::is_empty(), Aleph::maps(), and nodes.
| TEST_F | ( | JohnsonTest | , |
| NegativeCycleNotReachable | |||
| ) |
Definition at line 760 of file johnson_test.cc.
References Aleph::maps(), and nodes.
| TEST_F | ( | JohnsonTest | , |
| NegativeCyclePathRetrieval | |||
| ) |
Definition at line 743 of file johnson_test.cc.
References Aleph::HTList::is_empty(), Aleph::maps(), nodes, and Aleph::HTList::size().
| TEST_F | ( | JohnsonTest | , |
| NegativeSelfLoop | |||
| ) |
Definition at line 594 of file johnson_test.cc.
References Aleph::maps(), and nodes.
| TEST_F | ( | JohnsonTest | , |
| ParallelEdges | |||
| ) |
Definition at line 605 of file johnson_test.cc.
References Aleph::maps(), and nodes.
| TEST_F | ( | JohnsonTest | , |
| ReweightingPreservesShortestPaths | |||
| ) |
Definition at line 426 of file johnson_test.cc.
References Aleph::maps(), Aleph::Filter_Iterator< Container, It, Show_Item >::next(), and w.
| TEST_F | ( | JohnsonTest | , |
| SelfLoop | |||
| ) |
Definition at line 583 of file johnson_test.cc.
References Aleph::maps(), and nodes.
| TEST_F | ( | JohnsonTest | , |
| SingleNode | |||
| ) |
Definition at line 549 of file johnson_test.cc.
References Aleph::maps(), and nodes.
| TEST_F | ( | JohnsonTest | , |
| SPFAvsStandard | |||
| ) |
Definition at line 722 of file johnson_test.cc.
References Aleph::maps(), and nodes.
| TEST_F | ( | JohnsonTest | , |
| TwoNodesNoEdge | |||
| ) |
Definition at line 559 of file johnson_test.cc.
References Aleph::maps(), and nodes.
| TEST_F | ( | JohnsonTest | , |
| TwoNodesOneEdge | |||
| ) |
Definition at line 570 of file johnson_test.cc.
References Aleph::maps(), and nodes.