|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
The generators of random_graph.H: one graph after another, and the Eulerian graphs. More...
#include <gtest/gtest.h>#include <stdexcept>#include <random_graph.H>#include <tpl_dynMapTree.H>#include <tpl_dynSetTree.H>#include <tpl_graph.H>Go to the source code of this file.
Functions | |
| TEST (RandomGraphReuse, AnUndirectedTypeGetsADigraphEachTime) | |
| TEST (RandomGraphReuse, EachEulerianGraphIsEulerian) | |
| TEST (RandomGraphReuse, EachEulerianDigraphIsBalanced) | |
| TEST (RandomGraphReuse, AHamiltonianDigraphAfterAnEulerianOne) | |
| TEST (RandomGraphReuse, AGraphAfterOneThatThrew) | |
| TEST (EulerianGraphs, ACompleteGraphOfEvenOrderIsRejected) | |
| TEST (EulerianGraphs, FromSparseToDense) | |
The generators of random_graph.H: one graph after another, and the Eulerian graphs.
Each graph that a generator gives is its own graph moved out, and the rest of its state stayed: a graph of an undirected type lost the flag that said that it was directed, the parities of the nodes of the former graphs went into the next Eulerian ones, the tracking of the parities that eulerian() started stayed on, and a graph that threw halfway stayed in the generator, which then removed it as an undirected graph.
And the Eulerian graphs: a digraph took the node between the ends of an arc only among its balanced nodes, which could be none, and an undirected graph whose odd nodes were all adjacent had no end.
Definition in file random_graph_generators_test.cc.
| TEST | ( | EulerianGraphs | , |
| ACompleteGraphOfEvenOrderIsRejected | |||
| ) |
Definition at line 271 of file random_graph_generators_test.cc.
References Aleph::Random_Graph< GT, Init_Node, Init_Arc >::eulerian(), and GraphCommon< GT, Node, Arc >::get_num_arcs().
| TEST | ( | EulerianGraphs | , |
| FromSparseToDense | |||
| ) |
Definition at line 284 of file random_graph_generators_test.cc.
References Aleph::and, Aleph::Random_Graph_Base< GT, Init_Node, Init_Arc >::eulerian(), Aleph::Random_Graph< GT, Init_Node, Init_Arc >::eulerian(), and seed.
| TEST | ( | RandomGraphReuse | , |
| AGraphAfterOneThatThrew | |||
| ) |
Definition at line 261 of file random_graph_generators_test.cc.
| TEST | ( | RandomGraphReuse | , |
| AHamiltonianDigraphAfterAnEulerianOne | |||
| ) |
Definition at line 212 of file random_graph_generators_test.cc.
References Aleph::Random_Graph_Base< GT, Init_Node, Init_Arc >::eulerian(), h, and Aleph::Random_Graph_Base< GT, Init_Node, Init_Arc >::sufficient_hamiltonian().
| TEST | ( | RandomGraphReuse | , |
| AnUndirectedTypeGetsADigraphEachTime | |||
| ) |
Definition at line 159 of file random_graph_generators_test.cc.
References GraphCommon< GT, Node, Arc >::get_num_nodes().
| TEST | ( | RandomGraphReuse | , |
| EachEulerianDigraphIsBalanced | |||
| ) |
Definition at line 193 of file random_graph_generators_test.cc.
References Aleph::and, Aleph::DynList< T >::append(), Aleph::Random_Graph_Base< GT, Init_Node, Init_Arc >::eulerian(), and GraphCommon< GT, Node, Arc >::get_num_nodes().
| TEST | ( | RandomGraphReuse | , |
| EachEulerianGraphIsEulerian | |||
| ) |
Definition at line 176 of file random_graph_generators_test.cc.
References Aleph::and, Aleph::DynList< T >::append(), Aleph::Random_Graph< GT, Init_Node, Init_Arc >::eulerian(), and GraphCommon< GT, Node, Arc >::get_num_nodes().