0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Generate realistic graphs
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 10.0.3
~> 2.13.0
~> 1.11.0
~> 0.8.5.2

Runtime

~> 0.10.2
 Project Readme

Graphshaper

Build Status Dependency Status Code Climate

Graphshaper can generate realistic, scale-free graphs of any size. It is tested with MRI Ruby (1.9.2, 1.9.3 and 2.0.0) and the 1.9 versions of JRuby and Rubinius.

Installation

Add this line to your application's Gemfile:

gem 'graphshaper', '~> 0.3.0'

And then execute:

$ bundle

Or install it yourself as:

$ gem install graphshaper

Usage

The commandline tool expects one argument: The number of vertices you want your generated graph to have. This is how to use it:

graphshaper [options] size

You can use the following options:

  • -a, --arango: Store the graph in a local ArangoDB instance
  • -l, --log: Store the graph in two CSV files for nodes and edges
  • -d, --dot: Store the graph in the dot format
  • -p, --png: Export the graph as a PNG (you need to install graphviz for that – circo is used for the layout)
  • -j, --json: Export the graph as a JSON file
  • --version: Show version

You can also use the library in your Ruby Code. You can find the documentation here.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Make your changes – don't forget to spec them with RSpec
  4. Commit your changes (git commit -am 'Added some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request