4.1.9.3. dg/GraphInterface¶
- class mod.DGVertex¶
A descriptor of either a vertex in a derivation graph, or a null vertex.
- __init__()¶
Constructs a null descriptor.
- id¶
(Read-only) The index of the vertex. It will be in the range \([0, numVertices + numEdges[\).
- Type
- Raises
LogicError
if it is a null descriptor.
- dg¶
(Read-only) The derivation graph the vertex belongs to.
- Type
- Raises
LogicError
if it is a null descriptor.
- inDegree¶
(Read-only) The in-degree of the vertex, including multiplicity of target multisets.
- Type
- Raises
LogicError
if it is a null descriptor.
- inEdges¶
(Read-only) A range of in-hyperedges for this vertex.
- Type
DGInEdgeRange
- Raises
LogicError
if it is a null descriptor.
- outDegree¶
(Read-only) The out-degree of the vertex, including multiplicity of source multisets.
- Type
- Raises
LogicError
if it is a null descriptor.
- outEdges¶
(Read-only) A range of out-hyperedges for this vertex.
- Type
DGOutEdgeRange
- Raises
LogicError
if it is a null descriptor.
- graph¶
(Read-only) The graph label of the vertex.
- Type
- Raises
LogicError
if it is a null descriptor.
- class mod.DGHyperEdge¶
A descriptor of either a hyperedge in a derivation graph, or a null edge.
- __init__()¶
Constructs a null descriptor.
- id¶
(Read-only) The index of the hyperedge. It will be in the range \([0, numVertices + numEdges[\).
- Type
- Raises
LogicError
if it is a null descriptor.
- dg¶
(Read-only) The derivation graph the edge belongs to.
- Type
- Raises
LogicError
if it is a null descriptor.
- sources¶
(Read-only) The sources of the hyperedge.
- Type
DGSourceRange
- Raises
LogicError
if it is a null descriptor.
- 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.
- inverse¶
(Read-only) A descriptor for the inverse hyperedge of this one, if it exists. Otherwise a null descriptor is returned.
- Type
- Raises
LogicError
if it is a null descriptor.- Raises
LogicError
if 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
LogicError
if it is a null descriptor.- Raises
LogicError
if it has no rules.