|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Tests for Bipartite. More...
Go to the source code of this file.
Typedefs | |
| using | Graph = List_Graph< Graph_Node< int >, Graph_Arc< Empty_Class > > |
Functions | |
| Graph | create_complete_bipartite (size_t m, size_t n) |
| Creates a complete bipartite graph K_{m,n} Left partition: nodes 0..m-1 Right partition: nodes m..m+n-1. | |
| Graph | create_path_graph (size_t n) |
| Creates a path graph with n nodes: 0–1–2–...–n-1 Path graphs are always bipartite. | |
| Graph | create_cycle_graph (size_t n) |
| Creates a cycle graph with n nodes: 0–1–2–...–n-1–0 Even cycles are bipartite, odd cycles are not. | |
| Graph | create_star_graph (size_t n) |
| Creates a star graph with center and n leaves Star graphs are always bipartite. | |
| Graph | create_triangle () |
| Creates a triangle (K_3) - the simplest non-bipartite graph. | |
| Graph | create_disconnected_bipartite () |
| Creates two disconnected components. | |
| bool | verify_bipartition (const Graph &g, const DynDlist< Graph::Node * > &l, const DynDlist< Graph::Node * > &r) |
| Verifies that a bipartition is valid: | |
| bool | verify_matching (const Graph &g, const DynDlist< Graph::Arc * > &matching) |
| Verifies that a matching is valid: | |
| TEST (Bipartite, EmptyGraphReturnsEmpty) | |
| TEST (Bipartite, SingleNode) | |
| TEST (Bipartite, TwoConnectedNodes) | |
| TEST (Bipartite, PathGraphEven) | |
| TEST (Bipartite, PathGraphOdd) | |
| TEST (Bipartite, StarGraph) | |
| TEST (Bipartite, CompleteBipartiteK22) | |
| TEST (Bipartite, CompleteBipartiteK33) | |
| TEST (Bipartite, CompleteBipartiteK25) | |
| TEST (Bipartite, EvenCycle) | |
| TEST (Bipartite, TriangleThrows) | |
| TEST (Bipartite, OddCycleThrows) | |
| TEST (Bipartite, LargeOddCycleThrows) | |
| TEST (Bipartite, CompleteGraphK3Throws) | |
| TEST (Bipartite, GraphWithOddCycleAttached) | |
| TEST (Bipartite, TwoDisconnectedNodes) | |
| TEST (Bipartite, DisconnectedBipartiteComponents) | |
| TEST (ComputeBipartiteClass, BasicUsage) | |
| TEST (ComputeBipartiteClass, ThrowsOnNonBipartite) | |
| TEST (MaximumMatching, EmptyGraphReturnsEmpty) | |
| TEST (MaximumMatching, SingleEdge) | |
| TEST (MaximumMatching, PathGraph4) | |
| TEST (MaximumMatching, PathGraph5) | |
| TEST (MaximumMatching, CompleteBipartiteK22) | |
| TEST (MaximumMatching, CompleteBipartiteK33) | |
| TEST (MaximumMatching, CompleteBipartiteK55) | |
| TEST (MaximumMatching, UnbalancedK25) | |
| TEST (MaximumMatching, UnbalancedK52) | |
| TEST (MaximumMatching, StarGraph) | |
| TEST (MaximumMatching, EvenCycle) | |
| TEST (MaximumMatching, ThrowsOnNonBipartite) | |
| TEST (MaximumMatchingClass, BasicUsage) | |
| TEST (MaximumMatchingClass, ThrowsOnNonBipartite) | |
| TEST (BipartiteStress, LargeBipartiteGraph) | |
| TEST (BipartiteStress, LargePathGraph) | |
| TEST (MaximumMatchingStress, LargeMatching) | |
| TEST (BipartiteStress, LargeEvenCycle) | |
| TEST (Bipartite, MultipleEdgesBetweenSameNodes) | |
| TEST (Bipartite, IsolatedNodeWithBipartiteComponent) | |
| TEST (BipartiteColor, EnumValues) | |
| TEST (HopcroftKarp, EmptyGraph) | |
| TEST (HopcroftKarp, SingleIsolatedNode) | |
| TEST (HopcroftKarp, SingleEdge) | |
| TEST (HopcroftKarp, PathGraph4) | |
| TEST (HopcroftKarp, PathGraph5) | |
| TEST (HopcroftKarp, CompleteBipartiteK22) | |
| TEST (HopcroftKarp, CompleteBipartiteK33) | |
| TEST (HopcroftKarp, CompleteBipartiteK55) | |
| TEST (HopcroftKarp, UnbalancedK25) | |
| TEST (HopcroftKarp, StarGraph) | |
| TEST (HopcroftKarp, EvenCycle6) | |
| TEST (HopcroftKarp, TriangleThrows) | |
| TEST (HopcroftKarp, OddCycleThrows) | |
| TEST (HopcroftKarp, TwoDisconnectedEdges) | |
| TEST (HopcroftKarp, DisconnectedWithIsolatedNodes) | |
| TEST (HopcroftKarp, TwoDisconnectedCompleteBipartite) | |
| TEST (HopcroftKarp, CrossValidateK44) | |
| TEST (HopcroftKarp, CrossValidatePath6) | |
| TEST (HopcroftKarp, CrossValidateEvenCycle8) | |
| TEST (HopcroftKarp, FunctorWrapper) | |
| TEST (HopcroftKarp, FunctorMatchesFreeFunction) | |
| TEST (HopcroftKarp, StressK50_50) | |
| TEST (HopcroftKarp, StressK100_100) | |
| TEST (HopcroftKarp, StressPath200) | |
| int | main (int argc, char **argv) |
Tests for Bipartite.
Comprehensive tests for tpl_bipartite.H.
Tests cover:
Definition in file bipartite_test.cc.
| using Graph = List_Graph<Graph_Node<int>, Graph_Arc<Empty_Class> > |
Definition at line 57 of file bipartite_test.cc.
| Graph create_complete_bipartite | ( | size_t | m, |
| size_t | n | ||
| ) |
Creates a complete bipartite graph K_{m,n} Left partition: nodes 0..m-1 Right partition: nodes m..m+n-1.
Definition at line 68 of file bipartite_test.cc.
References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), and m.
Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
| Graph create_cycle_graph | ( | size_t | n | ) |
Creates a cycle graph with n nodes: 0–1–2–...–n-1–0 Even cycles are bipartite, odd cycles are not.
Definition at line 115 of file bipartite_test.cc.
References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), and nodes.
Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
| Graph create_disconnected_bipartite | ( | ) |
Creates two disconnected components.
Definition at line 172 of file bipartite_test.cc.
References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), and Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node().
| Graph create_path_graph | ( | size_t | n | ) |
Creates a path graph with n nodes: 0–1–2–...–n-1 Path graphs are always bipartite.
Definition at line 94 of file bipartite_test.cc.
References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), and nodes.
Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
| Graph create_star_graph | ( | size_t | n | ) |
Creates a star graph with center and n leaves Star graphs are always bipartite.
Definition at line 136 of file bipartite_test.cc.
References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), and Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node().
| Graph create_triangle | ( | ) |
Creates a triangle (K_3) - the simplest non-bipartite graph.
Definition at line 154 of file bipartite_test.cc.
References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), and Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node().
Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 1149 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | Bipartite | , |
| CompleteBipartiteK22 | |||
| ) |
Definition at line 349 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_complete_bipartite(), l, r, Aleph::HTList::size(), and verify_bipartition().
| TEST | ( | Bipartite | , |
| CompleteBipartiteK25 | |||
| ) |
Definition at line 375 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_complete_bipartite(), l, r, Aleph::HTList::size(), and verify_bipartition().
| TEST | ( | Bipartite | , |
| CompleteBipartiteK33 | |||
| ) |
Definition at line 362 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_complete_bipartite(), l, r, Aleph::HTList::size(), and verify_bipartition().
| TEST | ( | Bipartite | , |
| CompleteGraphK3Throws | |||
| ) |
Definition at line 431 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_triangle(), l, and r.
| TEST | ( | Bipartite | , |
| DisconnectedBipartiteComponents | |||
| ) |
Definition at line 486 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_disconnected_bipartite(), l, r, Aleph::HTList::size(), and verify_bipartition().
| TEST | ( | Bipartite | , |
| EmptyGraphReturnsEmpty | |||
| ) |
Definition at line 269 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::HTList::is_empty(), l, and r.
| TEST | ( | Bipartite | , |
| EvenCycle | |||
| ) |
Definition at line 387 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_cycle_graph(), l, r, Aleph::HTList::size(), and verify_bipartition().
| TEST | ( | Bipartite | , |
| GraphWithOddCycleAttached | |||
| ) |
Definition at line 441 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), l, and r.
| TEST | ( | Bipartite | , |
| IsolatedNodeWithBipartiteComponent | |||
| ) |
Definition at line 788 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), l, r, and Aleph::HTList::size().
| TEST | ( | Bipartite | , |
| LargeOddCycleThrows | |||
| ) |
Definition at line 422 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_cycle_graph(), l, and r.
| TEST | ( | Bipartite | , |
| MultipleEdgesBetweenSameNodes | |||
| ) |
Definition at line 769 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), l, r, and Aleph::HTList::size().
| TEST | ( | Bipartite | , |
| OddCycleThrows | |||
| ) |
Definition at line 413 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_cycle_graph(), l, and r.
| TEST | ( | Bipartite | , |
| PathGraphEven | |||
| ) |
Definition at line 308 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_path_graph(), l, r, Aleph::HTList::size(), and verify_bipartition().
| TEST | ( | Bipartite | , |
| PathGraphOdd | |||
| ) |
Definition at line 322 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_path_graph(), l, r, Aleph::HTList::size(), and verify_bipartition().
| TEST | ( | Bipartite | , |
| SingleNode | |||
| ) |
Definition at line 279 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), l, r, and Aleph::HTList::size().
| TEST | ( | Bipartite | , |
| StarGraph | |||
| ) |
Definition at line 334 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_star_graph(), l, r, Aleph::HTList::size(), and verify_bipartition().
| TEST | ( | Bipartite | , |
| TriangleThrows | |||
| ) |
Definition at line 404 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_triangle(), l, and r.
| TEST | ( | Bipartite | , |
| TwoConnectedNodes | |||
| ) |
Definition at line 292 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), l, r, Aleph::HTList::size(), and verify_bipartition().
| TEST | ( | Bipartite | , |
| TwoDisconnectedNodes | |||
| ) |
Definition at line 469 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), l, r, and Aleph::HTList::size().
| TEST | ( | BipartiteColor | , |
| EnumValues | |||
| ) |
Definition at line 812 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::Bp_Blue, Aleph::Bp_Red, and Aleph::Bp_White.
| TEST | ( | BipartiteStress | , |
| LargeBipartiteGraph | |||
| ) |
Definition at line 715 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_complete_bipartite(), l, r, Aleph::HTList::size(), and verify_bipartition().
| TEST | ( | BipartiteStress | , |
| LargeEvenCycle | |||
| ) |
Definition at line 752 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_cycle_graph(), l, r, Aleph::HTList::size(), and verify_bipartition().
| TEST | ( | BipartiteStress | , |
| LargePathGraph | |||
| ) |
Definition at line 727 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_path_graph(), l, r, Aleph::HTList::size(), and verify_bipartition().
| TEST | ( | ComputeBipartiteClass | , |
| BasicUsage | |||
| ) |
Definition at line 505 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_complete_bipartite(), l, r, Aleph::HTList::size(), and verify_bipartition().
| TEST | ( | ComputeBipartiteClass | , |
| ThrowsOnNonBipartite | |||
| ) |
Definition at line 517 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_triangle(), l, and r.
| TEST | ( | HopcroftKarp | , |
| CompleteBipartiteK22 | |||
| ) |
Definition at line 884 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_complete_bipartite(), and verify_matching().
| TEST | ( | HopcroftKarp | , |
| CompleteBipartiteK33 | |||
| ) |
Definition at line 895 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_complete_bipartite(), and verify_matching().
| TEST | ( | HopcroftKarp | , |
| CompleteBipartiteK55 | |||
| ) |
Definition at line 906 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_complete_bipartite(), and verify_matching().
| TEST | ( | HopcroftKarp | , |
| CrossValidateEvenCycle8 | |||
| ) |
Definition at line 1076 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and create_cycle_graph().
| TEST | ( | HopcroftKarp | , |
| CrossValidateK44 | |||
| ) |
Definition at line 1048 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and create_complete_bipartite().
| TEST | ( | HopcroftKarp | , |
| CrossValidatePath6 | |||
| ) |
Definition at line 1062 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and create_path_graph().
| TEST | ( | HopcroftKarp | , |
| DisconnectedWithIsolatedNodes | |||
| ) |
Definition at line 983 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), and verify_matching().
| TEST | ( | HopcroftKarp | , |
| EmptyGraph | |||
| ) |
Definition at line 826 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | HopcroftKarp | , |
| EvenCycle6 | |||
| ) |
Definition at line 939 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_cycle_graph(), and verify_matching().
| TEST | ( | HopcroftKarp | , |
| FunctorMatchesFreeFunction | |||
| ) |
Definition at line 1103 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and create_complete_bipartite().
| TEST | ( | HopcroftKarp | , |
| FunctorWrapper | |||
| ) |
Definition at line 1092 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_complete_bipartite(), and verify_matching().
| TEST | ( | HopcroftKarp | , |
| OddCycleThrows | |||
| ) |
Definition at line 961 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and create_cycle_graph().
| TEST | ( | HopcroftKarp | , |
| PathGraph4 | |||
| ) |
Definition at line 862 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_path_graph(), and verify_matching().
| TEST | ( | HopcroftKarp | , |
| PathGraph5 | |||
| ) |
Definition at line 873 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_path_graph(), and verify_matching().
| TEST | ( | HopcroftKarp | , |
| SingleEdge | |||
| ) |
Definition at line 846 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), and verify_matching().
| TEST | ( | HopcroftKarp | , |
| SingleIsolatedNode | |||
| ) |
Definition at line 835 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node().
| TEST | ( | HopcroftKarp | , |
| StarGraph | |||
| ) |
Definition at line 928 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_star_graph(), and verify_matching().
| TEST | ( | HopcroftKarp | , |
| StressK100_100 | |||
| ) |
Definition at line 1127 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_complete_bipartite(), and verify_matching().
| TEST | ( | HopcroftKarp | , |
| StressK50_50 | |||
| ) |
Definition at line 1116 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_complete_bipartite(), and verify_matching().
| TEST | ( | HopcroftKarp | , |
| StressPath200 | |||
| ) |
Definition at line 1138 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_path_graph(), and verify_matching().
| TEST | ( | HopcroftKarp | , |
| TriangleThrows | |||
| ) |
Definition at line 952 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and create_triangle().
| TEST | ( | HopcroftKarp | , |
| TwoDisconnectedCompleteBipartite | |||
| ) |
Definition at line 1014 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), l1, l2, and verify_matching().
| TEST | ( | HopcroftKarp | , |
| TwoDisconnectedEdges | |||
| ) |
Definition at line 972 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_disconnected_bipartite(), and verify_matching().
| TEST | ( | HopcroftKarp | , |
| UnbalancedK25 | |||
| ) |
Definition at line 917 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_complete_bipartite(), and verify_matching().
| TEST | ( | MaximumMatching | , |
| CompleteBipartiteK22 | |||
| ) |
Definition at line 582 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_complete_bipartite(), and verify_matching().
| TEST | ( | MaximumMatching | , |
| CompleteBipartiteK33 | |||
| ) |
Definition at line 595 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_complete_bipartite(), and verify_matching().
| TEST | ( | MaximumMatching | , |
| CompleteBipartiteK55 | |||
| ) |
Definition at line 608 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_complete_bipartite(), and verify_matching().
| TEST | ( | MaximumMatching | , |
| EmptyGraphReturnsEmpty | |||
| ) |
Definition at line 529 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | MaximumMatching | , |
| EvenCycle | |||
| ) |
Definition at line 660 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_cycle_graph(), and verify_matching().
| TEST | ( | MaximumMatching | , |
| PathGraph4 | |||
| ) |
Definition at line 556 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_path_graph(), and verify_matching().
| TEST | ( | MaximumMatching | , |
| PathGraph5 | |||
| ) |
Definition at line 569 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_path_graph(), and verify_matching().
| TEST | ( | MaximumMatching | , |
| SingleEdge | |||
| ) |
Definition at line 541 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), and verify_matching().
| TEST | ( | MaximumMatching | , |
| StarGraph | |||
| ) |
Definition at line 647 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_star_graph(), and verify_matching().
| TEST | ( | MaximumMatching | , |
| ThrowsOnNonBipartite | |||
| ) |
Definition at line 673 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and create_triangle().
| TEST | ( | MaximumMatching | , |
| UnbalancedK25 | |||
| ) |
Definition at line 621 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_complete_bipartite(), and verify_matching().
| TEST | ( | MaximumMatching | , |
| UnbalancedK52 | |||
| ) |
Definition at line 634 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_complete_bipartite(), and verify_matching().
| TEST | ( | MaximumMatchingClass | , |
| BasicUsage | |||
| ) |
Definition at line 688 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_complete_bipartite(), and verify_matching().
| TEST | ( | MaximumMatchingClass | , |
| ThrowsOnNonBipartite | |||
| ) |
Definition at line 700 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and create_cycle_graph().
| TEST | ( | MaximumMatchingStress | , |
| LargeMatching | |||
| ) |
Definition at line 740 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), create_complete_bipartite(), and verify_matching().
| bool verify_bipartition | ( | const Graph & | g, |
| const DynDlist< Graph::Node * > & | l, | ||
| const DynDlist< Graph::Node * > & | r | ||
| ) |
Verifies that a bipartition is valid:
Note: This function only verifies edges between nodes that were partitioned. Edges involving non-partitioned nodes (from disconnected components) are ignored.
Definition at line 197 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), LocateFunctions< Container, Type >::get_it(), GraphCommon< GT, Node, Arc >::get_src_node(), GraphCommon< GT, Node, Arc >::get_tgt_node(), Aleph::DynSetTree< Key, Tree, Compare >::insert(), l, Aleph::Filter_Iterator< Container, It, Show_Item >::next_ne(), and r.
Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
| bool verify_matching | ( | const Graph & | g, |
| const DynDlist< Graph::Arc * > & | matching | ||
| ) |
Verifies that a matching is valid:
Definition at line 243 of file bipartite_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), GraphCommon< GT, Node, Arc >::get_src_node(), and GraphCommon< GT, Node, Arc >::get_tgt_node().
Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), and TYPED_TEST().