to_index_graph

Maps the nodes of the graph to integers.

sasviya.network.utils.conversions.to_index_graph(g, offset=0, map_attr=None, immutable=None)

Parameters

g : SAS graph object

Specifies the input graph to assess.

offset : int, optional

Specifies the index offset for node labels. The default is 0. When offset = r, nodes are labeled r, r+1, and so on.

map_attr : str or None, optional

Specifies the node attribute name in which to store the node of the original graph. The default is None.

immutable : bool or None, optional

Specifies whether or not to return an immutable copy. The default is None, which means that the mutability matches the input graph.

Returns

SAS graph object

Returns a SAS graph object with a standardized label.

Last updated: July 28, 2026