Skip to content

#354 Add minimum spanning tree (C++) #355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed

#354 Add minimum spanning tree (C++) #355

wants to merge 7 commits into from

Conversation

outfrost
Copy link

Description

  • Added C++11 implementation of minimum spanning tree algorithms on an adjacency list graph
    • Dijkstra-Jarník-Prim algorithm (also known as Prim's algorithm and Jarník's algorithm)
    • Kruskal's algorithm
  • Added adjacency list graph representation data structure, as well as some helper structures
  • Added a small program showcasing these algorithms
  • Added a readme about the implementation

Related Issue: #354

How Has This Been Tested?

The code includes a small program that showcases the algorithms at work. It generates a random connected graph (given a number of nodes and a density percentage), runs both algorithms and measures the time they take to complete.

These implementations were originally part of a university project of mine, and I have done manual verification testing, as well as extensive performance benchmarking at that time. Currently there are no issues that I am aware of (apart from perhaps code clarity and general implementation design - I'm not that great at C++).

Screenshots

screenshot from 2018-10-20 23-18-31

Types of changes

  • Bug fix (change which fixes an issue with the algorithm)

  • New Algorithm (non-breaking change which adds functionality)

  • Documentation

Checklist:

  • My code follows the code style of this project.
    As far as I can see code style / code organisation style, I'm following it

  • My change requires a change to the documentation.

  • I have updated the documentation accordingly.

  • I have read the CONTRIBUTING document.

@mounikaponugoti
Copy link
Member

I guess directory structure has to be updated. @tstreamDOTh @GnikDroy Could anyone of review this?

@outfrost outfrost closed this Feb 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants