|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
The contract matrix of the filtered iterators and of the basic graph functions: every kind of graph, arc filter and constness that each template supports. More...
#include <cstdio>#include <fstream>#include <functional>#include <iostream>#include <set>#include <sstream>#include <string>#include <type_traits>#include <utility>#include <vector>#include <unistd.h>#include <gtest/gtest.h>#include <tpl_graph.H>#include <tpl_graph_utils.H>#include <graph-traverse.H>#include <graph-traverse-generators.H>#include <io_graph.H>#include <generate_graph.H>#include <generate_spanning_tree_picture.H>#include <generate_df_tree.H>#include <graph_to_tree.H>#include <single_graph.H>#include <warshall.H>#include <eulerian.H>#include <hamiltonian.H>#include "graph_harness.H"#include "graph_filter_catalog.H"#include "graph_contract_matrix.H"Go to the source code of this file.
Classes | |
| class | ContractCoreIterators< GT > |
| class | ContractCoreFunctions< GT > |
| class | ContractCoreTraversals< GT > |
| class | ContractCoreDigraphs< GT > |
| class | ContractCoreTrees< GT > |
The contract matrix of the filtered iterators and of the basic graph functions: every kind of graph, arc filter and constness that each template supports.
The ArcFilter concept of ah-graph-concepts.H only asks a filter to be a predicate on an arc, and a member of a template that no test calls is never compiled. So each test calls once every public entry point of a template of tpl_graph.H, graph-traverse.H, graph-traverse-generators.H, tpl_graph_utils.H, io_graph.H, generate_graph.H, generate_spanning_tree_picture.H, generate_df_tree.H, graph_to_tree.H, single_graph.H, warshall.H, eulerian.H and hamiltonian.H, on a small graph of each kind that the template supports, with each filter of graph_filter_catalog.H and with Dft_Show_Arc, on a graph and on a const graph where the template takes a const one, and checks, where it is cheap, that the arc that the filters hide does not show up.
A combination that should compile and does not is left out with if constexpr, under the name of its check in graph_contract_compile_check.cmake, which expects it to fail to compile until it is fixed. An answer that is wrong at run time because of a known defect is counted, and the test expects it to stay wrong, so that the fix has to remove the mark.
Definition in file graph_contract_matrix_core_test.cc.
| TYPED_TEST | ( | ContractCoreDigraphs | , |
| InvertDigraphAndRanks | |||
| ) |
Definition at line 1278 of file graph_contract_matrix_core_test.cc.
References Aleph::all(), graph_contract_matrix::for_each_constness(), graph_harness::Built< GT >::g, Aleph::rank_graphviz(), and Aleph::ranks().
| TYPED_TEST | ( | ContractCoreFunctions | , |
| ArcsAndNodesOfANode | |||
| ) |
| TYPED_TEST | ( | ContractCoreFunctions | , |
| ArcsMapAndFoldlArcs | |||
| ) |
Definition at line 603 of file graph_contract_matrix_core_test.cc.
References Aleph::all(), graph_harness::Built< GT >::g, Aleph::DynList< T >::Iterator::get_curr(), LocateFunctions< Container, Type >::get_it(), Aleph::HTList::Iterator::has_curr(), l, Aleph::Filter_Iterator< Container, It, Show_Item >::next_ne(), graph_harness::Built< GT >::nodes, r, and Aleph::sum().
| TYPED_TEST | ( | ContractCoreFunctions | , |
| CopyGraph | |||
| ) |
Definition at line 887 of file graph_contract_matrix_core_test.cc.
References Aleph::copy(), graph_harness::Built< GT >::g, and GraphCommon< GT, Node, Arc >::get_num_nodes().
| TYPED_TEST | ( | ContractCoreFunctions | , |
| ForEachArcAndForallArc | |||
| ) |
Definition at line 578 of file graph_contract_matrix_core_test.cc.
References Aleph::all(), Aleph::for_each_arc(), graph_contract_matrix::for_each_constness(), Aleph::forall_arc(), graph_harness::Built< GT >::g, GTArcCommon< ArcInfo >::get_info(), graph_contract_matrix::Hidden, and graph_harness::Built< GT >::nodes.
| TYPED_TEST | ( | ContractCoreFunctions | , |
| FunctionalOperationsOnTheArcsIntoANode | |||
| ) |
Definition at line 768 of file graph_contract_matrix_core_test.cc.
References Aleph::all_in_arc(), graph_harness::Built< GT >::arcs, Aleph::each(), Aleph::exists_in_arc(), Aleph::filter_in_arcs(), graph_contract_matrix::for_each_constness(), graph_harness::Built< GT >::g, Aleph::DynList< T >::Iterator::get_curr(), LocateFunctions< Container, Type >::get_it(), Aleph::HTList::Iterator::has_curr(), graph_contract_matrix::Hidden, l, Aleph::Filter_Iterator< Container, It, Show_Item >::next_ne(), graph_harness::Built< GT >::nodes, r, Aleph::search_in_arc(), Aleph::sum(), and Aleph::traverse_in_arcs().
| TYPED_TEST | ( | ContractCoreFunctions | , |
| InArcsIndex | |||
| ) |
Definition at line 693 of file graph_contract_matrix_core_test.cc.
References Aleph::all(), graph_harness::Built< GT >::arcs, graph_harness::Check::fail(), graph_contract_matrix::for_each_constness(), graph_harness::Built< GT >::g, Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), and graph_harness::Built< GT >::nodes.
| TYPED_TEST | ( | ContractCoreFunctions | , |
| KeptFilter | |||
| ) |
Definition at line 839 of file graph_contract_matrix_core_test.cc.
References graph_harness::Built< GT >::arcs, Aleph::copy(), Aleph::Kept_Filter< F >::get(), and graph_contract_matrix::Hidden.
| TYPED_TEST | ( | ContractCoreFunctions | , |
| OperateOnArcs | |||
| ) |
Definition at line 863 of file graph_contract_matrix_core_test.cc.
References Aleph::all(), graph_contract_matrix::for_each_constness(), graph_harness::Built< GT >::g, and graph_harness::Built< GT >::nodes.
| TYPED_TEST | ( | ContractCoreFunctions | , |
| SearchArc | |||
| ) |
Definition at line 820 of file graph_contract_matrix_core_test.cc.
References graph_harness::Built< GT >::arcs, graph_contract_matrix::for_each_constness(), graph_harness::Built< GT >::g, and graph_contract_matrix::Hidden.
| TYPED_TEST | ( | ContractCoreIterators | , |
| ArcIterator | |||
| ) |
Definition at line 343 of file graph_contract_matrix_core_test.cc.
References Aleph::and, Aleph::each(), Aleph::Filter_Iterator< Container, It, Show_Item >::find_if(), graph_contract_matrix::for_each_constness(), graph_harness::Built< GT >::g, Aleph::Filter_Iterator< Container, It, Show_Item >::get_container(), Aleph::Filter_Iterator< Container, It, Show_Item >::get_cookie(), Aleph::DynList< T >::Iterator::get_curr_ne(), Aleph::Filter_Iterator< Container, It, Show_Item >::get_filter(), Aleph::HTList::Iterator::has_curr(), Aleph::none(), Aleph::Filter_Iterator< Container, It, Show_Item >::prev(), Aleph::Filter_Iterator< Container, It, Show_Item >::prev_ne(), Aleph::Filter_Iterator< Container, It, Show_Item >::reset_first(), Aleph::Filter_Iterator< Container, It, Show_Item >::reset_last(), Aleph::Filter_Iterator< Container, It, Show_Item >::set_cookie(), and Aleph::Filter_Iterator< Container, It, Show_Item >::set_filter().
| TYPED_TEST | ( | ContractCoreIterators | , |
| BackwardMovesWhereTheListsGoBack | |||
| ) |
The iterators move back only where the iterators of the lists of the graph do: not on List_SGraph and List_SDigraph, whose lists are singly linked, and where the calls must not compile (see sgraph_iterator_prev in graph_contract_compile_check.cmake).
The iterator of In_Arcs_Index moves back on every kind.
Definition at line 547 of file graph_contract_matrix_core_test.cc.
References graph_harness::Built< GT >::g, Aleph::In_Arcs_Index< GT, SA >::get_it(), graph_harness::Built< GT >::nodes, out, Aleph::Filter_Iterator< Container, It, Show_Item >::prev(), Aleph::Filter_Iterator< Container, It, Show_Item >::prev_ne(), and Aleph::Filter_Iterator< Container, It, Show_Item >::reset_last().
| TYPED_TEST | ( | ContractCoreIterators | , |
| NodeArcIterator | |||
| ) |
Definition at line 277 of file graph_contract_matrix_core_test.cc.
References Aleph::and, Aleph::copy(), Aleph::each(), GTArcCommon< ArcInfo >::get_info(), graph_harness::Built< GT >::nodes, and Aleph::none().
| TYPED_TEST | ( | ContractCoreIterators | , |
| OutAndInIterators | |||
| ) |
Definition at line 407 of file graph_contract_matrix_core_test.cc.
References check(), Aleph::copy(), graph_contract_matrix::for_each_constness(), graph_harness::Built< GT >::g, Aleph::Digraph_Iterator< GT, Filter >::has_curr(), Aleph::in_arcs(), Aleph::Out_Iterator< GT, Show_Arc >::next(), graph_harness::Built< GT >::nodes, out, and Aleph::Digraph_Iterator< GT, Filter >::reset_first().
| TYPED_TEST | ( | ContractCoreTraversals | , |
| DepthAndBreadthFirstTraversal | |||
| ) |
Definition at line 973 of file graph_contract_matrix_core_test.cc.
References graph_contract_matrix::for_each_constness(), and graph_harness::Built< GT >::g.
| TYPED_TEST | ( | ContractCoreTraversals | , |
| Drawings | |||
| ) |
Definition at line 1100 of file graph_contract_matrix_core_test.cc.
References arcs, graph_contract_matrix::for_each_constness(), graph_harness::Built< GT >::g, Aleph::generate(), and out.
| TYPED_TEST | ( | ContractCoreTraversals | , |
| EulerAndHamilton | |||
| ) |
Definition at line 1225 of file graph_contract_matrix_core_test.cc.
References Aleph::find(), graph_harness::Built< GT >::g, graph_contract_matrix::Hidden, GraphCommon< GT, Node, Arc >::is_digraph(), r, and test().
| TYPED_TEST | ( | ContractCoreTraversals | , |
| GraphTraverse | |||
| ) |
Definition at line 912 of file graph_contract_matrix_core_test.cc.
References Graph_Traverse< GT, Itor, Q, Show_Arc >::exec(), graph_harness::Built< GT >::g, and graph_harness::Built< GT >::nodes.
| TYPED_TEST | ( | ContractCoreTraversals | , |
| GraphTraverseGenerator | |||
| ) |
Definition at line 947 of file graph_contract_matrix_core_test.cc.
References graph_harness::Built< GT >::g, graph_harness::Built< GT >::nodes, and Aleph::Graph_Traverse_Generator< GT, Itor, Q, Show_Arc >::traverse().
| TYPED_TEST | ( | ContractCoreTraversals | , |
| IOGraph | |||
| ) |
Definition at line 1029 of file graph_contract_matrix_core_test.cc.
References Aleph::and, file, graph_harness::Built< GT >::g, h, and out.
| TYPED_TEST | ( | ContractCoreTraversals | , |
| SearchSpanningTreeArcAndTotalCost | |||
| ) |
Definition at line 1004 of file graph_contract_matrix_core_test.cc.
References graph_harness::Built< GT >::arcs, graph_contract_matrix::for_each_constness(), graph_harness::Built< GT >::g, graph_contract_matrix::Hidden, Aleph::Total_Cost< GT, Distance, SA >::reset(), Aleph::Total_Cost< GT, Distance, SA >::total_cost(), and Aleph::Total_Cost< GT, Distance, SA >::value().
| TYPED_TEST | ( | ContractCoreTraversals | , |
| SingleGraph | |||
| ) |
Definition at line 1206 of file graph_contract_matrix_core_test.cc.
References graph_harness::Built< GT >::g, and graph_harness::Built< GT >::nodes.
| TYPED_TEST | ( | ContractCoreTraversals | , |
| Warshall | |||
| ) |
Definition at line 1171 of file graph_contract_matrix_core_test.cc.
References Aleph::all(), graph_harness::Built< GT >::g, graph_harness::Built< GT >::nodes, and Aleph::warshall_compute_transitive_clausure().
| TYPED_TEST | ( | ContractCoreTrees | , |
| DfLowTree | |||
| ) |
Definition at line 1321 of file graph_contract_matrix_core_test.cc.
References Aleph::destroy_tree(), graph_contract_matrix::for_each_constness(), graph_harness::Built< GT >::g, nodes, graph_harness::Built< GT >::nodes, out, root(), and Aleph::write_df_low_tree().
| TYPED_TEST | ( | ContractCoreTrees | , |
| GraphToTreeNode | |||
| ) |
Definition at line 1351 of file graph_contract_matrix_core_test.cc.
References Aleph::destroy_tree(), EXPECT_THROW_OR_FILTER, graph_harness::Built< GT >::g, graph_harness::Built< GT >::nodes, and root().
| TYPED_TEST_SUITE | ( | ContractCoreDigraphs | , |
| Directed_Kinds | |||
| ) |
| TYPED_TEST_SUITE | ( | ContractCoreFunctions | , |
| All_Kinds | |||
| ) |
| TYPED_TEST_SUITE | ( | ContractCoreIterators | , |
| All_Kinds | |||
| ) |
| TYPED_TEST_SUITE | ( | ContractCoreTraversals | , |
| All_Kinds | |||
| ) |
| TYPED_TEST_SUITE | ( | ContractCoreTrees | , |
| Undirected_Kinds | |||
| ) |