|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Minimum spanning trees, trees from graphs and depth-first trees with their numbers, on every small multigraph, against the oracles. More...
#include <algorithm>#include <map>#include <random>#include <set>#include <stdexcept>#include <string>#include <vector>#include <gtest/gtest.h>#include <tpl_graph.H>#include <Kruskal.H>#include <Prim.H>#include <graph_to_tree.H>#include <generate_df_tree.H>#include "graph_filter_catalog.H"#include "graph_harness.H"#include "graph_oracles.H"Go to the source code of this file.
Classes | |
| class | ExhaustiveTrees< GT > |
| class | ExhaustiveTreesOnDigraphs< GT > |
Functions | |
| TYPED_TEST_SUITE (ExhaustiveTrees, Undirected_Kinds) | |
| TYPED_TEST (ExhaustiveTrees, SpanningTreesAreMinimumForEveryWeighting) | |
| TYPED_TEST (ExhaustiveTrees, SpanningTreesRespectTheFilter) | |
| TYPED_TEST (ExhaustiveTrees, SpanningTreesAreMinimumOnRandomGraphs) | |
| TYPED_TEST_SUITE (ExhaustiveTreesOnDigraphs, Directed_Kinds) | |
| TYPED_TEST (ExhaustiveTreesOnDigraphs, SpanningTreesRejectADigraph) | |
| TYPED_TEST (ExhaustiveTrees, TreesFromGraphsMatchTheirComponents) | |
| TYPED_TEST (ExhaustiveTrees, DepthFirstTreesHaveTheirNumbers) | |
Minimum spanning trees, trees from graphs and depth-first trees with their numbers, on every small multigraph, against the oracles.
Kruskal and Prim run on every multigraph of 3 nodes and 3 arcs with every assignment of the weights -1, 0 and 1, on every one of 4 nodes and 3 arcs with each set of hidden arcs, and on random graphs of up to 8 nodes, on the three kinds of graph that are not directed; the weight of what they give is that of the minimum spanning forest of oracle::min_spanning_forest_weight(). The trees built from a graph, and the depth-first trees with their df and low numbers, are checked against their definitions on every multigraph of the domain of graph_harness.H.
Definition in file graph_exhaustive_trees_test.cc.
| TYPED_TEST | ( | ExhaustiveTrees | , |
| DepthFirstTreesHaveTheirNumbers | |||
| ) |
Definition at line 547 of file graph_exhaustive_trees_test.cc.
References Aleph::build_df_low_tree(), Aleph::destroy_tree(), graph_harness::domain(), graph_harness::Check::expect(), graph_harness::Check::fail(), graph_harness::for_each_spec(), graph_harness::Built< GT >::g, graph_harness::Spec::n, graph_harness::Built< GT >::nodes, graph_harness::Spec::num_arcs(), root(), and graph_harness::Check::run().
| TYPED_TEST | ( | ExhaustiveTrees | , |
| SpanningTreesAreMinimumForEveryWeighting | |||
| ) |
Definition at line 237 of file graph_exhaustive_trees_test.cc.
References graph_harness::domain(), graph_harness::Check::expect(), and graph_harness::for_each_spec().
| TYPED_TEST | ( | ExhaustiveTrees | , |
| SpanningTreesAreMinimumOnRandomGraphs | |||
| ) |
Definition at line 284 of file graph_exhaustive_trees_test.cc.
References graph_harness::Check::expect(), graph_harness::heavy(), k, m, graph_harness::random_spec(), graph_harness::random_weights(), rng, and seed.
| TYPED_TEST | ( | ExhaustiveTrees | , |
| SpanningTreesRespectTheFilter | |||
| ) |
Definition at line 259 of file graph_exhaustive_trees_test.cc.
References graph_harness::Spec::arcs, graph_harness::domain(), graph_harness::Check::expect(), graph_harness::for_each_spec(), graph_harness::Spec::num_arcs(), and graph_harness::Spec::w.
| TYPED_TEST | ( | ExhaustiveTrees | , |
| TreesFromGraphsMatchTheirComponents | |||
| ) |
Definition at line 380 of file graph_exhaustive_trees_test.cc.
References Aleph::and, check(), Aleph::destroy_tree(), graph_harness::domain(), graph_harness::Check::expect(), graph_harness::Check::fail(), graph_harness::for_each_spec(), graph_harness::Built< GT >::g, graph_oracles::has_cycle(), graph_harness::Spec::n, graph_harness::Built< GT >::nodes, graph_harness::Spec::num_arcs(), root(), graph_harness::Check::run(), and graph_oracles::without().
| TYPED_TEST | ( | ExhaustiveTreesOnDigraphs | , |
| SpanningTreesRejectADigraph | |||
| ) |
Definition at line 314 of file graph_exhaustive_trees_test.cc.
References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), and Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node().
| TYPED_TEST_SUITE | ( | ExhaustiveTrees | , |
| Undirected_Kinds | |||
| ) |
| TYPED_TEST_SUITE | ( | ExhaustiveTreesOnDigraphs | , |
| Directed_Kinds | |||
| ) |