The graph on 0 until n with the given (a, b, weight) edges, in either direction. Weights are numbers >= 0; an edge listed several times counts at its lightest weight, an edge of weight Infinity is no edge, and a loop (a, a, w) is ignored, since a vertex is at distance 0 from itself.
The graph on 0 until n with the given (a, b, weight) edges, in either direction. Weights are numbers >= 0; an edge listed several times counts at its lightest weight, an edge of weight Infinity is no edge, and a loop (a, a, w) is ignored, since a vertex is at distance 0 from itself.