Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
Kruskals Minimum Spanning Tree implementation More...
#include <array>
#include <iostream>
#include <limits>
#include <cstdint>
Namespaces | |
namespace | greedy_algorithms |
for std::vector | |
Functions | |
template<typename T , std::size_t N, std::size_t M> | |
void | greedy_algorithms::findMinimumEdge (const T &infinity, const std::array< std::array< T, N >, M > &graph) |
Finds the minimum edge of the given graph. | |
static void | test () |
Self-test implementations. | |
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 | ) |
|
static |
Self-test implementations.
define a large value for int define a large value for float define a large value for double define a large value for uint32_t