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