|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Tests for most_negative_cycle_bounded() (Negative_Cycles.H). More...
#include <gtest/gtest.h>#include <cmath>#include <algorithm>#include <functional>#include <limits>#include <random>#include <set>#include <type_traits>#include <tuple>#include <vector>#include <Min_Mean_Cycle.H>#include <Negative_Cycles.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 (BoundedNegativeCycleTest, TriangleFoundWithBoundThreeButNotTwo) | |
| TEST (BoundedNegativeCycleTest, RanksByTotalCostUnlikeKarpMean) | |
| TEST (BoundedNegativeCycleTest, TiesPreferShorterCycles) | |
| TEST (BoundedNegativeCycleTest, NonSimpleOptimalWalkIsDecomposedAndFlagged) | |
| TEST (BoundedNegativeCycleTest, ReportsTheCheapestCycleEvenWhenNotNegative) | |
| TEST (BoundedNegativeCycleTest, TrivialInputsHaveNoCycle) | |
| TEST (BoundedNegativeCycleTest, MaxLengthZeroDoesNotTouchTheGraph) | |
| TEST (BoundedNegativeCycleTest, SelfLoopIsALengthOneCycle) | |
| TEST (BoundedNegativeCycleTest, BoundAboveNodeCountIsCapped) | |
| TEST (BoundedNegativeCycleTest, ArcFilterChangesResult) | |
| TEST (BoundedNegativeCycleTest, ParallelArcsUseTheCheapestOne) | |
| TEST (BoundedNegativeCycleTest, FloatingWeightsAndArrayBackendWork) | |
| TEST (BoundedNegativeCycleTest, InvalidInputsThrow) | |
| TEST (BoundedNegativeCycleTest, MaxCostIsNotTreatedAsUnreachable) | |
| TEST (BoundedNegativeCycleTest, CancellationDoesNotFakeANegativeCycle) | |
| TEST (BoundedNegativeCycleTest, CandidatesAreRankedExactlyAndTheGapAdmitsRounding) | |
| TEST (BoundedNegativeCycleTest, TheRoundingFilterKeepsCandidatesNearItsBound) | |
| TEST (BoundedNegativeCycleTest, SumsAtTheEdgeOfTheExactRangeAreCertified) | |
| TEST (BoundedNegativeCycleTest, ACycleOfExactTotalZeroIsNeverNegative) | |
| TEST (BoundedNegativeCycleTest, OptimalCostDoesNotImplyFewestArcs) | |
| TEST (BoundedNegativeCycleTest, SimpleMinimumExistsButCertificateIsFalse) | |
| TEST (BoundedNegativeCycleTest, DistanceAndFilterAreCalledOncePerArc) | |
| TEST (BoundedNegativeCycleTest, NonFiniteWeightsHiddenByTheFilterAreIgnored) | |
| TEST (BoundedNegativeCycleTest, NonNullCookiesAndBitsAreLeftUntouched) | |
| TEST (BoundedNegativeCycleTest, SingleNodeSelfLoops) | |
| TEST (BoundedNegativeCycleTest, DisconnectedGraphsAreSearchedInEveryComponent) | |
| TEST (BoundedNegativeCycleTest, IntCostsWork) | |
| TEST (BoundedNegativeCycleTest, LongDoubleCostsWork) | |
| TEST (BoundedNegativeCycleTest, CostsAtTheLimitsOfTheType) | |
| TEST (BoundedNegativeCycleTest, RandomGraphsAgreeWithExhaustiveOracle) | |
| TEST (BoundedNegativeCycleTest, BoundThreeWithoutSelfLoopsIsAlwaysExact) | |
| TEST (BoundedNegativeCycleTest, AcyclicGraphsHaveNoCycleWhateverTheBound) | |
| TEST (BoundedNegativeCycleTest, OneLoopAmongManyIsolatedNodes) | |
| TEST (BoundedNegativeCycleTest, ArcsBetweenComponentsAreNeverPartOfACycle) | |
| TEST (BoundedNegativeCycleTest, SelfLoopsDownstreamOfAComponentStayCyclic) | |
| TEST (BoundedNegativeCycleTest, OverflowOutsideTheCyclicCoreIsNotReported) | |
| TEST (BoundedNegativeCycleTest, EqualCostArcsKeepTheLowestIndexInEveryTraversal) | |
| TEST (BoundedNegativeCycleTest, EqualCostParallelArcsKeepTheFirstInserted) | |
| TEST (BoundedNegativeCycleTest, RandomGraphsWithAcyclicFringesAgreeWithExhaustiveOracle) | |
| TEST (BoundedNegativeCycleTest, BoundIsCappedByTheNodeCountOfTheWholeGraph) | |
Tests for most_negative_cycle_bounded() (Negative_Cycles.H).
Definition in file bounded_negative_cycle_test.cc.
| TEST | ( | BoundedNegativeCycleTest | , |
| ACycleOfExactTotalZeroIsNeverNegative | |||
| ) |
Definition at line 623 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::find_disjoint_negative_cycles(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, Aleph::most_negative_cycle_bounded(), and r.
| TEST | ( | BoundedNegativeCycleTest | , |
| AcyclicGraphsHaveNoCycleWhateverTheBound | |||
| ) |
Definition at line 926 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, Aleph::most_negative_cycle_bounded(), and r.
| TEST | ( | BoundedNegativeCycleTest | , |
| ArcFilterChangesResult | |||
| ) |
| TEST | ( | BoundedNegativeCycleTest | , |
| ArcsBetweenComponentsAreNeverPartOfACycle | |||
| ) |
| TEST | ( | BoundedNegativeCycleTest | , |
| BoundAboveNodeCountIsCapped | |||
| ) |
Definition at line 365 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, Aleph::most_negative_cycle_bounded(), and r.
| TEST | ( | BoundedNegativeCycleTest | , |
| BoundIsCappedByTheNodeCountOfTheWholeGraph | |||
| ) |
Definition at line 1155 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), and Aleph::most_negative_cycle_bounded().
| TEST | ( | BoundedNegativeCycleTest | , |
| BoundThreeWithoutSelfLoopsIsAlwaysExact | |||
| ) |
Definition at line 892 of file bounded_negative_cycle_test.cc.
References Aleph::and, Negative_Cycles_Test_Support::build_graph(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, Aleph::most_negative_cycle_bounded(), r, and rng.
| TEST | ( | BoundedNegativeCycleTest | , |
| CancellationDoesNotFakeANegativeCycle | |||
| ) |
Definition at line 486 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::find_disjoint_negative_cycles(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, Aleph::most_negative_cycle_bounded(), r, and w.
| TEST | ( | BoundedNegativeCycleTest | , |
| CandidatesAreRankedExactlyAndTheGapAdmitsRounding | |||
| ) |
Definition at line 538 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, Aleph::most_negative_cycle_bounded(), and r.
| TEST | ( | BoundedNegativeCycleTest | , |
| CostsAtTheLimitsOfTheType | |||
| ) |
Definition at line 799 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), and Aleph::most_negative_cycle_bounded().
| TEST | ( | BoundedNegativeCycleTest | , |
| DisconnectedGraphsAreSearchedInEveryComponent | |||
| ) |
| TEST | ( | BoundedNegativeCycleTest | , |
| DistanceAndFilterAreCalledOncePerArc | |||
| ) |
Definition at line 697 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, and r.
| TEST | ( | BoundedNegativeCycleTest | , |
| EqualCostArcsKeepTheLowestIndexInEveryTraversal | |||
| ) |
Definition at line 1015 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, Aleph::most_negative_cycle_bounded(), and r.
| TEST | ( | BoundedNegativeCycleTest | , |
| EqualCostParallelArcsKeepTheFirstInserted | |||
| ) |
| TEST | ( | BoundedNegativeCycleTest | , |
| FloatingWeightsAndArrayBackendWork | |||
| ) |
Definition at line 405 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), and Aleph::most_negative_cycle_bounded().
| TEST | ( | BoundedNegativeCycleTest | , |
| IntCostsWork | |||
| ) |
Definition at line 787 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph().
| TEST | ( | BoundedNegativeCycleTest | , |
| InvalidInputsThrow | |||
| ) |
| TEST | ( | BoundedNegativeCycleTest | , |
| LongDoubleCostsWork | |||
| ) |
Definition at line 793 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph().
| TEST | ( | BoundedNegativeCycleTest | , |
| MaxCostIsNotTreatedAsUnreachable | |||
| ) |
Definition at line 454 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::most_negative_cycle_bounded(), and r.
| TEST | ( | BoundedNegativeCycleTest | , |
| MaxLengthZeroDoesNotTouchTheGraph | |||
| ) |
Definition at line 329 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::has_cycle(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), Aleph::most_negative_cycle_bounded(), and r.
| TEST | ( | BoundedNegativeCycleTest | , |
| NonFiniteWeightsHiddenByTheFilterAreIgnored | |||
| ) |
Definition at line 715 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::most_negative_cycle_bounded(), and r.
| TEST | ( | BoundedNegativeCycleTest | , |
| NonNullCookiesAndBitsAreLeftUntouched | |||
| ) |
| TEST | ( | BoundedNegativeCycleTest | , |
| NonSimpleOptimalWalkIsDecomposedAndFlagged | |||
| ) |
Definition at line 268 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, Aleph::most_negative_cycle_bounded(), and r.
| TEST | ( | BoundedNegativeCycleTest | , |
| OneLoopAmongManyIsolatedNodes | |||
| ) |
| TEST | ( | BoundedNegativeCycleTest | , |
| OptimalCostDoesNotImplyFewestArcs | |||
| ) |
Definition at line 656 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, Aleph::most_negative_cycle_bounded(), and r.
| TEST | ( | BoundedNegativeCycleTest | , |
| OverflowOutsideTheCyclicCoreIsNotReported | |||
| ) |
Definition at line 997 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, Aleph::most_negative_cycle_bounded(), and r.
| TEST | ( | BoundedNegativeCycleTest | , |
| ParallelArcsUseTheCheapestOne | |||
| ) |
| TEST | ( | BoundedNegativeCycleTest | , |
| RandomGraphsAgreeWithExhaustiveOracle | |||
| ) |
Definition at line 840 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, Aleph::most_negative_cycle_bounded(), r, and rng.
| TEST | ( | BoundedNegativeCycleTest | , |
| RandomGraphsWithAcyclicFringesAgreeWithExhaustiveOracle | |||
| ) |
Definition at line 1076 of file bounded_negative_cycle_test.cc.
References Aleph::and, Negative_Cycles_Test_Support::build_graph(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, Aleph::most_negative_cycle_bounded(), r, and rng.
| TEST | ( | BoundedNegativeCycleTest | , |
| RanksByTotalCostUnlikeKarpMean | |||
| ) |
Definition at line 226 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, Aleph::karp_minimum_mean_cycle(), Aleph::most_negative_cycle_bounded(), and r.
| TEST | ( | BoundedNegativeCycleTest | , |
| ReportsTheCheapestCycleEvenWhenNotNegative | |||
| ) |
Definition at line 298 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, Aleph::most_negative_cycle_bounded(), and r.
| TEST | ( | BoundedNegativeCycleTest | , |
| SelfLoopIsALengthOneCycle | |||
| ) |
Definition at line 348 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, and Aleph::most_negative_cycle_bounded().
| TEST | ( | BoundedNegativeCycleTest | , |
| SelfLoopsDownstreamOfAComponentStayCyclic | |||
| ) |
| TEST | ( | BoundedNegativeCycleTest | , |
| SimpleMinimumExistsButCertificateIsFalse | |||
| ) |
Definition at line 675 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, Aleph::most_negative_cycle_bounded(), and r.
| TEST | ( | BoundedNegativeCycleTest | , |
| SingleNodeSelfLoops | |||
| ) |
Definition at line 749 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, Aleph::has_cycle(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), LL, Aleph::most_negative_cycle_bounded(), r, and w.
| TEST | ( | BoundedNegativeCycleTest | , |
| SumsAtTheEdgeOfTheExactRangeAreCertified | |||
| ) |
Definition at line 591 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::most_negative_cycle_bounded(), and r.
| TEST | ( | BoundedNegativeCycleTest | , |
| TheRoundingFilterKeepsCandidatesNearItsBound | |||
| ) |
Definition at line 571 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, Aleph::most_negative_cycle_bounded(), and r.
| TEST | ( | BoundedNegativeCycleTest | , |
| TiesPreferShorterCycles | |||
| ) |
Definition at line 255 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, Aleph::most_negative_cycle_bounded(), and r.
| TEST | ( | BoundedNegativeCycleTest | , |
| TriangleFoundWithBoundThreeButNotTwo | |||
| ) |
Definition at line 207 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Negative_Cycles_Test_Support::Built_Graph_T< GT >::g, and Aleph::most_negative_cycle_bounded().
| TEST | ( | BoundedNegativeCycleTest | , |
| TrivialInputsHaveNoCycle | |||
| ) |
Definition at line 312 of file bounded_negative_cycle_test.cc.
References Negative_Cycles_Test_Support::build_graph(), Aleph::has_cycle(), and Aleph::most_negative_cycle_bounded().