Shared.get_edge_id

Shared.get_edge_id(nodes)[source]

Map node indices to edge indices.

Parameters
nodes(sequence of) tuple (int, int)

Node indices (source, target) to be mapped to edge indices.

Returns
int, or list of int

Edge indices for nodes.