Implementation of Prim's algorithm for growing a minimum spanning
tree. Follows
CLRS, pp. 634ff.
In this implementation, the markEdges() method does 2 things:
Marks the edges belonging to the minimum spanning tree as
BLACK and all other edges WHITE, and
Specifies the parents of all vertices so that the specified
root vertex is the root node in the minimum spanning tree marked
by BLACK edges.
Set edges in minimum spanning tree to BLACK, all other edges are
set to WHITE. Parents of all vertices in the graph are also modified
to show a path leading back to the specified root.