4.1.9.6. dg/VertexMapper¶
- class mod.DGVertexMapper¶
A class for enumerating all valid vertex maps for a given
DGHyperEdge
. 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 \(r\) associated with the hyperedge, calculate each direct derivation \(G \overset{r}{\Rightarrow} H\) and record the associated vertex maps \(V(G) \rightarrow V(H)\). Those maps are available in this class.- __init__(e)¶
Perform the vertex map calculation.
- Parameters
e (DGHyperEdge) – the hyperedge to calculate vertex maps for.
- Raises
LogicError
ifnot e
.
- edge¶
(Read-only) The hyperedge to calculate vertex maps for.
- Type
- left¶
- right¶
- 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.
- Type
- __iter__()¶
- Returns
an iterator over the vertex maps, see
__getitem__()
for the specific type.
- __getitem__(i)¶
- Parameters
i (int) – the index of the map to retrieve.
- Returns
the
i
th vertex map.- Return type
- Raises
LogicError
ifi
is out of range.