本文整理汇总了Java中vnreal.algorithms.basicVN.BasicVNAssignmentAlgorithm.getNRNode方法的典型用法代码示例。如果您正苦于以下问题:Java BasicVNAssignmentAlgorithm.getNRNode方法的具体用法?Java BasicVNAssignmentAlgorithm.getNRNode怎么用?Java BasicVNAssignmentAlgorithm.getNRNode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vnreal.algorithms.basicVN.BasicVNAssignmentAlgorithm
的用法示例。
在下文中一共展示了BasicVNAssignmentAlgorithm.getNRNode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: algorithmTest
import vnreal.algorithms.basicVN.BasicVNAssignmentAlgorithm; //导入方法依赖的package包/类
@Test
public void algorithmTest() {
SubstrateNetwork subsNetwork = createSubstrate();
List<VirtualNetwork> vndemands = createVNDemands();
NetworkStack stack = new NetworkStack(subsNetwork, vndemands);
BasicVNAssignmentAlgorithm algo1 = new BasicVNAssignmentAlgorithm(
stack, 1, 1);
// Collection<List<SubstrateLink>> paths = algo1.distance(subsNetwork,
// subsNode5, subsNode2, null);
// assertTrue(!paths.isEmpty());
// assertTrue(paths.size() == 3);
// SubstrateNode biggestNodeStressNode = Utils
// .findSubstrateNodeWithBiggestStress(subsNetwork.getVertices());
// SubstrateLink biggestLinkStressLink = Utils
// .findSubstrateLinkWithBiggestStress(subsNetwork.getEdges());
// System.out.println("biggest node stress... "
// + biggestNodeStressNode.getId() + " / "
// + Utils.getStressLevel(biggestNodeStressNode));
// System.out.println("biggest link stress... "
// + biggestLinkStressLink.getId() + " / "
// + Utils.getStressLevel(biggestLinkStressLink));
// double distance = algo1.distance(paths.iterator().next(),
// biggestLinkStressLink.getStressLevel(), 1);
// System.out.println("distance of path 0: " + distance);
// assertTrue(distance == 3.0);
SubstrateNode nrNode = algo1.getNRNode(subsNetwork);
System.out.println("nrNode: " + nrNode);
algo1.performEvaluation();
assertNotNull(algo1);
// for (List<SubstrateLink> path : paths) {
// for (SubstrateLink l : path) {
// System.out.print(l.getId() + "->");
// }
// System.out.println();
// }
// Mapping computedMapping = algo1.getComputedMapping();
// System.out.println("mapping " + computedMapping.hashCode()
// + ": =====\n");
// System.out.println(computedMapping + "\n\n");
}
示例2: algorithmTest
import vnreal.algorithms.basicVN.BasicVNAssignmentAlgorithm; //导入方法依赖的package包/类
@Test
public void algorithmTest() {
SubstrateNetwork subsNetwork = createSubstrate();
List<VirtualNetwork> vndemands = createVNDemands();
NetworkStack stack = new NetworkStack(subsNetwork, vndemands);
BasicVNAssignmentAlgorithm algo1 = new BasicVNAssignmentAlgorithm(
stack, 1, 1, true);
// Collection<List<SubstrateLink>> paths = algo1.distance(subsNetwork,
// subsNode5, subsNode2, null);
// assertTrue(!paths.isEmpty());
// assertTrue(paths.size() == 3);
// SubstrateNode biggestNodeStressNode = Utils
// .findSubstrateNodeWithBiggestStress(subsNetwork.getVertices());
// SubstrateLink biggestLinkStressLink = Utils
// .findSubstrateLinkWithBiggestStress(subsNetwork.getEdges());
// System.out.println("biggest node stress... "
// + biggestNodeStressNode.getId() + " / "
// + Utils.getStressLevel(biggestNodeStressNode));
// System.out.println("biggest link stress... "
// + biggestLinkStressLink.getId() + " / "
// + Utils.getStressLevel(biggestLinkStressLink));
// double distance = algo1.distance(paths.iterator().next(),
// biggestLinkStressLink.getStressLevel(), 1);
// System.out.println("distance of path 0: " + distance);
// assertTrue(distance == 3.0);
SubstrateNode nrNode = algo1.getNRNode(subsNetwork);
System.out.println("nrNode: " + nrNode);
algo1.performEvaluation();
assertNotNull(algo1);
// for (List<SubstrateLink> path : paths) {
// for (SubstrateLink l : path) {
// System.out.print(l.getId() + "->");
// }
// System.out.println();
// }
// Mapping computedMapping = algo1.getComputedMapping();
// System.out.println("mapping " + computedMapping.hashCode()
// + ": =====\n");
// System.out.println(computedMapping + "\n\n");
}
示例3: algorithmTest
import vnreal.algorithms.basicVN.BasicVNAssignmentAlgorithm; //导入方法依赖的package包/类
@Test
public void algorithmTest() {
SubstrateNetwork subsNetwork = createSubstrate();
List<VirtualNetwork> vndemands = createVNDemands();
NetworkStack stack = new NetworkStack(subsNetwork, vndemands);
BasicVNAssignmentAlgorithm algo1 = new BasicVNAssignmentAlgorithm(
stack, 1, 1, true);
// Collection<List<SubstrateLink>> paths = algo1.distance(subsNetwork,
// subsNode5, subsNode2, null);
// assertTrue(!paths.isEmpty());
// assertTrue(paths.size() == 3);
// SubstrateNode biggestNodeStressNode = Utils
// .findSubstrateNodeWithBiggestStress(subsNetwork.getVertices());
// SubstrateLink biggestLinkStressLink = Utils
// .findSubstrateLinkWithBiggestStress(subsNetwork.getEdges());
// System.out.println("biggest node stress... "
// + biggestNodeStressNode.getId() + " / "
// + Utils.getStressLevel(biggestNodeStressNode));
// System.out.println("biggest link stress... "
// + biggestLinkStressLink.getId() + " / "
// + Utils.getStressLevel(biggestLinkStressLink));
// double distance = algo1.distance(paths.iterator().next(),
// biggestLinkStressLink.getStressLevel(), 1);
// System.out.println("distance of path 0: " + distance);
// assertTrue(distance == 3.0);
SubstrateNode nrNode = algo1.getNRNode(subsNetwork);
System.out.println("nrNode: " + nrNode);
algo1.performEvaluation();
assertNotNull(algo1);
// for (List<SubstrateLink> path : paths) {
// for (SubstrateLink l : path) {
// System.out.print(l.getId() + "->");
// }
// System.out.println();
// }
// Mapping computedMapping = algo1.getComputedMapping();
// System.out.println("mapping " + computedMapping.hashCode()
// + ": =====\n");
// System.out.println(computedMapping + "\n\n");
}