Skip to content

Using Prim's Algorithm to create a MST from a given graph.

Notifications You must be signed in to change notification settings

dipack95/Prims_Network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prims Minimum Spanning Tree for a Graph

This is a Graph Theory based project to connect all the villages in an area, most efficiently. It uses the Prim's algorithm to construct the Minimum Spanning Tree for the graph.

Usage

Create a new Graph object. By using the addNode(..), and the addEdge(..) functions, construct a graph. The graph object contains variables that store all the edges, the nodes, and the number of nodes in the particular graph.

By default, the addEdge(..) function adds a bidirectional edge between the two target nodes. Another function, addSingularEdge(..) adds a directed edge between the two targeted nodes.

The Graph class also has functions to create, and populate an adjacency matrix, calculate the number of components in the graph, update and modify edges, and to check if an edge exists.

Disclaimer

The bootstrap template used for this project was not created by us. We do not claim credit for it, in anyway.

About

Using Prim's Algorithm to create a MST from a given graph.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published