Python Random Graph Generator
Project description
Table of contents
- Overview
- Installation
- Usage
- Issues & Bug Reports
- Todo
- Sample Files
- Example Of Usage
- Supported Formats
- Similar Works
- Dependencies
- Contribution
- References
- Citing
- Authors
- License
- Donate
- Changelog
- Code of Conduct
Overview
Pyrgg is an easy-to-use synthetic random graph generator written in Python which supports various graph file formats including DIMACS .gr files. Pyrgg has the ability to generate graphs of different sizes and is designed to provide input files for broad range of graph-based research applications, including but not limited to testing, benchmarking and performance-analysis of graph processing frameworks. Pyrgg target audiences are computer scientists who study graph algorithms and graph processing frameworks.
Open Hub | |
PyPI Counter | |
Github Stars |
Branch | master | dev |
Travis | ||
AppVeyor |
Code Quality |
Installation
Source Code
- Download Version 0.3 or Latest Source
pip install -r requirements.txt
orpip3 install -r requirements.txt
(Need root access)python3 setup.py install
orpython setup.py install
(Need root access)
PyPI
- Check Python Packaging User Guide
pip install pyrgg==0.3
orpip3 install pyrgg==0.3
(Need root access)
Conda
- Check Conda Managing Package
conda install -c sepandhaghighi pyrgg
(Need root access)
Exe Version (Only Windows)
- Download Exe-Version 0.3
- Run
PYRGG-0.3.exe
System Requirements
Pyrgg will likely run on a modern dual core PC. Typical configuration is:
- Dual Core CPU (2.0 Ghz+)
- 4GB of RAM
Note that it may run on lower end equipment though good performance is not guaranteed.
Usage
Issues & Bug Reports
Just fill an issue and describe it. I'll check it ASAP! or send an email to sepand@qpage.ir.
TODO
- Formats
- DIMACS
- JSON
- YAML
- Pickle
- CSV
- WEL
- ASP
- TGF
- UCINET DL
- GEXF
- Sizes
- Small
- Medium
- Large
- Weighted Graph
- Signed Weights
- Unweighted Graph
- Dense Graph
- Sparse Graph
- Directed Graph
- Self loop
- Parallel Arc
- Multithreading
- GUI
- Erdős–Rényi model
- Tree
Sample Files
- Sample 1-DIMACS (100 Vertices , 3KB)
- Sample 2-DIMACS (1000 Vertices , 13KB)
- Sample 3-DIMACS (1000000 Vertices , 7MB)
- Sample 4-DIMACS (5000000 Vertices , 37MB)
- Sample 1-JSON (100 Vertices , 11KB)
- Sample 2-JSON (1000 Vertices , 105KB)
- Sample 1-CSV (100 Vertices , 3KB)
- Sample 2-CSV (1000 Vertices , 51KB)
- Sample 1-WEL (100 Vertices , 5KB)
- Sample 2-WEL (1000 Vertices , 192KB)
- Sample 1-YAML (30 Vertices , 3KB)
- Sample 2-YAML (100 Vertices , 12KB)
- Sample 1-LP (100 Vertices , 7KB)
- Sample 2-LP (1000 Vertices , 76KB)
- Sample 1-Pickle (100 Vertices , 15KB)
- Sample 2-Pickle (1000 Vertices , 209KB)
- Sample 1-TGF (100 Vertices , 4KB)
- Sample 2-TGF (1000 Vertices , 61KB)
- Sample 1-UCINET DL (100 Vertices , 8KB)
- Sample 2-UCINET DL (1000 Vertices , 729KB)
Example Of Usage
- Generate synthetic data for graph processing frameworks (some of them mentioned here) performance-analysis
Fig. 1. Rand Graph Generation
- Generate synthetic data for graph benchmark suite like GAP
Supported Formats
-
p sp <number of vertices> <number of directed edge> a <head_1> <tail_1> <weight_1> . . . a <head_n> <tail_n> <weight_n>
-
<head_1>,<tail_1>,<weight_1> . . . <head_n>,<tail_n>,<weight_n>
-
{ "graph": { "nodes":[ { "id": "1" }, . . . { "id": "n" } ], "edges":[ { "source": "head_1", "target": "tail_1", "weight": "weight_1" }, . . . { "source": "head_n", "target": "tail_n", "weight": "weight_n" }, ] } }
-
graph: edges: - source: "head_1" target: "tail_1" weight: "weight_1" . . . - source: "head_n" target: "tail_n" weight: "weight_n" nodes: - id: '1' . . . - id: 'n'
-
<head_1> <tail_1> <weight_1> . . . <head_n> <tail_n> <weight_n>
-
node(1). . . . node(n). edge(head_1,tail_1,weight_1). . . . edge(head_n,tail_n,weight_n).
-
1 . . . n # 1 2 weight_1 . . . n k weight_n
-
dl format=edgelist1 n=<number of vertices> data: 1 2 weight_1 . . . n k weight_n
-
Pickle(.p) (Binary Format)
Similar Works
- Random Modular Network Generator Generates random graphs with tunable strength of community structure
- randomGraph very simple random graph generator in matlab
- Graph1 Random Graph Generator with Max capacity paths (C++)
Dependencies
master | dev |
Citing
If you use pyrgg in your research, please cite the JOSS paper ;-)
@article{Haghighi2017, doi = {10.21105/joss.00331}, url = {https://doi.org/10.21105/joss.00331}, year = {2017}, month = {sep}, publisher = {The Open Journal}, volume = {2}, number = {17}, author = {Sepand Haghighi}, title = {Pyrgg: Python Random Graph Generator}, journal = {The Journal of Open Source Software} }
JOSS | |
Zenodo |
License
References
Donate to our project
Bitcoin :
1XGr9qbZjBpUQJJSB6WtgBQbDTgrhPLPA
Payping (For Iranian citizens) :
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Unreleased
0.3 - 2019-11-29
Added
__version__
variableCHANGELOG.md
dev-requirements.txt
requirements.txt
CODE_OF_CONDUCT.md
ISSUE_TEMPLATE.md
PULL_REQUEST_TEMPLATE.md
CONTRIBUTING.md
version_check.py
pyrgg_profile.py
- Unweighted graph
- Undirected graph
- Exe version
Changed
- Test system modified
README.md
modified- Docstrings modified
get_input
function modifiededge_gen
function modified- Parameters moved to
params.py
0.2 - 2017-09-20
Added
- CSV format
- YAML format
- Weighted edge list format (WEL)
- ASP format
- Trivial graph format (TGF)
- UCINET DL format
- Pickle format
0.1 - 2017-08-19
Added
- DIMACS format
- JSON format
- README
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.