Skip to content

A series of algorithms that generate random graphs given degree sequences.

Notifications You must be signed in to change notification settings

denizsurmeli/random-graph-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Random Graph Generators

A collection of graph generators. The research paper can be found here.

Dependencies:

For C++:

  • CMake and Boost Libraries. g++ compiler is recommended. C++ Standard >=11

For Python:

  • Pandas, Numpy and Matplotlib.
  • Python >= 3.8.0

For Docker:

  • You need Docker.

Usage

Single Phase Execution

You can use the script for generating inputs, compiling the source code and executing the inputs with benchmarks via single script on Unix or Mac

On the project folder, change your directory to scripts.

python3 run.py n --generate --cleanup

where n is the number of inputs you want it to generate. It automatically handles the rest.

Multiple Phase Manual Execution

In this setup, every phase executed manually and no plots will be generated.

Generate the inputs by using scripts/auto_generate.py.

python3 scripts/auto_generate.py n k 

where n and k are the numbers of valid degree sequences and invalid degree sequences respectively,to be generated.

On the project folder, make a new directory called build and go into it. After that run the command:

cmake ../. && cmake --build .

Then execute the program on the build folder by feeding the inputs:

./rgg "./feeds/in"

The project is fully CLion compatible. It's suggested for users to open the project with it in order to navigate and execute easier.

Docker(Easiest Way)

There is a dockerfile for containerized version of the program with all necessary dependencies.

Change your directory to the project folder and run

docker build . --build-arg valid_inputs=N --build-arg invalid_inputs=K -t rgg:latest

Where N is the number of valid inputs and K is the number of invalid inputs. After you build the image, start the image and attach to it by running

docker run -it rgg:latest

After that you will be greeted in a containerized environment. You can find the inputs and outputs under ./feeds/in and./feeds/out respectively.

TODO

  • Havel-Hakimi Generator.
  • Documentation
  • Code Commenting
  • Sequential Algorithm Implementation
  • Benchmark CSV Exporter
  • Better CLI Scripts
  • Easy builder and runner scripts
  • Pairing Model Generator
  • Havel-Hakimi Generator
  • Graphviz Generator(Built-in Boost Libraries)
  • Input Generator
  • Input Reader
  • Output Writer
  • CMake Config

About

A series of algorithms that generate random graphs given degree sequences.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published