当前位置: 首页>>代码示例>>Java>>正文


Java BasicVNAssignmentAlgorithm.getNRNode方法代码示例

本文整理汇总了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");

}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:50,代码来源:BasicVNAssignmentAlgorithmTest.java

示例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");

    }
 
开发者ID:liruixpc11,项目名称:crucian,代码行数:50,代码来源:BasicVNAssignmentAlgorithmTest.java

示例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");

}
 
开发者ID:fabe85,项目名称:Alevin,代码行数:50,代码来源:BasicVNAssignmentAlgorithmTest.java


注:本文中的vnreal.algorithms.basicVN.BasicVNAssignmentAlgorithm.getNRNode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。