Graph.edges_of
Find the outgoing edges of a vertex
Usage
edges_of(vertex:int)
Parameters:
vertex : int
Source vertex
Returns:
list
List containing the outgoing edges and their associated weights
Example
from jellybeans.structures import Graphg = Graph()g.add_vertex(1)g.add_vertex(5)g.add_vertex(9)g.add_bidirected_edge(1, 5, (20, 30))g.add_edge(5, 9, 12)print(g.edges_of(5)) # [(1, 30), (9, 12)]