shuffle_graph
Graph shuffling package in python.
Installation
Installation can be done through pip. You must have python version >= 3.8
pip install shuffle-graph
Usage
The statement to import the package:
from shuffle_graph_package import *
Example:
>>> from networkx.classes.graph import Graph
>>> G = Graph({0: {1: {}}, 1: {0: {}, 2: {}}, 2: {1: {}, 3: {}}, 3: {2: {}, 4: {}}, 4: {3: {}}})
>>> seed = 170141183460469231731687303715884105727
>>> shuffle_graph(G, seed).adj #Set seed to make the results repeatable.
AdjacencyView({1: {0: {}, 2: {}}, 2: {1: {}, 3: {}}, 3: {2: {}, 4: {}}, 4: {3: {}}, 0: {1: {}}})