|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Tests for Karp minimum mean cycle implementation. More...
#include <gtest/gtest.h>#include <cmath>#include <functional>#include <limits>#include <random>#include <tuple>#include <vector>#include <Min_Mean_Cycle.H>#include <tpl_agraph.H>#include <tpl_graph.H>Go to the source code of this file.
Functions | |
| TEST (MinMeanCycleTest, EmptyDigraphReturnsNoCycle) | |
| TEST (MinMeanCycleTest, DagReturnsNoCycle) | |
| TEST (MinMeanCycleTest, SelfLoopCanBeOptimalCycle) | |
| TEST (MinMeanCycleTest, ChoosesMinimumAmongMultipleCycles) | |
| TEST (MinMeanCycleTest, SupportsNegativeMeanCycles) | |
| TEST (MinMeanCycleTest, ArcFilterChangesResult) | |
| TEST (MinMeanCycleTest, AccessorIsReadOncePerAcceptedArc) | |
| TEST (MinMeanCycleTest, WitnessMeansAreComparedExactly) | |
| TEST (MinMeanCycleTest, TableBytesAreTheBytesArrayReserves) | |
| TEST (MinMeanCycleTest, WitnessIsASimpleCycle) | |
| TEST (MinMeanCycleTest, FloatingWeightsAndValueOnlyApiWork) | |
| TEST (MinMeanCycleTest, NonFiniteFloatingWeightsThrowDomainError) | |
| TEST (MinMeanCycleTest, IntegerOverflowInAccumulationThrows) | |
| TEST (MinMeanCycleTest, SumsBeyondTheCostTypeAreExact) | |
| TEST (MinMeanCycleTest, BoundedSumsMayReachOneBelowTheSentinel) | |
| TEST (MinMeanCycleTest, AMinimumMeanCycleWhoseCostFitsIsPreferred) | |
| TEST (MinMeanCycleTest, SupportsArrayDigraphBackend) | |
| TEST (MinMeanCycleTest, FunctorAndAliasMatchFreeFunction) | |
| TEST (MinMeanCycleTest, UndirectedGraphThrowsDomainError) | |
| TEST (MinMeanCycleTest, RandomSmallGraphsMatchExactOracle) | |
Tests for Karp minimum mean cycle implementation.
Definition in file min_mean_cycle_test.cc.
| TEST | ( | MinMeanCycleTest | , |
| AccessorIsReadOncePerAcceptedArc | |||
| ) |
Definition at line 315 of file min_mean_cycle_test.cc.
References Aleph::filter(), and value.
| TEST | ( | MinMeanCycleTest | , |
| AMinimumMeanCycleWhoseCostFitsIsPreferred | |||
| ) |
Definition at line 622 of file min_mean_cycle_test.cc.
References Aleph::karp_minimum_mean_cycle(), Aleph::karp_minimum_mean_cycle_value(), Aleph::Min_Mean_Cycle_Value_Result::minimum_mean, and r.
| TEST | ( | MinMeanCycleTest | , |
| ArcFilterChangesResult | |||
| ) |
Definition at line 293 of file min_mean_cycle_test.cc.
References Aleph::filter(), and Aleph::karp_minimum_mean_cycle().
| TEST | ( | MinMeanCycleTest | , |
| BoundedSumsMayReachOneBelowTheSentinel | |||
| ) |
Definition at line 608 of file min_mean_cycle_test.cc.
References Aleph::Min_Mean_Cycle_Value_Result::has_cycle, Aleph::karp_minimum_mean_cycle(), Aleph::karp_minimum_mean_cycle_value(), r, and w.
| TEST | ( | MinMeanCycleTest | , |
| ChoosesMinimumAmongMultipleCycles | |||
| ) |
Definition at line 260 of file min_mean_cycle_test.cc.
References Aleph::karp_minimum_mean_cycle(), and r.
| TEST | ( | MinMeanCycleTest | , |
| DagReturnsNoCycle | |||
| ) |
Definition at line 228 of file min_mean_cycle_test.cc.
References Aleph::karp_minimum_mean_cycle(), and r.
| TEST | ( | MinMeanCycleTest | , |
| EmptyDigraphReturnsNoCycle | |||
| ) |
Definition at line 216 of file min_mean_cycle_test.cc.
References Aleph::karp_minimum_mean_cycle(), and r.
| TEST | ( | MinMeanCycleTest | , |
| FloatingWeightsAndValueOnlyApiWork | |||
| ) |
Definition at line 501 of file min_mean_cycle_test.cc.
References Aleph::karp_minimum_mean_cycle(), Aleph::karp_minimum_mean_cycle_value(), Aleph::minimum_mean_cycle_value(), and value.
| TEST | ( | MinMeanCycleTest | , |
| FunctorAndAliasMatchFreeFunction | |||
| ) |
Definition at line 682 of file min_mean_cycle_test.cc.
References Aleph::karp_minimum_mean_cycle(), and Aleph::minimum_mean_cycle().
| TEST | ( | MinMeanCycleTest | , |
| IntegerOverflowInAccumulationThrows | |||
| ) |
Definition at line 548 of file min_mean_cycle_test.cc.
References Aleph::karp_minimum_mean_cycle(), Aleph::karp_minimum_mean_cycle_value(), and value.
| TEST | ( | MinMeanCycleTest | , |
| NonFiniteFloatingWeightsThrowDomainError | |||
| ) |
Definition at line 527 of file min_mean_cycle_test.cc.
References Aleph::karp_minimum_mean_cycle(), and Aleph::karp_minimum_mean_cycle_value().
| TEST | ( | MinMeanCycleTest | , |
| RandomSmallGraphsMatchExactOracle | |||
| ) |
Definition at line 720 of file min_mean_cycle_test.cc.
References Aleph::karp_minimum_mean_cycle(), Aleph::karp_minimum_mean_cycle_value(), and rng.
| TEST | ( | MinMeanCycleTest | , |
| SelfLoopCanBeOptimalCycle | |||
| ) |
Definition at line 242 of file min_mean_cycle_test.cc.
References Aleph::karp_minimum_mean_cycle(), and r.
| TEST | ( | MinMeanCycleTest | , |
| SumsBeyondTheCostTypeAreExact | |||
| ) |
Definition at line 570 of file min_mean_cycle_test.cc.
References Aleph::karp_minimum_mean_cycle(), Aleph::karp_minimum_mean_cycle_value(), max(), Aleph::Min_Mean_Cycle_Value_Result::minimum_mean, and r.
| TEST | ( | MinMeanCycleTest | , |
| SupportsArrayDigraphBackend | |||
| ) |
Definition at line 664 of file min_mean_cycle_test.cc.
References Aleph::karp_minimum_mean_cycle(), Aleph::karp_minimum_mean_cycle_value(), and r.
| TEST | ( | MinMeanCycleTest | , |
| SupportsNegativeMeanCycles | |||
| ) |
Definition at line 277 of file min_mean_cycle_test.cc.
References Aleph::karp_minimum_mean_cycle(), and r.
| TEST | ( | MinMeanCycleTest | , |
| TableBytesAreTheBytesArrayReserves | |||
| ) |
Definition at line 377 of file min_mean_cycle_test.cc.
References Aleph::Array< T >::append(), and w.
| TEST | ( | MinMeanCycleTest | , |
| UndirectedGraphThrowsDomainError | |||
| ) |
Definition at line 709 of file min_mean_cycle_test.cc.
References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), and Aleph::karp_minimum_mean_cycle().
| TEST | ( | MinMeanCycleTest | , |
| WitnessIsASimpleCycle | |||
| ) |
Definition at line 431 of file min_mean_cycle_test.cc.
References check(), GraphCommon< GT, Node, Arc >::get_src_node(), GraphCommon< GT, Node, Arc >::get_tgt_node(), Aleph::karp_minimum_mean_cycle(), m, Aleph::mean(), nodes, r, rng, Aleph::sum(), and w.
| TEST | ( | MinMeanCycleTest | , |
| WitnessMeansAreComparedExactly | |||
| ) |
Definition at line 350 of file min_mean_cycle_test.cc.
References Aleph::min_mean_cycle_detail::mean_less().