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 if not e.

edge

(Read-only) The hyperedge to calculate vertex maps for.

Type

DGHyperEdge

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

UnionGraph

__iter__()
Returns

an iterator over the vertex maps, see __getitem__() for the specific type.

size

(Read-only) The number of vertex maps calculated.

Type

int

__len__()
Returns

size

Return type

int

__getitem__(i)
Parameters

i (int) – the index of the map to retrieve.

Returns

the ith vertex map.

Return type

tuple[Rule, VertexMapUnionGraphUnionGraph]

Raises

LogicError if i is out of range.