4.1.10.3. rule/GraphInterface¶
- class Rule.LeftGraph¶
A proxy object representing the left graph of the rule. The class implements the
protocols.LabelledGraph
protocol,- class Vertex¶
A descriptor of either a vertex in a left side, or a null vertex. Implements the
protocols.LabelledGraph.Vertex
protocol. Additionally, theid
is in the range \([0, numCoreVertices[\).- core¶
(Read-only) The descriptor for this vertex in the core graph.
- Type:
- rule¶
(Read-only) The rule the vertex belongs to.
- Type:
- Raises:
LogicError
if it is a null descriptor.
- class Edge¶
A descriptor of either an edge in a left side, or a null edge. Implements the
protocols.LabelledGraph.Edge
protocol.- rule¶
(Read-only) The rule the edge belongs to.
- Type:
- Raises:
LogicError
if it is a null descriptor.
- class VertexRange¶
Implements the
protocols.Graph.VertexRange
protocol.
- class EdgeRange¶
Implements the
protocols.Graph.EdgeRange
protocol.
- class IncidentEdgeRange¶
Implements the
protocols.Graph.IncidentEdgeRange
protocol.
- class Rule.ContextGraph¶
A proxy object representing the context graph of the rule. The class implements the
protocols.Graph
protocol,- class Vertex¶
A descriptor of either a vertex in a context, or a null vertex. Implements the
protocols.Graph.Vertex
protocol. Additionally, theid
is in the range \([0, numCoreVertices[\).- core¶
(Read-only) The descriptor for this vertex in the core graph.
- Type:
- rule¶
(Read-only) The rule the vertex belongs to.
- Type:
- Raises:
LogicError
if it is a null descriptor.
- class Edge¶
A descriptor of either an edge in a context, or a null edge. Implements the
protocols.LabelledGraph.Edge
protocol.- graph¶
(Read-only) The rule the edge belongs to.
- Type:
- Raises:
LogicError
if it is a null descriptor.
- class VertexRange¶
Implements the
protocols.Graph.VertexRange
protocol.
- class EdgeRange¶
Implements the
protocols.Graph.EdgeRange
protocol.
- class IncidentEdgeRange¶
Implements the
protocols.Graph.IncidentEdgeRange
protocol.
- class Rule.RightGraph¶
A proxy object representing the right graph of the rule. The class implements the
protocols.LabelledGraph
protocol,- class Vertex¶
A descriptor of either a vertex in a right side, or a null vertex. Implements the
protocols.LabelledGraph.Vertex
protocol. Additionally, theid
is in the range \([0, numCoreVertices[\).- core¶
(Read-only) The descriptor for this vertex in the core graph.
- Type:
- rule¶
(Read-only) The rule the vertex belongs to.
- Type:
- Raises:
LogicError
if it is a null descriptor.
- class Edge¶
A descriptor of either an edge in a right side, or a null edge. Implements the
protocols.LabelledGraph.Edge
protocol.- rule¶
(Read-only) The rule the edge belongs to.
- Type:
- Raises:
LogicError
if it is a null descriptor.
- class VertexRange¶
Implements the
protocols.Graph.VertexRange
protocol.
- class EdgeRange¶
Implements the
protocols.Graph.EdgeRange
protocol.
- class IncidentEdgeRange¶
Implements the
protocols.Graph.IncidentEdgeRange
protocol.
- class Rule.Vertex¶
Implements the
protocols.Graph.Vertex
protocol. Additionally, theid
is in the range \([0, numVertices[\).- rule¶
An alias for
protocols.Graph.Vertex.graph
.- Type:
- left¶
(Read-only) A null descriptor if this vertex is not in the left graph, otherwise the descriptor of this vertex in the left graph.
- Type:
- context¶
(Read-only) A null descriptor if this vertex is not in the context graph, otherwise the descriptor of this vertex in the context graph.
- Type:
- right¶
(Read-only) A null descriptor if this vertex is not in the right graph, otherwise the descriptor of this vertex in the right graph.
- Type:
- get2DX(withHydrogens=True)¶
- Returns:
the x-coordinate in a 2D depiction of the rule. Different sets of coordinates exists for rendering with and without certain hydrogens.
- Return type:
- Raises:
LogicError
if it is a null descriptor, or ifwithHydrogens
isTrue
and the vertex is a “clean” hydrogen.
- get2DY(withHydrogens=True)¶
- Returns:
the y-coordinate in a 2D depiction of the rule. Different sets of coordinates exists for rendering with and without certain hydrogens.
- Return type:
- Raises:
LogicError
if it is a null descriptor, or ifwithHydrogens
isTrue
and the vertex is a “clean” hydrogen.
- class Rule.Edge¶
Implements the
protocols.Graph.Edge
protocol.- rule¶
An alias for
protocols.Graph.Edge.graph
.- Type:
- left¶
(Read-only) A null descriptor if this edge is not in the left graph, otherwise the descriptor of this edge in the left graph.
- Type:
- context¶
(Read-only) A null descriptor if this edge is not in the context graph, otherwise the descriptor of this edge in the context graph.
- Type:
- right¶
(Read-only) A null descriptor if this edge is not in the right graph, otherwise the descriptor of this edge in the right graph.
- Type:
- class Rule.VertexRange¶
Implements the
protocols.Graph.VertexRange
protocol, in addition to the following functionality.- __getitem__(i)¶
- Returns:
the
i
th vertex of the graph.- Return type:
- class Rule.EdgeRange¶
Implements the
protocols.Graph.EdgeRange
protocol.
- class Rule.IncidentEdgeRange¶
Implements the
protocols.Graph.IncidentEdgeRange
protocol.