Code Monkey home page Code Monkey logo

graph_gen's Introduction

Graph Gen

Graph Gen is a conveniency tool (and library crate) that lets you generate pseudo-random graphs based on the Erdos-Renyi G(n,p) model.

This tool is mainly designed to be simple and reasonably fast. Its purpose was for me to use random input graphs in my research experiments. If you like it and/or find it useful, that's a bonus.

Options

Graph Gen comes with several options:

  • It lets you build graphs that allow/not allow self loops (-l flag)
  • It lets you build directed graph if that is what you need (-d flag)
  • It lets you generate a random weighted max2sat instance (-m flag)
  • It lets you specify weights that can be used as random labels for the edges of your graph (-w option).
  • It lets you output your graph either in DIMACS or in GraphViz format.

All necessary info should be available with the built in help.

Help

graph_gen 0.1.2
Convenience tool to generate pseudo random graphs

USAGE:
    graph_gen [FLAGS] [OPTIONS] --nb_vertices <nb_vertices> --probability <probability>

FLAGS:
    -d, --digraph    If set, the generated graph will be a digraph
    -h, --help       Prints help information
    -l, --loops      If set, self loops are allowed in the generated graph
    -m, --max2sat    If set, the generated graph will be a max2sat instance
    -V, --version    Prints version information

OPTIONS:
    -n, --nb_vertices <nb_vertices>    The number of vertices in the generated graph
    -o, --output <output>              The output language (defaults to dimacs)
    -p, --probability <probability>    The likelihood of any edge to be picked
    -w, --weights <weights>...         Optional weight candidates

Build

Graph Gen was written in Rust. As such, it is compiled with the cargo tool. So cargo build --release will produce the release binary in the target folder.

graph_gen's People

Contributors

xgillard avatar

Watchers

 avatar  avatar  avatar  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.