Adaptive Local Complementation Package
Project description
ALCPack
A python package to create an edge between any two given nodes in a simple, connected, and undirected graph via a sequence of local complementation operations.
Requirements
ALCPack
is developed based on Python 3.0 (or more recent releases), and uses NetworkX -- A python package to analyze complex networks
Installation
To install ALCPack
using pip:
$ python3 -m pip install --upgrade pip
$ python3 -m pip install alcpack
The steps to build the package locally for installation via pip are given in ALCPack_References, available in the documentation folder.
Description
ALCPack
provides three functions, as listed below.
-
local_complementation(G, target): Performs a local complementation operation on the input graph G w.r.t. the node 'target' and returns the transformed graph
-
path_category(G, path): Determines the category of a simple path connecting two chosen nodes in a simple, connected, and undirected graph, and distills a category 1 path out of the chosen path, if the chosen path is of category 2. Returns the category (category 1 or category 2) of the chosenn path, and a distilled category 1 path (chosen path) if the chosen path is of category 2 (category 1)
-
alc_function(G, path): Performs adaptive local complementation operation on the input graph G w.r.t. the chosen simple path 'path'. Returns the modified graph with an edge between the source and the destination nodes
Use
To call ALCPack
functions in the Python 3.0 (or higher) environment,
>>> import alcpack as alc
To use ALCPack
functions in the Python 3.0 (or higher) environment,
>>> H=alc.local_complementation(G,target)
>>> n,newpath=alc.path_category(G,path)
>>> H=alc.alc_function(G,path)
The parameters used in the functions are as below.
Input
G: Networkx graph, Input parameter
path: List of nodes, Input parameter
Represents a path between a source (first node in 'path') and a destination (last node in 'path')
target: Node, Input parameter
Represents a node with respect to which the local complementation operation is performed
Output
H: NetworkX graph, Output parameter
Transformed graph due to ALCPack functions
n: Integer, Output parameter
Takes value 1 or 2, represents the category of the input 'path'
newpath: List of nodes, Output parameter
Category 1 path
Information on the theoretical background of ALCPack
is given in ALCPack_References, which is available in the documentation folder.
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
Built Distribution
File details
Details for the file alcpack-1.1.1.tar.gz
.
File metadata
- Download URL: alcpack-1.1.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a129ec8c6ec7038a1668deb7b3715b241b8f1ce64e6b2589d5f7b648b3b65488 |
|
MD5 | 16b49b2ec5efddeee5f169e37422295d |
|
BLAKE2b-256 | b54c05c702eb9faa751dcbb944bc9e3895d086b9e3225aa2c1c98818170a0307 |
File details
Details for the file alcpack-1.1.1-py3-none-any.whl
.
File metadata
- Download URL: alcpack-1.1.1-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85bb4e49ed472fc3d21bac7af08672509afef7481d1e02a506c7ed796c70f0d6 |
|
MD5 | f379f5c42f7db5c713df8636fad03272 |
|
BLAKE2b-256 | c26c8769389c6960fa19d903e31e31a559973ab019aa220250d6a3a87941533c |