Code Monkey home page Code Monkey logo

graph_generator's Introduction

Connected Graph Generator

This is a Python program to randomly generate sets of connected graphs for research purposes. The generated graphs can be exported as GraphML files.

  • A set of graphs can be generated to have a common graph.
  • Node and Graph attributes can also be generated randomly.

The generator is based on networkx library (and based on algorithm Erdős-Rényi graphs). It requires Python 2.7+ with the following libraries pre-installed:

- pathlib
- networkx
- matplotlib

A simple command line interface is avaiable for easy generation of graphs, but Classes can be used directly for further customisations. Once cloned this repository, use the generate_graph.py to generate set of graphs. Command line syntax given below:

generate_graphs.py -n <number of graphs> -o <output folder> -m <min no.of nodes of common graph> -x <max no. of nodes of common graph> -t <max total no. of nodes of graphs>"

Classes

generate_grahs (MainGraphGenerator) - main driver program CommonGraphGenerator - used to generate a common graph GraphGenerator - generate random graphs either with a common graph or not GraphParameters - custom attribute provider for generated graphs GraphUtils - post-processor for generated .GraphML files.

License

GPL

Author/Contact

Asanka Wasala

graph_generator's People

Contributors

wasala avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.