GithubHelp home page GithubHelp logo

ihsingh2 / spanner Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 37.07 MB

Project for Introduction to Algorithm Engineering course

CMake 1.33% C++ 66.91% Python 3.45% Shell 1.92% Cuda 3.76% Gnuplot 8.48% TeX 14.15%

spanner's Introduction

Graph Spanners

Brief

Implementation and analysis of the algorithms described in:

  • Baswana, Surender & Sen, Sandeep. (2003). A Simple and Linear Time Randomized Algorithm for Computing Sparse Spanners in Weighted Graphs

Instructions

Steps to build

mkdir build/
cd build/
cmake ..
make

Steps to run

./build/spanner input/<graph.mtx> <algorithm> [<k>]

# algorithm:
#     0: 3-spanner
#     1: (2k - 1)-spanner (vertex-cluster joining)
#     2: (2k - 1)-spanner (cluster-cluster joining)

Using scripts

1. Generating dense graphs

python scripts/generator.py <outfile> <num_vertices>

2. Running tests

./tests.sh <algorithm> [<k>]

Using macros

Change (append/remove) the following line in CMakeLists.txt.

target_compile_definitions(spanner PRIVATE TIMING)
  • VALIDATION - Validate the algorithm's output by running APSP.

  • TIMING - Measure the time taken by every stage of the algorithm.

File Structure

  • headers/ - Class and function definitions.

  • input/ - Undirected Weighted Graphs from SuiteSparse Matrix Collection (Matrix Market).

  • plots/ - Data concerning runtime behaviour of algorithm.

  • report/ - Project report.

  • scripts/ - Helper scripts for input generation and testing.

  • src/ - Main C++/CUDA implementation.

spanner's People

Contributors

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