當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。