程序包 cn.denghanxi.s44
类 BellmanFordSP
- java.lang.Object
-
- cn.denghanxi.s44.BellmanFordSP
-
-
构造器概要
构造器 构造器 说明 BellmanFordSP(EdgeWeightedDigraph graph, int s)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 doubledistTo(int v)到v点距离(权重和)booleanhasNegativeCycle()booleanhasPathTo(int v)是否有到v点的路径Iterable<DirectedEdge>negativeCycle()Iterable<DirectedEdge>pathTo(int v)到v点的路径
-
-
-
构造器详细资料
-
BellmanFordSP
public BellmanFordSP(EdgeWeightedDigraph graph, int s)
-
-
方法详细资料
-
hasPathTo
public boolean hasPathTo(int v)
从接口复制的说明:SP是否有到v点的路径
-
pathTo
public Iterable<DirectedEdge> pathTo(int v)
从接口复制的说明:SP到v点的路径
-
hasNegativeCycle
public boolean hasNegativeCycle()
-
negativeCycle
public Iterable<DirectedEdge> negativeCycle()
-
-