Edge#
- class graph_tool.Edge#
Bases:
instanceEdge descriptor.
This class represents an edge in a
Graph.Edgeinstances are hashable, iterable and thus are convertible to a tuple, which contains the source and target vertices.Raises an exception This class cannot be instantiated from Python
Methods
Returns
Trueif the descriptor corresponds to an existing edge in the graph,Falseotherwise.Returns the source of the edge (a
Vertexinstance).Returns the target of the edge (a
Vertexinstance).- is_valid()#
Returns
Trueif the descriptor corresponds to an existing edge in the graph,Falseotherwise.