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.7
pip install shuffle-graph
Usage
The statement to import the package:
from shuffle_graph_package import *
Example:
>>> calculate_number_of_shuffles_required_under_default_random_function(10000)
6
>>> from networkx.classes.graph import Graph
>>> G = Graph({0: {1: {}}, 1: {0: {}, 2: {}}, 2: {1: {}, 3: {}}, 3: {2: {}, 4: {}}, 4: {3: {}}})
>>> shuffle_graph(G, 1, 65535).adj #Set seed to make the results repeatable.
AdjacencyView({3: {2: {}, 4: {}}, 4: {3: {}}, 1: {0: {}, 2: {}}, 2: {3: {}, 1: {}}, 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-1.1.2.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for shuffle_graph-1.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d178536b7c89fa34806f1e679f3b049727c5d3a40589120d3b80070120d3796f |
|
MD5 | ea4533b68a7c14cc6f5d303d0bf6b3b9 |
|
BLAKE2b-256 | 7ea53aaf3095058a493f06b88ee52ef761fcd3480f494008a00076ff6dc027f5 |