kruskal v0.1.0 Kruskal

Documentation for Kruskal.

Link to this section Summary

Functions

Get the Minimum Spanning Tree

Link to this section Functions

Link to this function

getEdges(vertices, edges)

Get the Minimum Spanning Tree

vertices is the array of points: [{x, y}, ...] edges is an array of the edges with their weight: [{p0, p1, weight}, ...]

Examples

iex> points |> Kruskal.getEdges(edges_with_weight)

{
  [{x, y}, {x1, y1}, ...],
  [{x2, y2}, {x3, y3}, ...]
}