Graph shuffling package in python.
Project description
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({2: {1: {}, 3: {}}, 1: {2: {}, 0: {}}, 3: {2: {}, 4: {}}, 0: {1: {}}, 4: {3: {}}})
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
shuffle_graph-2.0.2.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for shuffle_graph-2.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bcfce13a376caae584bd37d1ac84722434bee575608cbf3b5539c9fb732326f |
|
MD5 | 6af19ee4268ad153f874763fec8b7ccc |
|
BLAKE2b-256 | f985ce7c7dd2ad89f3cbff40bbd06ac2185b270afc845fe67c3b627872872bf5 |