|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Tests for find_disjoint_negative_cycles() (Negative_Cycles.H). More...
#include <Negative_Cycles.H>#include <gtest/gtest.h>#include <cmath>#include <functional>#include <limits>#include <random>#include <set>#include <thread>#include <tuple>#include <type_traits>#include <vector>#include <Bellman_Ford.H>#include <tpl_agraph.H>#include <tpl_graph.H>#include "negative_cycles_test_support.H"Go to the source code of this file.
Functions | |
| TEST (NegativeCyclesTest, TwoArcDisjointNegativeCyclesAreBothFound) | |
| TEST (NegativeCyclesTest, SingleNegativeCycleIsReportedOnce) | |
| TEST (NegativeCyclesTest, NoNegativeCycleReturnsEmptyList) | |
| TEST (NegativeCyclesTest, MaxCyclesZeroReturnsEmptyList) | |
| TEST (NegativeCyclesTest, MaxCyclesZeroDoesNotTouchTheGraph) | |
| TEST (NegativeCyclesTest, MaxCyclesLimitsTheCount) | |
| TEST (NegativeCyclesTest, CyclesSharingANodeButNoArcAreBothFound) | |
| TEST (NegativeCyclesTest, ExclusionPolicyDecidesWhatCyclesSharingAnArcYield) | |
| TEST (NegativeCyclesTest, ParallelArcsAreToldApart) | |
| TEST (NegativeCyclesTest, ArcFilterHidesArcs) | |
| TEST (NegativeCyclesTest, FloatingWeightsWork) | |
| TEST (NegativeCyclesTest, ArrayDigraphBackendWorks) | |
| TEST (NegativeCyclesTest, InvalidInputsThrow) | |
| TEST (NegativeCyclesTest, GraphIsLeftUntouched) | |
| TEST (NegativeCyclesTest, KnownNumericLimitationAbsorptionHidesNegativeLoop) | |
| TEST (NegativeCyclesTest, KnownNumericLimitationAbsorptionInsideAComponent) | |
| TEST (NegativeCyclesTest, CancellationDoesNotFakeANegativeCycle) | |
| TEST (NegativeCyclesTest, DistanceAndFilterAreCalledOncePerArc) | |
| TEST (NegativeCyclesTest, NonFiniteWeightsHiddenByTheFilterAreIgnored) | |
| TEST (NegativeCyclesTest, NonNullCookiesAndBitsAreLeftUntouched) | |
| TEST (NegativeCyclesTest, SingleNodeSelfLoops) | |
| TEST (NegativeCyclesTest, DisconnectedGraphsAreSearchedInEveryComponent) | |
| TEST (NegativeCyclesTest, IntCostsWork) | |
| TEST (NegativeCyclesTest, LongDoubleCostsWork) | |
| TEST (NegativeCyclesTest, CostsAtTheLimitsOfTheType) | |
| TEST (NegativeCyclesTest, RandomGraphsAgreeWithExhaustiveOracle) | |
| TEST (NegativeCyclesTest, LargeGraphsAreIndexedCorrectly) | |
| TEST (NegativeCyclesTest, GraphsWithoutNodesOrWithOneNodeAreIndexed) | |
| TEST (NegativeCyclesTest, NodeIndexFindsEveryNodeAndRejectsTheRest) | |
| TEST (NegativeCyclesTest, ConcurrentSearchesOnTheSameGraphAgree) | |
Tests for find_disjoint_negative_cycles() (Negative_Cycles.H).
Definition in file negative_cycles_test.cc.
| TEST | ( | NegativeCyclesTest | , |
| ArcFilterHidesArcs | |||
| ) |
| TEST | ( | NegativeCyclesTest | , |
| ArrayDigraphBackendWorks | |||
| ) |
Definition at line 398 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::find_disjoint_negative_cycles(), and Negative_Cycles_Test_Support::Built_Graph_T< GT >::g.
| TEST | ( | NegativeCyclesTest | , |
| CancellationDoesNotFakeANegativeCycle | |||
| ) |
Definition at line 533 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::find_disjoint_negative_cycles(), nodes, and w.
| TEST | ( | NegativeCyclesTest | , |
| ConcurrentSearchesOnTheSameGraphAgree | |||
| ) |
Definition at line 829 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::find_disjoint_negative_cycles(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, and Aleph::most_negative_cycle_bounded().
| TEST | ( | NegativeCyclesTest | , |
| CostsAtTheLimitsOfTheType | |||
| ) |
Definition at line 668 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), and Aleph::find_disjoint_negative_cycles().
| TEST | ( | NegativeCyclesTest | , |
| CyclesSharingANodeButNoArcAreBothFound | |||
| ) |
Definition at line 311 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::find_disjoint_negative_cycles(), and Negative_Cycles_Test_Support::Built_Graph_T< GT >::g.
| TEST | ( | NegativeCyclesTest | , |
| DisconnectedGraphsAreSearchedInEveryComponent | |||
| ) |
| TEST | ( | NegativeCyclesTest | , |
| DistanceAndFilterAreCalledOncePerArc | |||
| ) |
Definition at line 564 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), and Negative_Cycles_Test_Support::Built_Graph_T< GT >::g.
| TEST | ( | NegativeCyclesTest | , |
| ExclusionPolicyDecidesWhatCyclesSharingAnArcYield | |||
| ) |
Definition at line 332 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::find_disjoint_negative_cycles(), and Negative_Cycles_Test_Support::Built_Graph_T< GT >::g.
| TEST | ( | NegativeCyclesTest | , |
| FloatingWeightsWork | |||
| ) |
Definition at line 386 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::find_disjoint_negative_cycles(), and Negative_Cycles_Test_Support::Built_Graph_T< GT >::g.
| TEST | ( | NegativeCyclesTest | , |
| GraphIsLeftUntouched | |||
| ) |
Definition at line 438 of file negative_cycles_test.cc.
References ARC_COOKIE, arcs, Negative_Cycles_Test_Support::Built_Graph_T< GT >::arcs, Negative_Cycles_Test_Support::build_graph(), Aleph::find_disjoint_negative_cycles(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, GraphCommon< GT, Node, Arc >::get_num_arcs(), GraphCommon< GT, Node, Arc >::get_num_nodes(), NODE_COOKIE, nodes, and Negative_Cycles_Test_Support::Built_Graph_T< GT >::nodes.
| TEST | ( | NegativeCyclesTest | , |
| GraphsWithoutNodesOrWithOneNodeAreIndexed | |||
| ) |
Definition at line 786 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), and Aleph::find_disjoint_negative_cycles().
| TEST | ( | NegativeCyclesTest | , |
| IntCostsWork | |||
| ) |
Definition at line 656 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph().
| TEST | ( | NegativeCyclesTest | , |
| InvalidInputsThrow | |||
| ) |
| TEST | ( | NegativeCyclesTest | , |
| KnownNumericLimitationAbsorptionHidesNegativeLoop | |||
| ) |
Definition at line 471 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::find_disjoint_negative_cycles(), and Aleph::most_negative_cycle_bounded().
| TEST | ( | NegativeCyclesTest | , |
| KnownNumericLimitationAbsorptionInsideAComponent | |||
| ) |
Definition at line 506 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::find_disjoint_negative_cycles(), and Aleph::most_negative_cycle_bounded().
| TEST | ( | NegativeCyclesTest | , |
| LargeGraphsAreIndexedCorrectly | |||
| ) |
Definition at line 761 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::find_disjoint_negative_cycles(), and Negative_Cycles_Test_Support::Built_Graph_T< GT >::g.
| TEST | ( | NegativeCyclesTest | , |
| LongDoubleCostsWork | |||
| ) |
Definition at line 662 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph().
| TEST | ( | NegativeCyclesTest | , |
| MaxCyclesLimitsTheCount | |||
| ) |
Definition at line 294 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::find_disjoint_negative_cycles(), and Negative_Cycles_Test_Support::Built_Graph_T< GT >::g.
| TEST | ( | NegativeCyclesTest | , |
| MaxCyclesZeroDoesNotTouchTheGraph | |||
| ) |
Definition at line 272 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::find_disjoint_negative_cycles(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), and Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node().
| TEST | ( | NegativeCyclesTest | , |
| MaxCyclesZeroReturnsEmptyList | |||
| ) |
Definition at line 260 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::find_disjoint_negative_cycles(), and Negative_Cycles_Test_Support::Built_Graph_T< GT >::g.
| TEST | ( | NegativeCyclesTest | , |
| NodeIndexFindsEveryNodeAndRejectsTheRest | |||
| ) |
Definition at line 801 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), and Negative_Cycles_Test_Support::Built_Graph_T< GT >::nodes.
| TEST | ( | NegativeCyclesTest | , |
| NoNegativeCycleReturnsEmptyList | |||
| ) |
Definition at line 241 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), and Aleph::find_disjoint_negative_cycles().
| TEST | ( | NegativeCyclesTest | , |
| NonFiniteWeightsHiddenByTheFilterAreIgnored | |||
| ) |
Definition at line 582 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), and Aleph::find_disjoint_negative_cycles().
| TEST | ( | NegativeCyclesTest | , |
| NonNullCookiesAndBitsAreLeftUntouched | |||
| ) |
| TEST | ( | NegativeCyclesTest | , |
| ParallelArcsAreToldApart | |||
| ) |
| TEST | ( | NegativeCyclesTest | , |
| RandomGraphsAgreeWithExhaustiveOracle | |||
| ) |
Definition at line 703 of file negative_cycles_test.cc.
References Aleph::and, Negative_Cycles_Test_Support::build_graph(), Aleph::find_disjoint_negative_cycles(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, Aleph::Bellman_Ford< GT, Distance, Ait, NAit, SA >::has_negative_cycle(), and rng.
| TEST | ( | NegativeCyclesTest | , |
| SingleNegativeCycleIsReportedOnce | |||
| ) |
Definition at line 225 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::find_disjoint_negative_cycles(), and Negative_Cycles_Test_Support::Built_Graph_T< GT >::g.
| TEST | ( | NegativeCyclesTest | , |
| SingleNodeSelfLoops | |||
| ) |
Definition at line 621 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::find_disjoint_negative_cycles(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), LL, and w.
| TEST | ( | NegativeCyclesTest | , |
| TwoArcDisjointNegativeCyclesAreBothFound | |||
| ) |
Definition at line 195 of file negative_cycles_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::find_disjoint_negative_cycles(), and Negative_Cycles_Test_Support::Built_Graph_T< GT >::g.