本文整理汇总了Java中vnreal.algorithms.utils.energy.linkStressTransformers.SubstrateLinkDemandTransformer类的典型用法代码示例。如果您正苦于以下问题:Java SubstrateLinkDemandTransformer类的具体用法?Java SubstrateLinkDemandTransformer怎么用?Java SubstrateLinkDemandTransformer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SubstrateLinkDemandTransformer类属于vnreal.algorithms.utils.energy.linkStressTransformers包,在下文中一共展示了SubstrateLinkDemandTransformer类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findShortestPath
import vnreal.algorithms.utils.energy.linkStressTransformers.SubstrateLinkDemandTransformer; //导入依赖的package包/类
LinkedList<SubstrateLink> findShortestPath(SubstrateNetwork sNetwork,
SubstrateNode n1, SubstrateNode n2,
Collection<AbstractDemand> vldemands, int epsilon) {
if (n1.getId() == n2.getId()) {
return new LinkedList<SubstrateLink>();
}
MyDijkstraShortestPath<SubstrateNode, SubstrateLink> dijkstra = new MyDijkstraShortestPath<SubstrateNode, SubstrateLink>(
sNetwork, new SubstrateLinkDemandTransformer(vldemands), true);
LinkedList<SubstrateLink> path = dijkstra.getPath(n1, n2, epsilon);
assert (path == null || Utils.fulfills(path, vldemands));
return path;
}
示例2: findShortestPath
import vnreal.algorithms.utils.energy.linkStressTransformers.SubstrateLinkDemandTransformer; //导入依赖的package包/类
LinkedList<SubstrateLink> findShortestPath(SubstrateNetwork sNetwork,
SubstrateNode n1, SubstrateNode n2,
Collection<AbstractDemand> vldemands, int epsilon) {
if (n1.getId() == n2.getId()) {
return new LinkedList<SubstrateLink>();
}
MyDijkstraShortestPath<SubstrateNode, SubstrateLink> dijkstra = new MyDijkstraShortestPath<SubstrateNode, SubstrateLink>(
sNetwork, new SubstrateLinkDemandTransformer(vldemands),
true);
LinkedList<SubstrateLink> path = dijkstra.getPath(n1, n2, epsilon);
assert (path == null || Utils.fulfills(path, vldemands));
return path;
}