最短路径 APIs 带权有向图中的最短路径,这节讨论从源点(s)到图中其它点的最短路径(single source). Weighted Directed Edge API 需要新的数据类型来表示带权有向边. Weighted Directed Edge:implementation public class DirectedEdge { private final int v, w; private final double weight; public DirectedEdge(int v,…