ForceDiagram.uv_index

ForceDiagram.uv_index(form=None)

Construct a map relating edge uv pairs to their index in an edge list.

Parameters:
formcompas_tna.diagrams.FormDiagram, optional

If provided, this maps edge uv’s to the index in a list matching the ordering of corresponding edges in the form diagram.

Returns:
dict

A dict mapping edge uv tuples to indices in an (ordered) edge list.