Skip to main content

Docstring yay

Project description

edge_gravity

Function that calculates Edge Gravity as described in: Helander, M.E. & McAllister, S. Appl Netw Sci (2018) 3: 7. https://doi.org/10.1007/s41109-018-0063-6

The k-shortest-paths algorithm stems from:
    Jin Y. Yen, "Finding the K Shortest Loopless Paths in a
    Network", Management Science, Vol. 17, No. 11, Theory Series
    (Jul., 1971), pp. 712-716

It utilizes multiple cores, only tested on Linux.

Parameters
----------
g: NetworkX DiGraph

k: non-negative Integer that describes the maximum number of shortest
    path to consider per node.

weight: gets passed to networkx.shortest_simple_paths - for a detailed description
    see the docstring of this function.

Returns
----------
A 2-tuple where 
    the first element is either kstar or False if kstar is not known
    the second element is a collections.Counter object with edges as keys and the number of paths as values

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

edge_gravity-0.0.3.tar.gz (65.3 kB view hashes)

Uploaded Source

Built Distribution

edge_gravity-0.0.3-py2.py3-none-any.whl (64.8 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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