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, the id 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 ith vertex of the graph.

Return type:

Graph.Vertex

class Graph.EdgeRange

Implements the protocols.Graph.EdgeRange protocol.

class Graph.IncidentEdgeRange

Implements the protocols.Graph.IncidentEdgeRange protocol.