Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
graph_contract_matrix.H File Reference

What the files of the contract matrix of the graph templates, graph_contract_matrix_*_test.cc, share: the arc that the filters hide, and the loops over the filters of the catalog and over the constness of a graph. More...

#include <cstddef>
#include <type_traits>
#include <utility>
#include <gtest/gtest.h>
#include <tpl_graph.H>
#include "graph_harness.H"
#include "graph_filter_catalog.H"
Include dependency graph for graph_contract_matrix.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  graph_contract_matrix
 

Functions

template<class GT , class F >
void graph_contract_matrix::for_each_filter (F &&f)
 Calls f(sa, name) with a filter of each kind of the catalog of graph_filter_catalog.H, and with Dft_Show_Arc.
 
template<class GT , class F >
void graph_contract_matrix::for_each_constness (GT &g, F &&f)
 Calls f(g) with g as it is and as a const graph.
 

Variables

constexpr int graph_contract_matrix::Hidden = 2
 The number of the arc that the filters hide.
 
const unsigned long graph_contract_matrix::Hidden_Mask = 1UL << Hidden
 The mask of the filters: only the arc Hidden.
 
template<class GT , class SA >
constexpr bool graph_contract_matrix::hides = not std::is_same_v<SA, Aleph::Dft_Show_Arc<GT>>
 Whether a filter of type SA hides the arc Hidden: all but Dft_Show_Arc.
 

Detailed Description

What the files of the contract matrix of the graph templates, graph_contract_matrix_*_test.cc, share: the arc that the filters hide, and the loops over the filters of the catalog and over the constness of a graph.

Each file kept a copy of them, so that a new filter of the catalog of graph_filter_catalog.H had to be added to eight copies of for_each_filter().

Definition in file graph_contract_matrix.H.