Git Product home page Git Product logo

pqs's Introduction

pqs (Priority QueueS)

Build Status Analysis Status

Implementation of Dijkstra's Single Source Shortest Path algorithm for directed graphs using different priotity queues (notably Fibonacci and Binomial Heaps).

Build

The make folder contains a Makefile to build on Linux. The vs folder contains a Visual Studio solution to build on Windows.

The generated program is ssp (ssp.exe on Windows).

Run

ssp can be used either to generate the shortest route from every source to every destination on a given graph, or to test the performance of the different queues on random graphs of different densities.

./ssp -is file_name

runs Dijkstra's Single Source Shortest Path algorithm using an unsorted queue as priority queue.

./ssp -ib file_name

runs Dijkstra's Single Source Shortest Path algorithm using a Binomial Heap as priority queue.

./ssp -if file_name

runs Dijkstra's Single Source Shortest Path algorithm using a Fibonacci Heap as priority queue.

Alternatively

./ssp -r

runs Dijkstra's Single Source Shortest Path algorithm on a set of random graphs with different densities using for each priority queue and outputs the performance of each. The output format looks as follows:

Number of vertices    Density	Simple scheme(msec)    F-heap scheme (msec)    B-heap scheme(msec)
1001                  10%       	69464.000000           50349.000000            45607.000000
1001                  20%       	94291.000000           74725.000000            70161.000000
1001                  30%       	114225.000000          97229.000000            90580.000000
1001                  40%       	141640.000000          130986.000000           120526.000000
1001                  50%           169564.000000          155323.000000           148056.000000

pqs's People

Contributors

giacobenin avatar

Stargazers

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