|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Tests for Tpl Net. More...
#include <gtest/gtest.h>#include <cmath>#include <limits>#include <random>#include <set>#include <vector>#include <tpl_dynDlist.H>#include <tpl_maxflow.H>#include <tpl_net.H>#include <tpl_net_sup_dem.H>#include <tpl_netcapgraph.H>#include <tpl_netcost.H>Go to the source code of this file.
Functions | |
| TEST (NetGraphBasics, SourcesSinksUpdateOnArcOperations) | |
| TEST (NetGraphBasics, DisconnectConnectArcUpdatesSets) | |
| TEST (NetGraphSuperNodes, MakeAndUnmakeSuperSource) | |
| TEST (NetGraphSuperNodes, MakeAndUnmakeSuperSink) | |
| TEST (NetGraphFlowAlgorithms, FordFulkersonAndEdmondsKarp) | |
| TEST (NetGraphFlowAlgorithms, PreflowVariants) | |
| TEST (NetGraphFlowAlgorithms, RandomPreflowWithASeedRepeatsItsPushes) | |
| TEST (NetGraphAugmentingPaths, IncreaseFlowOnPath) | |
| TEST (NetGraphAugmentingPaths, SemiPathAndIncreaseFlow) | |
| TEST (NetGraphResidualHelpers, RemainingFlowAndFilter) | |
| TEST (NetGraphResidualNet, UpdateFlowFromResidual) | |
| TEST (NetGraphMinCut, ComputesCutCapacity) | |
| TEST (NetGraphBasics, AnArcWithMoreFlowThanCapacityIsNotInserted) | |
| TEST (NetGraphBasics, CopiesANetworkWithAnArithmeticArcInfo) | |
| TEST (NetGraphAugmentingPaths, ASemiPathHasTheSlackItWasAskedFor) | |
| TEST (NetGraphAugmentingPaths, FloatingFlowsStayWithinTheirCapacities) | |
| TEST (NetGraphInfiniteFlows, EqualInfiniteFlowsBalanceAndUnequalOnesDoNot) | |
| TEST (NetGraphInfiniteFlows, TheAugmentingPathsReturnAnInfiniteMaximumFlow) | |
| TEST (NetGraphDerived, ASwapTellsItsTwoNetworks) | |
| TEST (NetGraphDerived, ASwapWithItselfTellsNothing) | |
| TEST (NetGraphDerived, ADisconnectionThroughTheBaseIsThatOfTheDerivedNetwork) | |
| TYPED_TEST_SUITE (NetDerivedChanged, Derived_Networks) | |
| TYPED_TEST (NetDerivedChanged, ItKnowsThatItsNodesWentThroughTheBase) | |
| TYPED_TEST (NetDerivedChanged, ItUsesNothingThatIsGoneAfterAChangeThroughTheBase) | |
Tests for Tpl Net.
Definition in file tpl_net_test.cc.
| TEST | ( | NetGraphAugmentingPaths | , |
| ASemiPathHasTheSlackItWasAskedFor | |||
| ) |
Definition at line 469 of file tpl_net_test.cc.
References Aleph::DynList< T >::get_first(), Aleph::Net_Graph< NodeT, ArcT >::insert_node(), nodes, Aleph::Find_Aumenting_Path< Net, Q >::semi_path(), and Aleph::DynList< T >::size().
| TEST | ( | NetGraphAugmentingPaths | , |
| FloatingFlowsStayWithinTheirCapacities | |||
| ) |
Definition at line 539 of file tpl_net_test.cc.
References Aleph::and, Aleph::dinic_maximum_flow(), Aleph::edmonds_karp_maximum_flow(), Aleph::ford_fulkerson_maximum_flow(), and seed.
| TEST | ( | NetGraphAugmentingPaths | , |
| IncreaseFlowOnPath | |||
| ) |
Definition at line 307 of file tpl_net_test.cc.
References Aleph::find_aumenting_path_dfs(), Aleph::increase_flow(), and nodes.
| TEST | ( | NetGraphAugmentingPaths | , |
| SemiPathAndIncreaseFlow | |||
| ) |
Definition at line 319 of file tpl_net_test.cc.
References Aleph::increase_flow(), Aleph::HTList::is_empty(), nodes, and Aleph::Find_Aumenting_Path< Net, Q >::semi_path().
| TEST | ( | NetGraphBasics | , |
| AnArcWithMoreFlowThanCapacityIsNotInserted | |||
| ) |
| TEST | ( | NetGraphBasics | , |
| CopiesANetworkWithAnArithmeticArcInfo | |||
| ) |
Definition at line 430 of file tpl_net_test.cc.
References Aleph::copy(), and Aleph::Net_Graph< NodeT, ArcT >::insert_node().
| TEST | ( | NetGraphBasics | , |
| DisconnectConnectArcUpdatesSets | |||
| ) |
Definition at line 132 of file tpl_net_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::connect_arc(), Aleph::Net_Graph< NodeT, ArcT >::disconnect_arc(), GraphCommon< GT, Node, Arc >::get_num_arcs(), Aleph::Net_Graph< NodeT, ArcT >::insert_arc(), Aleph::Net_Graph< NodeT, ArcT >::insert_node(), Aleph::Net_Graph< NodeT, ArcT >::is_sink(), and Aleph::Net_Graph< NodeT, ArcT >::is_source().
| TEST | ( | NetGraphBasics | , |
| SourcesSinksUpdateOnArcOperations | |||
| ) |
| TEST | ( | NetGraphDerived | , |
| ADisconnectionThroughTheBaseIsThatOfTheDerivedNetwork | |||
| ) |
Definition at line 678 of file tpl_net_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::connect_arc(), and Aleph::Net_Graph< NodeT, ArcT >::disconnect_arc().
| TEST | ( | NetGraphDerived | , |
| ASwapTellsItsTwoNetworks | |||
| ) |
Definition at line 638 of file tpl_net_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::swap().
| TEST | ( | NetGraphDerived | , |
| ASwapWithItselfTellsNothing | |||
| ) |
Definition at line 665 of file tpl_net_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::swap().
| TEST | ( | NetGraphFlowAlgorithms | , |
| FordFulkersonAndEdmondsKarp | |||
| ) |
Definition at line 221 of file tpl_net_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::check_network(), Aleph::edmonds_karp_maximum_flow(), Aleph::Net_Graph< NodeT, ArcT >::flow_value(), and Aleph::ford_fulkerson_maximum_flow().
| TEST | ( | NetGraphFlowAlgorithms | , |
| PreflowVariants | |||
| ) |
Definition at line 236 of file tpl_net_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::check_network(), Aleph::fifo_preflow_maximum_flow(), Aleph::heap_preflow_maximum_flow(), and Aleph::random_preflow_maximum_flow().
| TEST | ( | NetGraphFlowAlgorithms | , |
| RandomPreflowWithASeedRepeatsItsPushes | |||
| ) |
Definition at line 289 of file tpl_net_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::check_network(), Aleph::random_preflow_maximum_flow(), and seed.
| TEST | ( | NetGraphInfiniteFlows | , |
| EqualInfiniteFlowsBalanceAndUnequalOnesDoNot | |||
| ) |
Definition at line 569 of file tpl_net_test.cc.
| TEST | ( | NetGraphInfiniteFlows | , |
| TheAugmentingPathsReturnAnInfiniteMaximumFlow | |||
| ) |
Definition at line 594 of file tpl_net_test.cc.
References Aleph::edmonds_karp_maximum_flow(), Aleph::ford_fulkerson_maximum_flow(), and value.
| TEST | ( | NetGraphMinCut | , |
| ComputesCutCapacity | |||
| ) |
Definition at line 383 of file tpl_net_test.cc.
References Aleph::DynSetTree< Key, Tree, Compare >::contains(), Aleph::HTList::Iterator::has_curr(), nodes, and value.
| TEST | ( | NetGraphResidualHelpers | , |
| RemainingFlowAndFilter | |||
| ) |
Definition at line 335 of file tpl_net_test.cc.
References nodes.
| TEST | ( | NetGraphResidualNet | , |
| UpdateFlowFromResidual | |||
| ) |
Definition at line 357 of file tpl_net_test.cc.
References Aleph::preflow_create_residual_net(), and Aleph::update_flow().
| TEST | ( | NetGraphSuperNodes | , |
| MakeAndUnmakeSuperSink | |||
| ) |
Definition at line 186 of file tpl_net_test.cc.
References Aleph::Net_Graph< NodeT, ArcT >::get_in_degree(), GraphCommon< GT, Node, Arc >::get_num_nodes(), Aleph::Net_Graph< NodeT, ArcT >::get_sink(), Aleph::Net_Graph< NodeT, ArcT >::get_sink_nodes(), Aleph::Net_Graph< NodeT, ArcT >::insert_arc(), Aleph::Net_Graph< NodeT, ArcT >::insert_node(), Aleph::Net_Graph< NodeT, ArcT >::make_super_sink(), Aleph::Filter_Iterator< Container, It, Show_Item >::next_ne(), Aleph::DynSetTree< Key, Tree, Compare >::size(), and Aleph::Net_Graph< NodeT, ArcT >::unmake_super_sink().
| TEST | ( | NetGraphSuperNodes | , |
| MakeAndUnmakeSuperSource | |||
| ) |
Definition at line 150 of file tpl_net_test.cc.
References GraphCommon< GT, Node, Arc >::get_num_nodes(), Aleph::Net_Graph< NodeT, ArcT >::get_out_degree(), Aleph::Net_Graph< NodeT, ArcT >::get_sink_nodes(), Aleph::Net_Graph< NodeT, ArcT >::get_source(), Aleph::Net_Graph< NodeT, ArcT >::get_src_nodes(), Aleph::Net_Graph< NodeT, ArcT >::insert_arc(), Aleph::Net_Graph< NodeT, ArcT >::insert_node(), Aleph::Net_Graph< NodeT, ArcT >::make_super_source(), Aleph::Filter_Iterator< Container, It, Show_Item >::next_ne(), Aleph::DynSetTree< Key, Tree, Compare >::size(), and Aleph::Net_Graph< NodeT, ArcT >::unmake_super_source().
| TYPED_TEST | ( | NetDerivedChanged | , |
| ItKnowsThatItsNodesWentThroughTheBase | |||
| ) |
Definition at line 872 of file tpl_net_test.cc.
| TYPED_TEST | ( | NetDerivedChanged | , |
| ItUsesNothingThatIsGoneAfterAChangeThroughTheBase | |||
| ) |
Definition at line 932 of file tpl_net_test.cc.
References Aleph::clear_graph(), and Aleph::copy_graph().
| TYPED_TEST_SUITE | ( | NetDerivedChanged | , |
| Derived_Networks | |||
| ) |