Skip to main content

Tools package for extending functionality of the networkx package.

Project description

Extended networkx Tools

Python Package for for visualizing and converting networkx graphs.

Introduction

This package was created for the purpose of examining bidirectional graphs with respect to its convergence rate and edge costs.

Installation

pip install extended-networkx-tools

Documentation

extended-networkx-tools.readthedocs.io

The package

Currently the package contains 3 main modules, Creator, Analytics and Visual.

Creator

Contains tools to create networkx graphs based on given parameters, such as randomly create an empty graph based on a number of nodes, or specify precisely the coordinates of nodes and the edges between them.

Analytics

Has tools for analysing the networkx object and extract useful information from it, such as convergence rate, neighbour matrix, its eigenvalues.

Solver

Used to find simple greedy solutions to a connected graph taken from graph theory. The current approaches are:

  • path: Adds edges as a path from the start to end node
  • cycle: Adds edges just like the path, but also one edge from the start to end node.
  • complete: Adds edges between all nodes to all the other nodes, such as the maximum distance between every node is one.

Visual

Is used to print a networkx graph to the screen, with its edges.

Example output graph

AnalyticsGraph

The AnalyticsGraph class is a helper class that serves the purpose of a wrapper object that can do all calculations based on changes done to the graph, rather than recalculating every metric after simple changes. Such as the connectivity state will stay the same after adding an edge.

There is also options to revert changes and keep previous calculations.

Example usage:

from extended_networkx_tools import Creator, Solver, AnalyticsGraph

# Create a random graph with a path
g = Creator.from_random(10)
g = Solver.path(g)

# Convert the graph to an AnalytcsGraph object
ag = AnalyticsGraph(g)

convergence_rate = ag.get_convergence_rate() # Calcualtes the convergence rate from scratch
ag.remove_edge(4, 5)    # Removes an edge
ag.revert()             # Revert the changes
convergence_rate = ag.get_convergence_rate() # Doesn't calculate it since it's saved from previous state

Usage

Import

from extended_networkx_tools import Creator, Analytics, Visual, Solver, AnalyticsGraph

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

extended_networkx_tools-0.13.10rc1.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

extended_networkx_tools-0.13.10rc1-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file extended_networkx_tools-0.13.10rc1.tar.gz.

File metadata

  • Download URL: extended_networkx_tools-0.13.10rc1.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for extended_networkx_tools-0.13.10rc1.tar.gz
Algorithm Hash digest
SHA256 83c8cac8015b7d4b7354a7b46fa7f5f9d0f9a0c64d20056224e0ba9a50542389
MD5 f0b9f110c8e2d09e3286a1424b3182c6
BLAKE2b-256 74c51c04295f871b01a365e4f57a76397ef34cda7fec0b994e064c41d29c6da3

See more details on using hashes here.

File details

Details for the file extended_networkx_tools-0.13.10rc1-py3-none-any.whl.

File metadata

  • Download URL: extended_networkx_tools-0.13.10rc1-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for extended_networkx_tools-0.13.10rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 e6d727ae659d9928b7b2475b618e957dc6749317915fe801dfb5ed3cf54821b6
MD5 b82de05882b16b7921e92e668a3e11f9
BLAKE2b-256 b2028fe46dca0337470e5ef7fdb1ebcbb50f7d50b1cdf04da1dd2224a100ced0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page