graphtester.label#

graphtester.label(graph: Graph, methods: List[str], copy: bool = True) Graph#

Deterministically label and rewire a graph.

Uses the given provided methods. Compress the labels as string and add as a “label” attribute.

Parameters:
graphig.Graph

The graph to label and rewire.

methodsList[str]

The methods to use to label the graph.

copybool

Whether to operate on a copy of the graph.

Returns:
ig.Graph

The labeled and rewired graph.