Class EdgeWeightedGraph

The EdgeWeightedGraph class represents an undirected graph of vertices
named 0 through V-1, where each edge has a real-valued weight.
It supports the following operations: add an edge to the graph,
in the graph, iterate over all of the neighbors incident to a vertex.
Parallel edges and self-loops are permitted.

For additional documentation, see Section 4.3 of
Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.