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


Java IHiddenHopMapping类代码示例

本文整理汇总了Java中vnreal.hiddenhopmapping.IHiddenHopMapping的典型用法代码示例。如果您正苦于以下问题:Java IHiddenHopMapping类的具体用法?Java IHiddenHopMapping怎么用?Java IHiddenHopMapping使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IHiddenHopMapping类属于vnreal.hiddenhopmapping包,在下文中一共展示了IHiddenHopMapping类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getAllHhs

import vnreal.hiddenhopmapping.IHiddenHopMapping; //导入依赖的package包/类
private Class<?>[] getAllHhs() {
	List<Class<?>> hhClasses = Arrays.asList(ClassScanner
			.getClassesImplementing(this.getClass(),
					"vnreal.hiddenhopmapping", IHiddenHopMapping.class));

	// sort.
	Collections.sort(hhClasses, new Comparator<Class<?>>() {
		@Override
		public int compare(Class<?> o1, Class<?> o2) {
			// Sort by class name
			return o1.getSimpleName().compareTo(o2.getSimpleName());
		}
	});

	return hhClasses.toArray(new Class[hhClasses.size()]);
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:17,代码来源:HiddenHopsDialog.java

示例2: setHhMappings

import vnreal.hiddenhopmapping.IHiddenHopMapping; //导入依赖的package包/类
public void setHhMappings(List<IHiddenHopMapping> hhs) {
	for (Network<?,?,?> net : ns.getVirtuals()) {
		VirtualNetwork vNet = (VirtualNetwork) net;
		for (VirtualLink vLink : vNet.getEdges()) {
			// Clearing past hidden hops demands
			vLink.clearHiddenHopDemands();
			for (AbstractDemand dem : vLink) {
				for (IHiddenHopMapping hh : hhs)
					if (hh.accepts(dem))
						vLink.addHiddenHopDemand(hh.transform(dem));
			}
		}
	}
	// Adding the hiddenhops mapping to the link and node mapping algorithm
	linkMappingAlgorithm.setHhMappings(hhs);
	nodeMappingAlgorithm.setHhMappings(hhs);
	
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:19,代码来源:GenericMappingAlgorithm.java

示例3: map

import vnreal.hiddenhopmapping.IHiddenHopMapping; //导入依赖的package包/类
@Override
public NetworkStack map(AlgorithmParameter data, SubstrateNetwork substrate, List<VirtualNetwork> virtuals) {
	NetworkStack stack = new NetworkStack(substrate, virtuals);
	
	LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
	double hiddenHopsFactor = 0;
	hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));

	AlgorithmParameter param = new AlgorithmParameter();
	param.put("kShortestPath", "50");
	param.put("distance", "35");
	param.put("PathSplitting", "false");
	param.put("eppstein", "false");
	GenericMappingAlgorithm algo = new AvailableResources(param);
	algo.setStack(stack);
	if (algo instanceof GenericMappingAlgorithm)
		((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);
	
	algo.performEvaluation();
	
	return stack;
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:23,代码来源:GARSPTest.java

示例4: map

import vnreal.hiddenhopmapping.IHiddenHopMapping; //导入依赖的package包/类
@Override
public NetworkStack map(AlgorithmParameter data, SubstrateNetwork substrate, List<VirtualNetwork> virtuals) {
	NetworkStack stack = new NetworkStack(substrate, virtuals);
	
	LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
	double hiddenHopsFactor = 0;
	hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));

	AlgorithmParameter param = new AlgorithmParameter();
	param.put("weightCpu", "0");
	param.put("weightBw", "0");
	param.put("randomize", "false");
	param.put("overload", "false");
	param.put("distance", "35");
	param.put("PathSplitting", "true");
	GenericMappingAlgorithm algo = new CoordinatedMapping(param);
	algo.setStack(stack);		if (algo instanceof GenericMappingAlgorithm)
		((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);
	
	algo.performEvaluation();
	
	return stack;
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:24,代码来源:DViNEPSTest.java

示例5: map

import vnreal.hiddenhopmapping.IHiddenHopMapping; //导入依赖的package包/类
@Override
public NetworkStack map(AlgorithmParameter data, SubstrateNetwork substrate, List<VirtualNetwork> virtuals) {
	NetworkStack stack = new NetworkStack(substrate, virtuals);
	
	LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
	double hiddenHopsFactor = 0;
	hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));

	AlgorithmParameter param = new AlgorithmParameter();
	param.put("weightCpu", "0");
	param.put("weightBw", "0");
	param.put("distance", "35");
	param.put("PathSplitting", "true");
	GenericMappingAlgorithm algo = new AvailableResources(param);
	algo.setStack(stack);
	if (algo instanceof GenericMappingAlgorithm)
		((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);
	
	algo.performEvaluation();
	
	return stack;
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:23,代码来源:GARPSTest.java

示例6: map

import vnreal.hiddenhopmapping.IHiddenHopMapping; //导入依赖的package包/类
@Override
public NetworkStack map(AlgorithmParameter data, SubstrateNetwork substrate, List<VirtualNetwork> virtuals) {
	NetworkStack stack = new NetworkStack(substrate, virtuals);

	LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
	double hiddenHopsFactor = 0;
	hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));

	AlgorithmParameter param = new AlgorithmParameter();
	param.put("weightCpu", "0");
	param.put("weightBw", "0");
	param.put("kShortestPath", "50");
	param.put("randomize", "false");
	param.put("overload", "false");
	param.put("distance", "35");
	param.put("PathSplitting", "false");
	param.put("eppstein", "false");
	GenericMappingAlgorithm algo = new CoordinatedMapping(param);
	algo.setStack(stack);
	if (algo instanceof GenericMappingAlgorithm)
		((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);
	
	algo.performEvaluation();
	
	return stack;
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:27,代码来源:DViNESPTest.java

示例7: map

import vnreal.hiddenhopmapping.IHiddenHopMapping; //导入依赖的package包/类
@Override
public NetworkStack map(AlgorithmParameter data, SubstrateNetwork substrate, List<VirtualNetwork> virtuals) {
	NetworkStack stack = new NetworkStack(substrate, virtuals);
	
	LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
	double hiddenHopsFactor = 0;
	hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));

	AlgorithmParameter param = new AlgorithmParameter();
	param.put("weightCpu", "0");
	param.put("weightBw", "0");
	param.put("distance", "35");
	param.put("PathSplitting", "true");
	GenericMappingAlgorithm algo = new AvailableResources(param);
	algo.setStack(stack);
	if (algo instanceof GenericMappingAlgorithm)
		((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);

	algo.performEvaluation();
	
	return stack;
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:23,代码来源:RWMMPSTest.java

示例8: map

import vnreal.hiddenhopmapping.IHiddenHopMapping; //导入依赖的package包/类
@Override
public NetworkStack map(AlgorithmParameter data, SubstrateNetwork substrate, List<VirtualNetwork> virtuals) {
	NetworkStack stack = new NetworkStack(substrate, virtuals);
	
	LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
	double hiddenHopsFactor = 0;
	hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));

	AlgorithmParameter param = new AlgorithmParameter();
	param.put("kShortestPath", "50");
	param.put("distance", "35");
	param.put("PathSplitting", "false");
	param.put("eppstein", "false");
	GenericMappingAlgorithm algo = new AvailableResources(param);
	algo.setStack(stack);
	if (algo instanceof GenericMappingAlgorithm)
		((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);

	algo.performEvaluation();
	
	return stack;
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:23,代码来源:RWMMSPTest.java

示例9: mapNetwork

import vnreal.hiddenhopmapping.IHiddenHopMapping; //导入依赖的package包/类
@Override
public boolean mapNetwork(SubstrateNetwork network, VirtualNetwork vNetwork) {
	List<VirtualNetwork> vns = new LinkedList<VirtualNetwork>();
	vns.add(vNetwork);
	NetworkStack stack = new NetworkStack(network, vns);
	LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
	double hiddenHopsFactor = 0;
	hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));
	
	AlgorithmParameter param = new AlgorithmParameter();
	param.put("weightCpu", "0");
	param.put("weightBw", "0");
	param.put("distance", "35");
	param.put("PathSplitting", "true");
	GenericMappingAlgorithm algo = new AvailableResources(param);
	algo.setStack(stack);
	if (algo instanceof GenericMappingAlgorithm)
		((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);

	algo.performEvaluation();
	return VnrUtils.isMapped(vNetwork);

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

示例10: mapNetwork

import vnreal.hiddenhopmapping.IHiddenHopMapping; //导入依赖的package包/类
@Override
public boolean mapNetwork(SubstrateNetwork network, VirtualNetwork vNetwork) {
	List<VirtualNetwork> vns = new LinkedList<VirtualNetwork>();
	vns.add(vNetwork);
	NetworkStack stack = new NetworkStack(network, vns);
	LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
	double hiddenHopsFactor = 0;
	hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));

	AlgorithmParameter param = new AlgorithmParameter();
	param.put("kShortestPath", "50");
	param.put("distance", "35");
	param.put("PathSplitting", "false");
	param.put("eppstein", "false");
	GenericMappingAlgorithm algo = new AvailableResources(param);
	algo.setStack(stack);
	if (algo instanceof GenericMappingAlgorithm)
		((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);

	algo.performEvaluation();
	return VnrUtils.isMapped(vNetwork);

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

示例11: mapNetwork

import vnreal.hiddenhopmapping.IHiddenHopMapping; //导入依赖的package包/类
@Override
public boolean mapNetwork(SubstrateNetwork network, VirtualNetwork vNetwork) {
	List<VirtualNetwork> vns = new LinkedList<VirtualNetwork>();
	vns.add(vNetwork);
	NetworkStack stack = new NetworkStack(network, vns);
	LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
	double hiddenHopsFactor = 0;
	hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));

	AlgorithmParameter param = new AlgorithmParameter();
	param.put("weightCpu", "0");
	param.put("weightBw", "0");
	param.put("randomize", "false");
	param.put("overload", "false");
	param.put("distance", "35");
	param.put("PathSplitting", "true");
	GenericMappingAlgorithm algo = new CoordinatedMapping(param);
	algo.setStack(stack);
	if (algo instanceof GenericMappingAlgorithm)
		((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);

	algo.performEvaluation();
	return VnrUtils.isMapped(vNetwork);

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

示例12: mapNetwork

import vnreal.hiddenhopmapping.IHiddenHopMapping; //导入依赖的package包/类
@Override
public boolean mapNetwork(SubstrateNetwork network, VirtualNetwork vNetwork) {
	List<VirtualNetwork> vns = new LinkedList<VirtualNetwork>();
	vns.add(vNetwork);
	NetworkStack stack = new NetworkStack(network, vns);
	LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
	double hiddenHopsFactor = 0;
	hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));

	AlgorithmParameter param = new AlgorithmParameter();
	param.put("kShortestPath", "50");
	param.put("distance", "35");
	param.put("overload", "false");
	GenericMappingAlgorithm algo = new BFSCoordinated(param);
	algo.setStack(stack);
	if (algo instanceof GenericMappingAlgorithm)
		((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);

	algo.performEvaluation();
	return VnrUtils.isMapped(vNetwork);

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

示例13: mapNetwork

import vnreal.hiddenhopmapping.IHiddenHopMapping; //导入依赖的package包/类
@Override
public boolean mapNetwork(SubstrateNetwork network, VirtualNetwork vNetwork) {
	List<VirtualNetwork> vns = new LinkedList<VirtualNetwork>();
	vns.add(vNetwork);
	NetworkStack stack = new NetworkStack(network, vns);
	LinkedList<IHiddenHopMapping> hhMappings = new LinkedList<IHiddenHopMapping>();
	double hiddenHopsFactor = 0;
	hhMappings.add(new BandwidthCpuHiddenHopMapping(hiddenHopsFactor));

	
	AlgorithmParameter param = new AlgorithmParameter();
	param.put("weightCpu", "0");
	param.put("weightBw", "0");
	param.put("distance", "35");
	param.put("PathSplitting", "true");
	GenericMappingAlgorithm algo = new AvailableResources(param);
	algo.setStack(stack);
	if (algo instanceof GenericMappingAlgorithm)
		((GenericMappingAlgorithm) algo).setHhMappings(hhMappings);

	algo.performEvaluation();
	return VnrUtils.isMapped(vNetwork);

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

示例14: getAllHhs

import vnreal.hiddenhopmapping.IHiddenHopMapping; //导入依赖的package包/类
private Class<?>[] getAllHhs() {
    List<Class<?>> hhClasses = Arrays.asList(ClassScanner
            .getClassesImplementing(this.getClass(),
                    "vnreal.hiddenhopmapping", IHiddenHopMapping.class));

    // sort.
    Collections.sort(hhClasses, new Comparator<Class<?>>() {
        @Override
        public int compare(Class<?> o1, Class<?> o2) {
            // Sort by class name
            return o1.getSimpleName().compareTo(o2.getSimpleName());
        }
    });

    return hhClasses.toArray(new Class[hhClasses.size()]);
}
 
开发者ID:liruixpc11,项目名称:crucian,代码行数:17,代码来源:HiddenHopsDialog.java

示例15: setHhMappings

import vnreal.hiddenhopmapping.IHiddenHopMapping; //导入依赖的package包/类
public void setHhMappings(List<IHiddenHopMapping> hhs) {
    for (@SuppressWarnings("rawtypes")
    Network net : stack)
        if (net instanceof VirtualNetwork) {
            VirtualNetwork vNet = (VirtualNetwork) net;
            for (VirtualLink vLink : vNet.getEdges()) {
                // Clearing past hidden hops demands
                vLink.clearHiddenHopDemands();
                for (AbstractDemand dem : vLink) {
                    for (IHiddenHopMapping hh : hhs)
                        if (hh.accepts(dem))
                            vLink.addHiddenHopDemand(hh.transform(dem));
                }
            }
        }
    // Adding the hiddenhops mapping to the link and node mapping algorithm
    linkMappingAlgorithm.setHhMappings(hhs);
    nodeMappingAlgorithm.setHhMappings(hhs);
}
 
开发者ID:liruixpc11,项目名称:crucian,代码行数:20,代码来源:GenericMappingAlgorithm.java


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