CouplingGraph.relabel_subgraph
- CouplingGraph.relabel_subgraph(relabeling=None)[source]
Renumber the vertices in graph according to the optionally provided relabeling dictionary, or relabel so that the vertices are in renumbered in least to greatest order and in the set {0,…,|V|-1}.
- Parameters:
graph (
CouplingGraphLike
) – A collection of edges representing a graph.relabeling (
dict[int,int]|None
) – An optional dictionary specifying current labels as keys and desired labels as values. (Default: None)
- Returns:
The relabeled CouplingGraph.
- Return type: