|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
#include <array>#include <string>#include <limits>#include <utility>#include <vector>#include <gtest/gtest.h>#include <tpl_mincost.H>#include <tpl_netcost.H>Go to the source code of this file.
Functions | |
| TEST (SSPTest, SimplePath) | |
| TEST (SSPTest, DiamondNetwork) | |
| TEST (SSPTest, CrossNetwork) | |
| TEST (SSPTest, ParallelPaths) | |
| TEST (SSPTest, LargeCosts) | |
| TEST (SSPTest, SingleArc) | |
| TEST (SSPTest, ZeroCapacity) | |
| TEST (SSPTest, FunctorInterface) | |
| TEST (SSPTest, CompareWithCycleCanceling) | |
| TEST (AlgorithmComparisonTest, SSP_vs_CycleCanceling_Diamond) | |
| TEST (AlgorithmComparisonTest, SSP_vs_CycleCanceling_CrossNetwork) | |
| TEST (PerformanceTest, SSP_vs_CycleCanceling_OnLargerNetwork) | |
| TEST (AssignmentTest, Basic3x3) | |
| TEST (AssignmentTest, Single1x1) | |
| TEST (AssignmentTest, Empty) | |
| TEST (AssignmentTest, Larger5x5) | |
| TEST (TransportationTest, Balanced) | |
| TEST (TransportationTest, Imbalanced) | |
| TEST (TransportationTest, Larger3x4) | |
| TEST (TransportationTest, NotSquareKeepsRowsColumnsAndCost) | |
| TEST (NegCycleTest, RejectsNegativeCycle) | |
| TEST (NegCycleTest, AcceptsNonNegativeCostNetwork) | |
| TEST (NegCycleTest, RejectsANegativeCycleApartFromTheSource) | |
| TEST (SSPTest, ASourceThatIsTheSinkEnds) | |
| TestNet | build_tenths_network (const std::vector< std::array< int, 4 > > &spec, int n) |
| TEST (SSPTest, DecimalCostsEnd) | |
| TEST (SSPTest, ASecondRunOfDecimalCostsFindsNoNegativeCycle) | |
| TEST (SSPTest, RunsOnTheCheapestFlowOfTheNetworkSimplex) | |
| TEST (SSPTest, DecimalCapacitiesStayWithinTheArcs) | |
| TEST (SSPTest, RefusesACycleOfCost1e7) | |
| TEST (SSPTest, RefusesAnInfiniteMaximumFlow) | |
| TEST (SSPTest, ReturnsTheResiduesOfItsPaths) | |
| TEST (SSPTest, ZeroDemandNodesHandledGracefully) | |
| TEST (AssignmentValidationTest, NonSquareMatrixThrows) | |
| TEST (AssignmentValidationTest, EmptyMatrixReturnsFeasible) | |
| TEST (TransportationValidationTest, MismatchedRowsThrows) | |
| TEST (TransportationValidationTest, MismatchedColumnsThrows) | |
| TEST (TransportationValidationTest, NegativeSupplyThrows) | |
| TEST (TransportationValidationTest, NegativeDemandThrows) | |
| TEST (TransportationValidationTest, EmptySuppliesNonemptyDemandsInfeasible) | |
| TEST (TransportationValidationTest, EmptySuppliesZeroDemandFeasible) | |
| TEST (TransportationValidationTest, BothEmptyFeasible) | |
| int | main (int argc, char **argv) |
| TestNet build_tenths_network | ( | const std::vector< std::array< int, 4 > > & | spec, |
| int | n | ||
| ) |
Definition at line 624 of file tpl_mincost_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::insert_arc(), Aleph::Net_Graph< NodeT, ArcT >::insert_node(), and nodes.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 905 of file tpl_mincost_test.cc.
| TEST | ( | AlgorithmComparisonTest | , |
| SSP_vs_CycleCanceling_CrossNetwork | |||
| ) |
Definition at line 296 of file tpl_mincost_test.cc.
References Aleph::max_flow_min_cost_by_cycle_canceling(), and Aleph::successive_shortest_paths().
| TEST | ( | AlgorithmComparisonTest | , |
| SSP_vs_CycleCanceling_Diamond | |||
| ) |
Definition at line 278 of file tpl_mincost_test.cc.
References Aleph::max_flow_min_cost_by_cycle_canceling(), and Aleph::successive_shortest_paths().
| TEST | ( | AssignmentTest | , |
| Basic3x3 | |||
| ) |
Definition at line 369 of file tpl_mincost_test.cc.
References Aleph::solve_assignment().
| TEST | ( | AssignmentTest | , |
| Empty | |||
| ) |
Definition at line 395 of file tpl_mincost_test.cc.
References Aleph::solve_assignment().
| TEST | ( | AssignmentTest | , |
| Larger5x5 | |||
| ) |
Definition at line 405 of file tpl_mincost_test.cc.
References Aleph::solve_assignment().
| TEST | ( | AssignmentTest | , |
| Single1x1 | |||
| ) |
Definition at line 384 of file tpl_mincost_test.cc.
References Aleph::solve_assignment().
| TEST | ( | AssignmentValidationTest | , |
| EmptyMatrixReturnsFeasible | |||
| ) |
Definition at line 831 of file tpl_mincost_test.cc.
References Aleph::solve_assignment().
| TEST | ( | AssignmentValidationTest | , |
| NonSquareMatrixThrows | |||
| ) |
Definition at line 825 of file tpl_mincost_test.cc.
References Aleph::solve_assignment().
| TEST | ( | NegCycleTest | , |
| AcceptsNonNegativeCostNetwork | |||
| ) |
Definition at line 566 of file tpl_mincost_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::insert_arc(), Aleph::Net_Graph< NodeT, ArcT >::insert_node(), and Aleph::successive_shortest_paths().
| TEST | ( | NegCycleTest | , |
| RejectsANegativeCycleApartFromTheSource | |||
| ) |
Definition at line 583 of file tpl_mincost_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::insert_arc(), Aleph::Net_Graph< NodeT, ArcT >::insert_node(), and Aleph::successive_shortest_paths().
| TEST | ( | NegCycleTest | , |
| RejectsNegativeCycle | |||
| ) |
Definition at line 547 of file tpl_mincost_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::insert_arc(), Aleph::Net_Graph< NodeT, ArcT >::insert_node(), and Aleph::successive_shortest_paths().
| TEST | ( | PerformanceTest | , |
| SSP_vs_CycleCanceling_OnLargerNetwork | |||
| ) |
Definition at line 316 of file tpl_mincost_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::insert_arc(), Aleph::Net_Graph< NodeT, ArcT >::insert_node(), Aleph::max_flow_min_cost_by_cycle_canceling(), nodes, and Aleph::successive_shortest_paths().
| TEST | ( | SSPTest | , |
| ASecondRunOfDecimalCostsFindsNoNegativeCycle | |||
| ) |
Definition at line 655 of file tpl_mincost_test.cc.
References build_tenths_network(), and Aleph::successive_shortest_paths().
| TEST | ( | SSPTest | , |
| ASourceThatIsTheSinkEnds | |||
| ) |
Definition at line 601 of file tpl_mincost_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::insert_arc(), Aleph::Net_Graph< NodeT, ArcT >::insert_node(), and Aleph::successive_shortest_paths().
| TEST | ( | SSPTest | , |
| CompareWithCycleCanceling | |||
| ) |
Definition at line 218 of file tpl_mincost_test.cc.
References Aleph::max_flow_min_cost_by_cycle_canceling(), and Aleph::successive_shortest_paths().
| TEST | ( | SSPTest | , |
| CrossNetwork | |||
| ) |
Definition at line 137 of file tpl_mincost_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::check_network(), and Aleph::successive_shortest_paths().
| TEST | ( | SSPTest | , |
| DecimalCapacitiesStayWithinTheArcs | |||
| ) |
| TEST | ( | SSPTest | , |
| DecimalCostsEnd | |||
| ) |
Definition at line 638 of file tpl_mincost_test.cc.
References build_tenths_network(), Aleph::Net_Graph< NodeT, ArcT >::check_network(), and Aleph::successive_shortest_paths().
| TEST | ( | SSPTest | , |
| DiamondNetwork | |||
| ) |
Definition at line 122 of file tpl_mincost_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::check_network(), and Aleph::successive_shortest_paths().
| TEST | ( | SSPTest | , |
| FunctorInterface | |||
| ) |
Definition at line 207 of file tpl_mincost_test.cc.
| TEST | ( | SSPTest | , |
| LargeCosts | |||
| ) |
Definition at line 165 of file tpl_mincost_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::insert_arc(), Aleph::Net_Graph< NodeT, ArcT >::insert_node(), and Aleph::successive_shortest_paths().
| TEST | ( | SSPTest | , |
| ParallelPaths | |||
| ) |
Definition at line 149 of file tpl_mincost_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::check_network(), and Aleph::successive_shortest_paths().
| TEST | ( | SSPTest | , |
| RefusesACycleOfCost1e7 | |||
| ) |
Definition at line 724 of file tpl_mincost_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::insert_arc(), Aleph::Net_Graph< NodeT, ArcT >::insert_node(), m, and Aleph::successive_shortest_paths().
| TEST | ( | SSPTest | , |
| RefusesAnInfiniteMaximumFlow | |||
| ) |
Definition at line 743 of file tpl_mincost_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::insert_arc(), Aleph::Net_Graph< NodeT, ArcT >::insert_node(), and Aleph::successive_shortest_paths().
| TEST | ( | SSPTest | , |
| ReturnsTheResiduesOfItsPaths | |||
| ) |
Definition at line 772 of file tpl_mincost_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::check_network(), Aleph::Net_Graph< NodeT, ArcT >::insert_arc(), Aleph::Net_Graph< NodeT, ArcT >::insert_node(), nodes, and Aleph::successive_shortest_paths().
| TEST | ( | SSPTest | , |
| RunsOnTheCheapestFlowOfTheNetworkSimplex | |||
| ) |
Definition at line 678 of file tpl_mincost_test.cc.
References build_tenths_network(), Aleph::Net_Graph< NodeT, ArcT >::check_network(), Aleph::Net_Graph< NodeT, ArcT >::flow_value(), Aleph::max_flow_min_cost_by_network_simplex(), and Aleph::successive_shortest_paths().
| TEST | ( | SSPTest | , |
| SimplePath | |||
| ) |
Definition at line 110 of file tpl_mincost_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::check_network(), and Aleph::successive_shortest_paths().
| TEST | ( | SSPTest | , |
| SingleArc | |||
| ) |
Definition at line 181 of file tpl_mincost_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::insert_arc(), Aleph::Net_Graph< NodeT, ArcT >::insert_node(), and Aleph::successive_shortest_paths().
| TEST | ( | SSPTest | , |
| ZeroCapacity | |||
| ) |
Definition at line 194 of file tpl_mincost_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::insert_arc(), Aleph::Net_Graph< NodeT, ArcT >::insert_node(), and Aleph::successive_shortest_paths().
| TEST | ( | SSPTest | , |
| ZeroDemandNodesHandledGracefully | |||
| ) |
Definition at line 808 of file tpl_mincost_test.cc.
References Aleph::solve_transportation().
| TEST | ( | TransportationTest | , |
| Balanced | |||
| ) |
Definition at line 427 of file tpl_mincost_test.cc.
References Aleph::solve_transportation().
| TEST | ( | TransportationTest | , |
| Imbalanced | |||
| ) |
Definition at line 442 of file tpl_mincost_test.cc.
References Aleph::solve_transportation().
| TEST | ( | TransportationTest | , |
| Larger3x4 | |||
| ) |
Definition at line 457 of file tpl_mincost_test.cc.
References Aleph::solve_transportation().
| TEST | ( | TransportationTest | , |
| NotSquareKeepsRowsColumnsAndCost | |||
| ) |
Definition at line 486 of file tpl_mincost_test.cc.
References row, and Aleph::solve_transportation().
| TEST | ( | TransportationValidationTest | , |
| BothEmptyFeasible | |||
| ) |
Definition at line 896 of file tpl_mincost_test.cc.
References Aleph::solve_transportation().
| TEST | ( | TransportationValidationTest | , |
| EmptySuppliesNonemptyDemandsInfeasible | |||
| ) |
Definition at line 876 of file tpl_mincost_test.cc.
References Aleph::solve_transportation().
| TEST | ( | TransportationValidationTest | , |
| EmptySuppliesZeroDemandFeasible | |||
| ) |
Definition at line 886 of file tpl_mincost_test.cc.
References Aleph::solve_transportation().
| TEST | ( | TransportationValidationTest | , |
| MismatchedColumnsThrows | |||
| ) |
Definition at line 849 of file tpl_mincost_test.cc.
References Aleph::solve_transportation().
| TEST | ( | TransportationValidationTest | , |
| MismatchedRowsThrows | |||
| ) |
Definition at line 840 of file tpl_mincost_test.cc.
References Aleph::solve_transportation().
| TEST | ( | TransportationValidationTest | , |
| NegativeDemandThrows | |||
| ) |
Definition at line 866 of file tpl_mincost_test.cc.
References Aleph::solve_transportation().
| TEST | ( | TransportationValidationTest | , |
| NegativeSupplyThrows | |||
| ) |
Definition at line 858 of file tpl_mincost_test.cc.
References Aleph::solve_transportation().