ForceDiagram.edge_index

ForceDiagram.edge_index(form=None)[source]

Construct a mapping between the identifiers of edges and the corresponding indices in a list of edges.

Parameters

form (compas_ags.diagrams.FormDiagram, optional) – If a form diagra is provided as reference, the list of edges is ordered such that it corresponds to the natural ordering of edges in the form diagram.

Returns

dict – Mapping between edge identifiers and the correpsonding indices of the edges in a list.