skip to navigation
skip to content

Not Logged In

apgl 0.8.0

A fast python graph library based on numpy and scipy.

Package Documentation

Another Python Graph Library is a simple, fast and easy to use graph library. Here is an example of its usage:

>>> from apgl.graph import GeneralVertexList, SparseGraph
>>> numVertices = 5
>>> graph = SparseGraph(numVertices)
>>> graph[0,1] = 1
>>> graph[0,2] = 3
>>> graph[1,2] = 0.1
>>> graph[3,4] = 2
>>> graph.setVertex(0, "abc")
>>> graph.findConnectedComponents()
[[0, 1, 2], [3, 4]]
>>> graph.getWeightMatrix()
array([[ 0. ,  1. ,  3. ,  0. ,  0. ],
       [ 1. ,  0. ,  0.1,  0. ,  0. ],
       [ 3. ,  0.1,  0. ,  0. ,  0. ],
       [ 0. ,  0. ,  0. ,  0. ,  2. ],
       [ 0. ,  0. ,  0. ,  2. ,  0. ]])
>>> graph.degreeDistribution()
array([0, 2, 3])
>>> graph.neighbours(0)
array([2, 1], dtype=int32)
>>> print(graph)
SparseGraph: vertices 5, edges 4, undirected, vertex list type: GeneralVertexList

More Information

 
File Type Py Version Uploaded on Size
apgl-0.8.0-py2.7.egg (md5) Python Egg 2.7 2013-10-17 312KB
apgl-0.8.0-py3.2.egg (md5) Python Egg 3.2 2013-10-17 316KB
apgl-0.8.0-py3.3.egg (md5) Python Egg 3.3 2013-10-17 325KB
apgl-0.8.0.tar.gz (md5) Source 2013-10-17 107KB
apgl-0.8.0.win32.exe (md5) MS Windows installer any 2013-10-17 317KB
  • Downloads (All Versions):
  • 91 downloads in the last day
  • 564 downloads in the last week
  • 2159 downloads in the last month