new Graph(edges, nodesCount)
Graph.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
edges |
Array
|
Array with graph edges. |
nodesCount |
Number
|
Number of nodes in graph. |
Methods
prim() → {Graph}
Executes Prim's algorithm and returns minimum spanning tree.
- Source:
Returns:
- Type:
-
Graph
Graph which is the minimum spanning tree.