3.2.11.7. dg/VertexMapper.hpp¶
3.2.11.7.1. Class dg::VertexMapper
¶
-
class dg::VertexMapper¶
A class for enumerating all valid vertex maps for a given
dg::DG::HyperEdge
. That is, for such a hyperedge, collect the graphs associated with respectively the source and target vertices, and create the disjoint union of those graphs. Let the result be the graphs \(G'\) and \(H'\). Then each rule \(p = (L\leftarrow K\rightarrow R)\) associated with the hyperedge, generate direct derivations \(G\overset{p, m}{\Rightarrow} H\) where \(G\) is isomorphic to \(G'\) and \(H\) is isomorphic to \(H'\).Each recorded vertex map is a map \(V(G) \rightarrow V(H)\). Those maps are available in this class.
3.2.11.7.1.1. Synopsis¶
-
using Map = VertexMap<graph::Union, graph::Union>;
-
class Result
-
class iterator
-
using const_iterator = iterator
-
VertexMapper(DG::HyperEdge e)
-
VertexMapper(DG::HyperEdge e, bool upToIsomorphismG, int leftLimit, int rightLimit, int verbosity)
-
DG::HyperEdge getEdge() const
-
graph::Union getLeft() const
-
graph::Union getRight() const
-
const_iterator begin() const
-
const_iterator end() const
-
std::size_t size() const
-
Result operator[](std::size_t i) const
3.2.11.7.1.2. Details¶
-
class Result¶
The value type returned for each vertex map. the rule used to generate the map, and then the actual map.
-
VertexMapper(DG::HyperEdge e)¶
-
VertexMapper(DG::HyperEdge e, bool upToIsomorphismG, int leftLimit, int rightLimit, int verbosity)¶
Construct a vertex map holder. It will immediately calculate all vertex maps for the derivations underlying the given hyperedge. By default all maps \(V(G) \rightarrow V(H)\) are enumerated. To only enumerate a singular vertex map per rule, use upToIsomorphismG = true and leftLimit = rightLimit = 1.
- Parameters:
e – the hyperedge to construct vertex maps for.
upToIsomrophismG – whether to enumerate all \(m\), or just those such that all bottom spans \((G\leftarrow D\rightarrow H)\) up to isomorphism are generated. Defaults to true.
leftLimit – after bottom span generation, find this many isomorphisms back to the sources of the hyperedge. Defaults to 1.
rightLimit – after bottom span generation, find this many isomorphisms back to the targets of the hyperedge. Defaults to \(2^{30}\).
verbosity –
the level of debug information to print. Defaults to 0.
0 (or less): print no information.
1: print debug information within the vertex mapping, but not debug information related to rule composition.
10: also print information for morphism generation for rule composition.
20: also print rule composition information.
- Throws:
LogicError
if !e.
-
graph::Union getLeft() const¶
-
graph::Union getRight() const¶
- Returns:
the disjoint union of graphs from respectively the source and target vertices of the hyperedge. That is, the graphs \(G\) and \(H\) that are the domain and codomain graphs of the calculated vertex maps.
-
const_iterator begin() const¶
-
const_iterator end() const¶
- Returns:
iterators for the range of vertex maps calculated by the mapper.