Edge

class graf.Edge(id, from_node, to_node, pos=None)[source]

Class of edges in Graph: - Each edge maintains the source (from) graf.Node and the destination (to) graf.Node. - Edges may also contain one or more graf.Annotation objects.

__init__(id, from_node, to_node, pos=None)[source]

Edge Constructor.

id : str
The ID for the new edge.
from_node : graf.Node
The source node for the edge.
to_node : graf.Node
The target node for the edge.
pos : int, optional
An optional position of the edge in the graph. This will only be used when we render the graf, to make it easier to store an order of the edges.