Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
Kruskals Minimum Spanning Tree implementation More...
#include <array>
#include <iostream>
Namespaces | |
namespace | greedy_algorithms |
for std::vector | |
Functions | |
template<typename T > | |
void | greedy_algorithms::findMinimumEdge (const int &infinity, const std::array< std::array< T, 6 >, 6 > &graph) |
Finds the minimum edge of the given graph. | |
int | main () |
Main function. | |
Kruskals Minimum Spanning Tree implementation
Quoted from Simplilearn.
Kruskal’s algorithm is the concept that is introduced in the graph theory of discrete mathematics. It is used to discover the shortest path between two points in a connected weighted graph. This algorithm converts a given graph into the forest, considering each node as a separate tree. These trees can only link to each other if the edge connecting them has a low value and doesn’t generate a cycle in MST structure.
int main | ( | void | ) |
Main function.