|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Numeric contract of Negative_Cycles.H and Howard_Min_Mean_Cycle.H with floating-point weights, checked against an exact oracle. More...
#include <gtest/gtest.h>#include <gmp.h>#include <algorithm>#include <cmath>#include <functional>#include <limits>#include <random>#include <set>#include <tuple>#include <vector>#include <Howard_Min_Mean_Cycle.H>#include <Negative_Cycles.H>#include <tpl_graph.H>Go to the source code of this file.
Functions | |
| TEST (NegativeCyclesNumericTest, DoubleWeightsAgreeWithTheExactOracle) | |
| TEST (NegativeCyclesNumericTest, FloatWeightsAgreeWithTheExactOracle) | |
| TEST (NegativeCyclesNumericTest, LongDoubleWeightsAgreeWithTheExactOracle) | |
| TEST (NegativeCyclesNumericTest, ShortDoubleCyclesAgreeWithTheExactOracle) | |
| TEST (NegativeCyclesNumericTest, ShortFloatCyclesAgreeWithTheExactOracle) | |
| TEST (NegativeCyclesNumericTest, ShortLongDoubleCyclesAgreeWithTheExactOracle) | |
| TEST (NegativeCyclesNumericTest, ShortOptimaSurvivePermutationAndExactScaling) | |
| TEST (NegativeCyclesNumericTest, BoundedSearchIsInvariantUnderScalingByPowersOfTwo) | |
| TEST (NegativeCyclesNumericTest, CertifiedResultsDoNotDependOnArcOrNodeOrder) | |
| TEST (NegativeCyclesNumericTest, ExactUpperBoundBeyondTheRangeIsInfinity) | |
| TEST (NegativeCyclesNumericTest, ExactSumsNearTheLargestFiniteValueStayExact) | |
| TEST (NegativeCyclesNumericTest, TotalsBeyondTheRangeThrowWhateverTheEvaluationMethod) | |
Numeric contract of Negative_Cycles.H and Howard_Min_Mean_Cycle.H with floating-point weights, checked against an exact oracle.
The oracle enumerates the simple cycles of small graphs and adds their weights as exact rationals (the GMP C interface, so that it does not depend on the C++ ABI of gmpxx). It covers float, double and long double weights, subnormal values, cancellations across three binary scales, arc filters and disconnected components, and checks the invariance of the results under scaling by powers of two, the order of the arcs and the order of the nodes.
Definition in file negative_cycles_numeric_test.cc.
| TEST | ( | NegativeCyclesNumericTest | , |
| BoundedSearchIsInvariantUnderScalingByPowersOfTwo | |||
| ) |
Definition at line 626 of file negative_cycles_numeric_test.cc.
| TEST | ( | NegativeCyclesNumericTest | , |
| CertifiedResultsDoNotDependOnArcOrNodeOrder | |||
| ) |
Definition at line 668 of file negative_cycles_numeric_test.cc.
References Aleph::and, arcs, h, nodes, r, rng, and Aleph::shuffle().
| TEST | ( | NegativeCyclesNumericTest | , |
| DoubleWeightsAgreeWithTheExactOracle | |||
| ) |
Definition at line 548 of file negative_cycles_numeric_test.cc.
| TEST | ( | NegativeCyclesNumericTest | , |
| ExactSumsNearTheLargestFiniteValueStayExact | |||
| ) |
Definition at line 758 of file negative_cycles_numeric_test.cc.
References Aleph::find_disjoint_negative_cycles(), h, Aleph::howard_minimum_mean_cycle(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), max(), Aleph::most_negative_cycle_bounded(), and Aleph::most_negative_cycle_up_to_3().
| TEST | ( | NegativeCyclesNumericTest | , |
| ExactUpperBoundBeyondTheRangeIsInfinity | |||
| ) |
Definition at line 715 of file negative_cycles_numeric_test.cc.
References max().
| TEST | ( | NegativeCyclesNumericTest | , |
| FloatWeightsAgreeWithTheExactOracle | |||
| ) |
Definition at line 554 of file negative_cycles_numeric_test.cc.
| TEST | ( | NegativeCyclesNumericTest | , |
| LongDoubleWeightsAgreeWithTheExactOracle | |||
| ) |
Definition at line 560 of file negative_cycles_numeric_test.cc.
| TEST | ( | NegativeCyclesNumericTest | , |
| ShortDoubleCyclesAgreeWithTheExactOracle | |||
| ) |
Definition at line 566 of file negative_cycles_numeric_test.cc.
| TEST | ( | NegativeCyclesNumericTest | , |
| ShortFloatCyclesAgreeWithTheExactOracle | |||
| ) |
Definition at line 572 of file negative_cycles_numeric_test.cc.
| TEST | ( | NegativeCyclesNumericTest | , |
| ShortLongDoubleCyclesAgreeWithTheExactOracle | |||
| ) |
Definition at line 578 of file negative_cycles_numeric_test.cc.
| TEST | ( | NegativeCyclesNumericTest | , |
| ShortOptimaSurvivePermutationAndExactScaling | |||
| ) |
Definition at line 584 of file negative_cycles_numeric_test.cc.
| TEST | ( | NegativeCyclesNumericTest | , |
| TotalsBeyondTheRangeThrowWhateverTheEvaluationMethod | |||
| ) |