|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Comprehensive tests for Net_Sup_Dem_Graph class. More...
#include <gtest/gtest.h>#include <tpl_net_sup_dem.H>#include <tpl_maxflow.H>#include <tpl_dynDlist.H>#include <limits>#include <random>#include <string>Go to the source code of this file.
Classes | |
| class | NetSupDemNodeTest |
| class | NetSupDemGraphTest |
| class | AuxNetTest |
| class | FeasibilityTest |
| class | StringNetTest |
Typedefs | |
| using | SimpleNode = Net_Sup_Dem_Node< Empty_Class, int > |
| using | SimpleArc = Net_Arc< Empty_Class, int > |
| using | SimpleNet = Net_Sup_Dem_Graph< SimpleNode, SimpleArc > |
| using | StringNode = Net_Sup_Dem_Node< std::string, double > |
| using | StringArc = Net_Arc< std::string, double > |
| using | StringNet = Net_Sup_Dem_Graph< StringNode, StringArc > |
Functions | |
| TEST_F (NetSupDemNodeTest, DefaultConstructor) | |
| TEST_F (NetSupDemNodeTest, InfoConstructor) | |
| TEST_F (NetSupDemNodeTest, CopyFromPointer) | |
| TEST_F (NetSupDemNodeTest, GetSupplyFlowModifiable) | |
| TEST_F (NetSupDemGraphTest, DefaultConstructor) | |
| TEST_F (NetSupDemGraphTest, InsertNodeWithSupply) | |
| TEST_F (NetSupDemGraphTest, InsertNodeWithDemand) | |
| TEST_F (NetSupDemGraphTest, InsertTransitNode) | |
| TEST_F (NetSupDemGraphTest, CountSupplyNodes) | |
| TEST_F (NetSupDemGraphTest, CountDemandNodes) | |
| TEST_F (NetSupDemGraphTest, TotalSupply) | |
| TEST_F (NetSupDemGraphTest, TotalDemand) | |
| TEST_F (NetSupDemGraphTest, IsBalanced) | |
| TEST_F (NetSupDemGraphTest, IsNotBalanced) | |
| TEST_F (NetSupDemGraphTest, SetSupplyFlow) | |
| TEST_F (NetSupDemGraphTest, SetDemandFlow) | |
| TEST_F (NetSupDemGraphTest, SetSupplyFlowExceedsCapacityThrows) | |
| TEST_F (NetSupDemGraphTest, SetDemandFlowExceedsCapacityThrows) | |
| TEST_F (AuxNetTest, ComputeAuxNet) | |
| TEST_F (AuxNetTest, ComputeAuxNetTwiceThrows) | |
| TEST_F (AuxNetTest, GetAuxNetBeforeCompute) | |
| TEST_F (AuxNetTest, GetAuxNetAfterCompute) | |
| TEST_F (AuxNetTest, FreeAuxNet) | |
| TEST_F (AuxNetTest, FreeAuxNetWithoutComputeThrows) | |
| TEST_F (AuxNetTest, IsFeasibleWithoutAuxNetThrows) | |
| TEST_F (FeasibilityTest, EmptyNetworkIsFeasible) | |
| TEST_F (FeasibilityTest, SupplyOnlyNetworkIsNotFeasible) | |
| TEST_F (FeasibilityTest, SupplyNotMeetingFlowRequirement) | |
| TEST_F (FeasibilityTest, DemandOnlyNetworkIsNotFeasible) | |
| TEST_F (FeasibilityTest, DemandNotMet) | |
| TEST_F (FeasibilityTest, MixedSupplyDemandFeasible) | |
| TEST_F (FeasibilityTest, MixedSupplyDemandNotFeasible) | |
| TEST_F (FeasibilityTest, NonFeasibleSupplyNodes) | |
| TEST_F (FeasibilityTest, NonFeasibleDemandNodes) | |
| TEST_F (FeasibilityTest, MultipleMixedNonFeasibleNodes) | |
| TEST_F (NetSupDemGraphTest, SupplyExceedsOutCapacityThrows) | |
| TEST_F (NetSupDemGraphTest, DemandExceedsInCapacityThrows) | |
| TEST_F (NetSupDemGraphTest, OnlySupplyNodes) | |
| TEST_F (NetSupDemGraphTest, OnlyDemandNodes) | |
| TEST_F (NetSupDemGraphTest, OnlyTransitNodes) | |
| TEST_F (NetSupDemGraphTest, ZeroSupplyValue) | |
| TEST_F (StringNetTest, InsertNodeWithStringInfo) | |
| TEST_F (StringNetTest, DoubleFlowValues) | |
| TEST (NetSupDemDestructorTest, DestructorFreesAuxNet) | |
| TEST (IntegrationTest, CompleteWorkflow) | |
| TEST (FloatingFeasibilityTest, AFlowOfTenthsIsFeasible) | |
| TEST (FloatingFeasibilityTest, TheDemandsOfASupplyInTenthsAreMet) | |
| TEST (FloatingFeasibilityTest, ARealDeficitIsNotMet) | |
| TEST (FloatingFeasibilityTest, FeasibleInstancesInTenthsAreFeasible) | |
| TEST (FloatingFeasibilityTest, AnInfiniteSupplyIsMetOnlyByAnInfiniteFlow) | |
| TEST (NetSupDemChangedNetwork, AnExchangeThroughTheBaseTakesTheSuperNodesAway) | |
| TEST (NetSupDemChangedNetwork, ARemovedSuperNodeIsForgotten) | |
| TEST (NetSupDemChangedNetwork, AnotherNodeRemovedIsNoneOfThem) | |
| TEST (NetSupDemChangedNetwork, ClearGraphAndCopyGraphTakeTheSuperNodesAway) | |
| TEST (NetSupDemChangedNetwork, AChangeThatLeavesTheSuperNodesKeepsThem) | |
| TEST (NetSupDemChangedNetwork, ItsOwnSwapMovesAndCopiesTakeTheSuperNodesAlong) | |
| TEST (NetSupDemChangedNetwork, WithoutASuperNodeNoSupplyNorDemandIsMet) | |
| int | main (int argc, char **argv) |
Comprehensive tests for Net_Sup_Dem_Graph class.
Definition in file net_sup_dem_test.cc.
| using SimpleArc = Net_Arc<Empty_Class, int> |
Definition at line 54 of file net_sup_dem_test.cc.
| using SimpleNet = Net_Sup_Dem_Graph<SimpleNode, SimpleArc> |
Definition at line 55 of file net_sup_dem_test.cc.
| using SimpleNode = Net_Sup_Dem_Node<Empty_Class, int> |
Definition at line 53 of file net_sup_dem_test.cc.
Definition at line 59 of file net_sup_dem_test.cc.
| using StringNet = Net_Sup_Dem_Graph<StringNode, StringArc> |
Definition at line 60 of file net_sup_dem_test.cc.
| using StringNode = Net_Sup_Dem_Node<std::string, double> |
Definition at line 58 of file net_sup_dem_test.cc.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 1401 of file net_sup_dem_test.cc.
| TEST | ( | FloatingFeasibilityTest | , |
| AFlowOfTenthsIsFeasible | |||
| ) |
Definition at line 686 of file net_sup_dem_test.cc.
References Aleph::edmonds_karp_maximum_flow(), Aleph::ford_fulkerson_maximum_flow(), Aleph::Net_Graph< NodeT, ArcT >::insert_arc(), and Aleph::Net_Graph< NodeT, ArcT >::insert_node().
| TEST | ( | FloatingFeasibilityTest | , |
| AnInfiniteSupplyIsMetOnlyByAnInfiniteFlow | |||
| ) |
Definition at line 899 of file net_sup_dem_test.cc.
References Aleph::and, Aleph::DynDlist< T >::get_first(), and Aleph::DynDlist< T >::size().
| TEST | ( | FloatingFeasibilityTest | , |
| ARealDeficitIsNotMet | |||
| ) |
Definition at line 757 of file net_sup_dem_test.cc.
References Aleph::DynDlist< T >::get_first(), and Aleph::DynDlist< T >::size().
| TEST | ( | FloatingFeasibilityTest | , |
| FeasibleInstancesInTenthsAreFeasible | |||
| ) |
Definition at line 804 of file net_sup_dem_test.cc.
References Aleph::Array< T >::append(), arcs, Aleph::edmonds_karp_maximum_flow(), k, nodes, and r.
| TEST | ( | FloatingFeasibilityTest | , |
| TheDemandsOfASupplyInTenthsAreMet | |||
| ) |
Definition at line 733 of file net_sup_dem_test.cc.
References Aleph::Dlink::is_empty().
| TEST | ( | IntegrationTest | , |
| CompleteWorkflow | |||
| ) |
Definition at line 633 of file net_sup_dem_test.cc.
References Aleph::edmonds_karp_maximum_flow(), Aleph::Net_Sup_Dem_Graph< NodeT, ArcT >::insert_node(), and Aleph::Dlink::is_empty().
| TEST | ( | NetSupDemChangedNetwork | , |
| AChangeThatLeavesTheSuperNodesKeepsThem | |||
| ) |
Definition at line 1177 of file net_sup_dem_test.cc.
References Aleph::DynDlist< T >::append(), and arcs.
| TEST | ( | NetSupDemChangedNetwork | , |
| AnExchangeThroughTheBaseTakesTheSuperNodesAway | |||
| ) |
Definition at line 1047 of file net_sup_dem_test.cc.
| TEST | ( | NetSupDemChangedNetwork | , |
| AnotherNodeRemovedIsNoneOfThem | |||
| ) |
Definition at line 1134 of file net_sup_dem_test.cc.
| TEST | ( | NetSupDemChangedNetwork | , |
| ARemovedSuperNodeIsForgotten | |||
| ) |
Definition at line 1113 of file net_sup_dem_test.cc.
| TEST | ( | NetSupDemChangedNetwork | , |
| ClearGraphAndCopyGraphTakeTheSuperNodesAway | |||
| ) |
Definition at line 1154 of file net_sup_dem_test.cc.
References Aleph::clear_graph(), and Aleph::copy_graph().
| TEST | ( | NetSupDemChangedNetwork | , |
| ItsOwnSwapMovesAndCopiesTakeTheSuperNodesAlong | |||
| ) |
Definition at line 1273 of file net_sup_dem_test.cc.
References Aleph::copy().
| TEST | ( | NetSupDemChangedNetwork | , |
| WithoutASuperNodeNoSupplyNorDemandIsMet | |||
| ) |
Definition at line 1368 of file net_sup_dem_test.cc.
References Aleph::and, and Aleph::edmonds_karp_maximum_flow().
| TEST | ( | NetSupDemDestructorTest | , |
| DestructorFreesAuxNet | |||
| ) |
Definition at line 612 of file net_sup_dem_test.cc.
| TEST_F | ( | AuxNetTest | , |
| ComputeAuxNet | |||
| ) |
Definition at line 271 of file net_sup_dem_test.cc.
| TEST_F | ( | AuxNetTest | , |
| ComputeAuxNetTwiceThrows | |||
| ) |
Definition at line 283 of file net_sup_dem_test.cc.
| TEST_F | ( | AuxNetTest | , |
| FreeAuxNet | |||
| ) |
Definition at line 301 of file net_sup_dem_test.cc.
| TEST_F | ( | AuxNetTest | , |
| FreeAuxNetWithoutComputeThrows | |||
| ) |
Definition at line 313 of file net_sup_dem_test.cc.
| TEST_F | ( | AuxNetTest | , |
| GetAuxNetAfterCompute | |||
| ) |
Definition at line 295 of file net_sup_dem_test.cc.
| TEST_F | ( | AuxNetTest | , |
| GetAuxNetBeforeCompute | |||
| ) |
Definition at line 290 of file net_sup_dem_test.cc.
| TEST_F | ( | AuxNetTest | , |
| IsFeasibleWithoutAuxNetThrows | |||
| ) |
Definition at line 318 of file net_sup_dem_test.cc.
| TEST_F | ( | FeasibilityTest | , |
| DemandNotMet | |||
| ) |
Definition at line 385 of file net_sup_dem_test.cc.
References Aleph::edmonds_karp_maximum_flow().
| TEST_F | ( | FeasibilityTest | , |
| DemandOnlyNetworkIsNotFeasible | |||
| ) |
Definition at line 376 of file net_sup_dem_test.cc.
| TEST_F | ( | FeasibilityTest | , |
| EmptyNetworkIsFeasible | |||
| ) |
Definition at line 333 of file net_sup_dem_test.cc.
References Aleph::Net_Sup_Dem_Graph< NodeT, ArcT >::insert_node().
| TEST_F | ( | FeasibilityTest | , |
| MixedSupplyDemandFeasible | |||
| ) |
Definition at line 397 of file net_sup_dem_test.cc.
References Aleph::edmonds_karp_maximum_flow().
| TEST_F | ( | FeasibilityTest | , |
| MixedSupplyDemandNotFeasible | |||
| ) |
Definition at line 413 of file net_sup_dem_test.cc.
References Aleph::edmonds_karp_maximum_flow().
| TEST_F | ( | FeasibilityTest | , |
| MultipleMixedNonFeasibleNodes | |||
| ) |
Definition at line 476 of file net_sup_dem_test.cc.
References Aleph::edmonds_karp_maximum_flow(), and Aleph::DynDlist< T >::size().
| TEST_F | ( | FeasibilityTest | , |
| NonFeasibleDemandNodes | |||
| ) |
Definition at line 454 of file net_sup_dem_test.cc.
References Aleph::edmonds_karp_maximum_flow(), Aleph::DynDlist< T >::get_first(), and Aleph::DynDlist< T >::size().
| TEST_F | ( | FeasibilityTest | , |
| NonFeasibleSupplyNodes | |||
| ) |
Definition at line 432 of file net_sup_dem_test.cc.
References Aleph::edmonds_karp_maximum_flow(), Aleph::DynDlist< T >::get_first(), and Aleph::DynDlist< T >::size().
| TEST_F | ( | FeasibilityTest | , |
| SupplyNotMeetingFlowRequirement | |||
| ) |
Definition at line 363 of file net_sup_dem_test.cc.
References Aleph::edmonds_karp_maximum_flow().
| TEST_F | ( | FeasibilityTest | , |
| SupplyOnlyNetworkIsNotFeasible | |||
| ) |
Definition at line 354 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemGraphTest | , |
| CountDemandNodes | |||
| ) |
Definition at line 152 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemGraphTest | , |
| CountSupplyNodes | |||
| ) |
Definition at line 142 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemGraphTest | , |
| DefaultConstructor | |||
| ) |
Definition at line 111 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemGraphTest | , |
| DemandExceedsInCapacityThrows | |||
| ) |
Definition at line 513 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemGraphTest | , |
| InsertNodeWithDemand | |||
| ) |
Definition at line 125 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemGraphTest | , |
| InsertNodeWithSupply | |||
| ) |
Definition at line 118 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemGraphTest | , |
| InsertTransitNode | |||
| ) |
Definition at line 132 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemGraphTest | , |
| IsBalanced | |||
| ) |
Definition at line 180 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemGraphTest | , |
| IsNotBalanced | |||
| ) |
Definition at line 189 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemGraphTest | , |
| OnlyDemandNodes | |||
| ) |
Definition at line 541 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemGraphTest | , |
| OnlySupplyNodes | |||
| ) |
Definition at line 526 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemGraphTest | , |
| OnlyTransitNodes | |||
| ) |
Definition at line 556 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemGraphTest | , |
| SetDemandFlow | |||
| ) |
Definition at line 210 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemGraphTest | , |
| SetDemandFlowExceedsCapacityThrows | |||
| ) |
Definition at line 227 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemGraphTest | , |
| SetSupplyFlow | |||
| ) |
Definition at line 201 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemGraphTest | , |
| SetSupplyFlowExceedsCapacityThrows | |||
| ) |
Definition at line 219 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemGraphTest | , |
| SupplyExceedsOutCapacityThrows | |||
| ) |
Definition at line 504 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemGraphTest | , |
| TotalDemand | |||
| ) |
Definition at line 171 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemGraphTest | , |
| TotalSupply | |||
| ) |
Definition at line 162 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemGraphTest | , |
| ZeroSupplyValue | |||
| ) |
Definition at line 571 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemNodeTest | , |
| CopyFromPointer | |||
| ) |
Definition at line 85 of file net_sup_dem_test.cc.
References Aleph::copy().
| TEST_F | ( | NetSupDemNodeTest | , |
| DefaultConstructor | |||
| ) |
Definition at line 72 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemNodeTest | , |
| GetSupplyFlowModifiable | |||
| ) |
Definition at line 94 of file net_sup_dem_test.cc.
| TEST_F | ( | NetSupDemNodeTest | , |
| InfoConstructor | |||
| ) |
Definition at line 79 of file net_sup_dem_test.cc.
| TEST_F | ( | StringNetTest | , |
| DoubleFlowValues | |||
| ) |
Definition at line 596 of file net_sup_dem_test.cc.
| TEST_F | ( | StringNetTest | , |
| InsertNodeWithStringInfo | |||
| ) |
Definition at line 589 of file net_sup_dem_test.cc.
References Aleph::Net_Sup_Dem_Graph< NodeT, ArcT >::insert_node().