4.1.9.3. graph/GraphInterface¶
The Graph
class implements the protocols.LabelledGraph
protocol,
and thus have the following nested types.
- class Graph.Vertex¶
Implements the
protocols.LabelledGraph.Vertex
protocol. Additionally, theid
is in the range \([0, numVertices[\).
- class Graph.Edge¶
Implements the
protocols.LabelledGraph.Edge
protocol.
- class Graph.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 Graph.EdgeRange¶
Implements the
protocols.Graph.EdgeRange
protocol.
- class Graph.IncidentEdgeRange¶
Implements the
protocols.Graph.IncidentEdgeRange
protocol.