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.1.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for shuffle_graph-2.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae0ee7941452d81e742552204a4d1d70a7071700b8a206dd1e02ab2985664b82 |
|
MD5 | 8e75c2a75f8c7be18180034cff18770b |
|
BLAKE2b-256 | c9853c4c5a478ed56838b90e6a82fb4a8e17b19e49ae6ea74d3517d0071abe51 |