|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Tests for Floyd. More...
#include <gtest/gtest.h>#include <functional>#include <limits>#include <map>#include <random>#include <stdexcept>#include <thread>#include <type_traits>#include <utility>#include <vector>#include <tpl_graph_utils.H>#include <Floyd_Warshall.H>Go to the source code of this file.
Typedefs | |
| using | Grafo = List_Digraph< Graph_Node< int >, Graph_Arc< int > > |
| using | GNode = Grafo::Node |
| using | GArc = Grafo::Arc |
Functions | |
| TEST (FloydBasicGraph, computes_correct_distances) | |
| TEST (FloydBasicGraph, handles_unreachable_nodes) | |
| TEST (FloydNegativeWeights, handles_negative_weights_without_cycles) | |
| TEST (FloydNegativeCycle, detects_negative_cycles) | |
| TEST (FloydIndexNode, finds_correct_indices) | |
| TEST (FloydIndexNode, throws_on_null_pointer) | |
| TEST (FloydPathReconstruction, throws_on_invalid_indices) | |
| TEST (FloydPathReconstruction, returns_valid_path) | |
| TEST (FloydPathReconstruction, handles_self_paths) | |
| TEST (FloydUtility, entry_formats_distances_correctly) | |
| TEST (FloydMatrices, path_matrix_has_correct_structure) | |
| TEST (FloydLargeGraph, handles_complete_graph) | |
| TEST (FloydStress, handles_single_node_graph) | |
| TEST (FloydAccessors, node_accessors_behavior) | |
| TEST (FloydParallelArcs, TakesTheLightest) | |
| TEST (FloydUndirected, PathsGoBothWaysAlongTheArcs) | |
| TEST (FloydUndirected, ANegativeArcIsANegativeCycle) | |
| TEST (FloydNumeric, ADistanceBelowTheRangeThrows) | |
| TEST (FloydNumeric, ADistanceAtTheBottomOfTheRangeCounts) | |
| TEST (FloydLoops, ANegativeLoopIsANegativeCycle) | |
| TEST (FloydLoops, APositiveLoopDoesNotCount) | |
| TEST (FloydNegativeCycle, GetMinPathThrows) | |
| TEST (FloydFilter, PathsUseOnlyTheArcsOfTheFilter) | |
| TEST (FloydRandom, MatchesRelaxationWithParallelArcsAndLoops) | |
| TEST (FloydDistance, UsesTheDistanceItWasGiven) | |
| TEST (FloydDistance, TakesADistanceWithoutADefaultConstructor) | |
| TEST (FloydDistance, TakesACallOperatorThatIsNotConst) | |
| TEST (FloydDistance, ConcurrentPathsDoNotShareTheDistance) | |
| TEST (FloydDistance, GetMinPathCopiesOnlyADistanceThatItMayChange) | |
| TEST (FloydDistance, EmptyBracesAreTheFilter) | |
| TEST (FloydDistance, TheClassIsDeducedFromTheDistance) | |
| TEST (FloydNegativeCycle, ACompleteDigraphOfNegativeArcs) | |
| TEST (FloydNegativeCycle, OneNegativeArcInALargeGraph) | |
| TEST (FloydLoops, ALoopAtTheBottomOfTheRangeIsANegativeCycle) | |
Tests for Floyd.
Definition in file floyd.cc.
| using GArc = Grafo::Arc |
| using GNode = Grafo::Node |
| using Grafo = List_Digraph<Graph_Node<int>, Graph_Arc<int> > |
| TEST | ( | FloydAccessors | , |
| node_accessors_behavior | |||
| ) |
Definition at line 393 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::get_nodes(), Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::get_nodes_copy(), Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::get_nodes_ref(), and Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::index_node().
| TEST | ( | FloydBasicGraph | , |
| computes_correct_distances | |||
| ) |
| TEST | ( | FloydBasicGraph | , |
| handles_unreachable_nodes | |||
| ) |
| TEST | ( | FloydDistance | , |
| ConcurrentPathsDoNotShareTheDistance | |||
| ) |
Definition at line 861 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::get_min_path().
| TEST | ( | FloydDistance | , |
| GetMinPathCopiesOnlyADistanceThatItMayChange | |||
| ) |
Definition at line 891 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::get_min_path().
| TEST | ( | FloydDistance | , |
| TakesACallOperatorThatIsNotConst | |||
| ) |
Definition at line 805 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::get_min_path().
| TEST | ( | FloydDistance | , |
| TakesADistanceWithoutADefaultConstructor | |||
| ) |
Definition at line 778 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::get_min_path().
| TEST | ( | FloydDistance | , |
| UsesTheDistanceItWasGiven | |||
| ) |
Definition at line 759 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::get_min_path(), and Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::has_negative_cycle().
| TEST | ( | FloydFilter | , |
| PathsUseOnlyTheArcsOfTheFilter | |||
| ) |
| TEST | ( | FloydIndexNode | , |
| finds_correct_indices | |||
| ) |
| TEST | ( | FloydIndexNode | , |
| throws_on_null_pointer | |||
| ) |
Definition at line 216 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::index_node().
| TEST | ( | FloydLargeGraph | , |
| handles_complete_graph | |||
| ) |
| TEST | ( | FloydLoops | , |
| ALoopAtTheBottomOfTheRangeIsANegativeCycle | |||
| ) |
Definition at line 1061 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::has_negative_cycle().
| TEST | ( | FloydLoops | , |
| ANegativeLoopIsANegativeCycle | |||
| ) |
Definition at line 642 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::has_negative_cycle().
| TEST | ( | FloydLoops | , |
| APositiveLoopDoesNotCount | |||
| ) |
Definition at line 661 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::get_min_path(), and Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::has_negative_cycle().
| TEST | ( | FloydMatrices | , |
| path_matrix_has_correct_structure | |||
| ) |
Definition at line 297 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::get_dist_mat(), Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::get_path_mat(), and k.
| TEST | ( | FloydNegativeCycle | , |
| ACompleteDigraphOfNegativeArcs | |||
| ) |
Definition at line 1019 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::get_min_path(), h, and Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::has_negative_cycle().
| TEST | ( | FloydNegativeCycle | , |
| detects_negative_cycles | |||
| ) |
Definition at line 176 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::has_negative_cycle().
| TEST | ( | FloydNegativeCycle | , |
| GetMinPathThrows | |||
| ) |
Definition at line 675 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::get_min_path(), and Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::has_negative_cycle().
| TEST | ( | FloydNegativeCycle | , |
| OneNegativeArcInALargeGraph | |||
| ) |
| TEST | ( | FloydNegativeWeights | , |
| handles_negative_weights_without_cycles | |||
| ) |
| TEST | ( | FloydNumeric | , |
| ADistanceAtTheBottomOfTheRangeCounts | |||
| ) |
Definition at line 624 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::get_min_path(), and Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::has_negative_cycle().
| TEST | ( | FloydNumeric | , |
| ADistanceBelowTheRangeThrows | |||
| ) |
| TEST | ( | FloydParallelArcs | , |
| TakesTheLightest | |||
| ) |
Definition at line 531 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::get_min_path().
| TEST | ( | FloydPathReconstruction | , |
| handles_self_paths | |||
| ) |
Definition at line 272 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::get_min_path().
| TEST | ( | FloydPathReconstruction | , |
| returns_valid_path | |||
| ) |
Definition at line 243 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::get_min_path(), and Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::index_node().
| TEST | ( | FloydPathReconstruction | , |
| throws_on_invalid_indices | |||
| ) |
Definition at line 227 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::get_min_path().
| TEST | ( | FloydRandom | , |
| MatchesRelaxationWithParallelArcsAndLoops | |||
| ) |
| TEST | ( | FloydStress | , |
| handles_single_node_graph | |||
| ) |
| TEST | ( | FloydUndirected | , |
| ANegativeArcIsANegativeCycle | |||
| ) |
Definition at line 581 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::get_min_path(), and Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::has_negative_cycle().
| TEST | ( | FloydUndirected | , |
| PathsGoBothWaysAlongTheArcs | |||
| ) |
Definition at line 559 of file floyd.cc.
References Aleph::Path< GT >::get_first_node(), Aleph::Path< GT >::get_last_node(), and Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::get_min_path().
| TEST | ( | FloydUtility | , |
| entry_formats_distances_correctly | |||
| ) |
Definition at line 284 of file floyd.cc.
References Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::entry().