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({1: {0: {}, 2: {}}, 2: {1: {}, 3: {}}, 3: {2: {}, 4: {}}, 4: {3: {}}, 0: {1: {}}})
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.1.0.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for shuffle_graph-2.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ea74e89d07f3a158536d1656244e6c06f906a953a631ae2987b64fbc71388d4 |
|
MD5 | f33f796d9c5dc111969c46706581e877 |
|
BLAKE2b-256 | 99d609d79c54c187ed445f1d4245b75d333ddcbca034f9f9c75bbe9d008e3d58 |