class Pos2DMapping#

Bases: object

A class representing a mapping of node indices to 2D positions

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

{1: [0, 1], 3: [0.5, 1.2]}

It is used to efficiently represent a rustworkx generated 2D layout for a graph. It behaves as a drop in replacement for a readonly dict.