3.1.9.3. dg/GraphInterface¶
3.1.9.3.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.
-
id¶ (Read-only) The index of the vertex. It will be in the range \([0, numVertices + numEdges[\).
- Type
- Raises
LogicErrorif it is a null descriptor.
-
dg¶ (Read-only) The derivation graph the vertex belongs to.
- Type
- Raises
LogicErrorif it is a null descriptor.
-
inDegree¶ (Read-only) The in-degree of the vertex, including multiplicity of target multisets.
- Type
- Raises
LogicErrorif it is a null descriptor.
-
inEdges¶ (Read-only) A range of in-hyperedges for this vertex.
- Type
DGInEdgeRange
- Raises
LogicErrorif it is a null descriptor.
-
outDegree¶ (Read-only) The out-degree of the vertex, including multiplicity of source multisets.
- Type
- Raises
LogicErrorif it is a null descriptor.
-
outEdges¶ (Read-only) A range of out-hyperedges for this vertex.
- Type
DGOutEdgeRange
- Raises
LogicErrorif it is a null descriptor.
-
graph¶ (Read-only) The graph label of the vertex.
- Type
- Raises
LogicErrorif it is a null descriptor.
-
3.1.9.3.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.
-
id¶ (Read-only) The index of the hyperedge. It will be in the range \([0, numVertices + numEdges[\).
- Type
- Raises
LogicErrorif it is a null descriptor.
-
dg¶ (Read-only) The derivation graph the edge belongs to.
- Type
- Raises
LogicErrorif it is a null descriptor.
-
sources¶ (Read-only) The sources of the hyperedge.
- Type
DGSourceRange
- Raises
LogicErrorif it is a null descriptor.
-
targets¶ (Read-only) The targets of the hyperedge.
- Type
DGTargetRange
- Raises
LogicErrorif it is a null descriptor.
-
rules¶ (Read-only) The rules associated with the hyperedge.
- Type
DGRuleRange
- Raises
LogicErrorif it is a null descriptor.
-
inverse¶ (Read-only) A descriptor for the inverse hyperedge of this one, if it exists. Otherwise a null descriptor is returned.
- Type
- Raises
LogicErrorif it is a null descriptor.- Raises
LogicErrorif notdg.locked.
-
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 (str) – the TikZ colour to use for the rule and its image in the bottom span.
- Returns
A list with file data for each DPO diagram printed. Each element is a pair of filename prefixes, where the first entry is completed by appending
_derL,_derK, or_derR. The second entry is completed similarly by appending_derG,_derD, or_derH.- Return type
- Raises
LogicErrorif it is a null descriptor.- Raises
LogicErrorif it has no rules.
-