# 3.1.7.2. dg/GraphInterface¶

## 3.1.7.2.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. bool
id

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

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

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

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

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

Type: DGInEdgeRange LogicError if it is a null descriptor.
outEdges

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

Type: DGOutEdgeRange LogicError if it is a null descriptor.
graph

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

Type: Graph LogicError if it is a null descriptor.

## 3.1.7.2.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. bool
id

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

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

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

Type: DG 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 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 LogicError if it is a null descriptor.
rules

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

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

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. LogicError if it is a null descriptor.
printTransitionState()
printTransitionState(printer)

Print the derivations represented by the hyperedge in style of a chemical transition state. For all possible Double-Pushout diagrams a figure printed.

Parameters: printer (GraphPrinter) – the printer to use for the figures. LogicError if it is a null descriptor.