EdgeIndexMap#

class EdgeIndexMap#

Bases: object

A class representing a mapping of edge indices to a tuple of node indices and weight/data payload

This class is equivalent to having a read only dict of the form:

{1: (0, 1, 'weight'), 3: (2, 3, 1.2)}

It is used to efficiently represent an edge index map for a rustworkx graph. It behaves as a drop in replacement for a readonly dict.

Methods