3.1.5. DGGraphInterface

3.1.5.1. Class DGVertex

class mod.DGVertex

A descriptor of either a vertex in a derivation graph, or a null vertex.

__init__(self)

Constructs a null descriptor.

isNull()
Returns:whether this is a null descriptor or not.
Return type:bool
id

(Read-only) The index of the vertex. It will be in the range \([0, numVertices + numEdges[\).

Type:int
Raises:LogicError if it is a null descriptor.
dg

(Read-only) The derivation graph the vertex belongs to.

Type:DG
Raises:LogicError if it is a null descriptor.
inEdges

(Read-only) A range of in-hyperedges for this vertex.

Type:InEdgeRange
Raises:LogicError if it is a null descriptor.
outEdges

(Read-only) A range of out-hyperedges for this vertex.

Type:OutEdgeRange
Raises:LogicError if it is a null descriptor.
graph

(Read-only) The graph label of the vertex.

Type:Graph
Raises:LogicError if it is a null descriptor.

3.1.5.2. Class DGHyperEdge

class mod.DGHyperEdge

A descriptor of either a hyperedge in a derivation graph, or a null edge.

__init__(self)

Constructs a null descriptor.

isNull()
Returns:whether this is a null descriptor or not.
Return type:bool
id

(Read-only) The index of the hyperedge. It will be in the range \([0, numVertices + numEdges[\).

Type:int
Raises:LogicError if it is a null descriptor.
dg

(Read-only) The derivation graph the edge belongs to.

Type:DG
Raises:LogicError if it is a null descriptor.
numSources

(Read-only) The number of sources of the hyperedge.

Type:int
sources

(Read-only) The sources of the hyperedge.

Type:DGSourceRange
Raises:LogicError if it is a null descriptor.
numTargets

(Read-only) The number of targerts of the hyperedge.

Type:int
targets

(Read-only) The targets of the hyperedge.

Type:DGTargetRange
Raises:LogicError if it is a null descriptor.
rules

(Read-only) The rules associated with the hyperedge.

Type:DGRuleRange
Raises:LogicError if it is a null descriptor.
print(printer=GraphPrinter(), matchColour="Melon")

Print the derivations represented by the hyperedge. All possible Double-Pushout diagrams are printed.

Parameters:
  • printer (GraphPrinter) – the printer to use for the figures.
  • matchColour (string) – the TikZ colour to use for the rule and its image in the bottom span.
Raises:

LogicError if it is a null descriptor.