A python interface for decompressing Boldi-Vigna graphs
Project description
This library implements a decoder for a Boldi-Vigna graph structure, a highly compressed means of storing web-graphs. The library is written in pure C. It includes a Python interface, and a means to implement multi-threaded graph algorithms.
Features
In-memory and on-disk graph storage
Sequential iteration over graph edges
Parallel iteration over graph edges
random access to graph edges
Installation
Compile the Cython source code(Cython is assumed to have installed):
python setup.py build_ext --inplace
To clean the library:
python setup.py clean
Synopsis
To use the library in Python code:
import bvg
G = bvg.BVGraph('wb-cs.stanford', 0) # sequential scan
print 'nodes = ' + str(G.nverts)
print 'edges = ' + str(G.nedges)
edges_and_degrees = G.edges_and_degrees()
for (src, dst, degree) in edges_and_degrees:
print 'node ' + str(src) + ' has degree ' + str(degree)
print 'edge: ' + str(src) + ' -> ' + str(dst)
License
GPL version 2.
Copyright by David F. Gleich, 2007-2014
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
File details
Details for the file pylibbvg-2.0.19.1.tar.gz.
File metadata
- Download URL: pylibbvg-2.0.19.1.tar.gz
- Upload date:
- Size: 94.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45104939bf6b857d7febe028e5d4fb62832b5eacf2ad36b0acc180834ddf202a
|
|
| MD5 |
1c5f7c143c25f5c8e46fb0dd066dd1f9
|
|
| BLAKE2b-256 |
102a234c880969004a7e0ff93d2495ae5acd10244d4ed0529eafbd9e128d5082
|