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


Java AbstractAlgorithm类代码示例

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


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

示例1: doAction

import vnreal.algorithms.AbstractAlgorithm; //导入依赖的package包/类
@Override
protected void doAction() {

	if (!yesIsDistanceButton.isSelected()
			&& !noIsDistanceButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Distance'</b> parameter must be specified</p><html>");
		return;
	} else if (!yesNodeOverloadButton.isSelected()
			&& !noNodeOverloadButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Node Overload'</b> parameter must be Yes or No</p><html>");
		return;
	}
	
	// Algorithm parameters
	Scenario scenario = GUI.getInstance().getScenario();
	NetworkStack ns = scenario.getNetworkStack();
	AlgorithmParameter param = new AlgorithmParameter();
	param.put("PathSplitting", "True");
	String distance = noIsDistanceButton.isSelected() ? "-1" : maxDistSpinner.getValue().toString();
	param.put("distance", distance);
	param.put("weightCpu", cpuWSpinner.getValue().toString());
	param.put("weightBw", bwWSpinner.getValue().toString());
	String overload = yesNodeOverloadButton.isSelected() ? "True" : "False";
	param.put("overload", overload);
	
	// finally generate the algorithm
	AbstractAlgorithm algo = new NodeRanking(param);
	algo.setStack(ns);
	
	new MyProgressBarDialog(algo);
	GUI.getInstance().getGraphPanel().autoZoomToFit();
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:37,代码来源:NRPSWizard.java

示例2: doAction

import vnreal.algorithms.AbstractAlgorithm; //导入依赖的package包/类
@Override
protected void doAction() {

	if (!yesIsDistanceButton.isSelected()
			&& !noIsDistanceButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Distance'</b> parameter must be specified</p><html>");
		return;
	} else if (!yesNodeOverloadButton.isSelected()
			&& !noNodeOverloadButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Node Overload'</b> parameter must be Yes or No</p><html>");
		return;
	}
	
	// Algorithm parameters
	Scenario scenario = GUI.getInstance().getScenario();
	NetworkStack ns = scenario.getNetworkStack();
	AlgorithmParameter param = new AlgorithmParameter();
	param.put("PathSplitting", "False");
	String distance = noIsDistanceButton.isSelected() ? "-1" : maxDistSpinner.getValue().toString();
	param.put("distance", distance);
	param.put("kShortestPaths", kSpinner.getValue().toString());
	String overload = yesNodeOverloadButton.isSelected() ? "True" : "False";
	param.put("overload", overload);
	

	// finally generate the algorithm
	AbstractAlgorithm algo = new BFSCoordinated(param);
	algo.setStack(ns);
	
	new MyProgressBarDialog(algo);
	GUI.getInstance().getGraphPanel().autoZoomToFit();
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:37,代码来源:BFSNRWizard.java

示例3: doAction

import vnreal.algorithms.AbstractAlgorithm; //导入依赖的package包/类
@Override
protected void doAction() {

	if (!deterministicButton.isSelected() && !randomizedButton.isSelected()) {
		JOptionPane
				.showMessageDialog(
						GUI.getInstance(),
						"<html><p><b>'Type'</b> parameter must be Deterministic or Randomized</p><html>");
		return;
	} else if (!yesNodeOverloadButton.isSelected()
			&& !noNodeOverloadButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Node Overload'</b> parameter must be Yes or No</p><html>");
		return;
	}
	
	// Algorithm parameters
	Scenario scenario = GUI.getInstance().getScenario();
	NetworkStack ns = scenario.getNetworkStack();
	AlgorithmParameter param = new AlgorithmParameter();
	param.put("PathSplitting", "True");
	param.put("rounding", "False");
	param.put("distance", maxDistSpinner.getValue().toString());
	param.put("weightCpu", cpuWSpinner.getValue().toString());
	param.put("weightBw", bwWSpinner.getValue().toString());
	String overload = yesNodeOverloadButton.isSelected() ? "True" : "False";
	param.put("overload", overload);
	String randomize = randomizedButton.isSelected() ? "True" : "False";
	param.put("randomize", randomize);
	
	// finally generate the algorithm
	AbstractAlgorithm algo = new CoordinatedMapping(param);
	algo.setStack(ns);
	
	new MyProgressBarDialog(algo);
	GUI.getInstance().getGraphPanel().autoZoomToFit();
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:39,代码来源:CoordinatedMappingPathSplittingWizard.java

示例4: doAction

import vnreal.algorithms.AbstractAlgorithm; //导入依赖的package包/类
@Override
protected void doAction() {

	if (!yesIsDistanceButton.isSelected()
			&& !noIsDistanceButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Distance'</b> parameter must be specified</p><html>");
		return;
	} else if (!yesNodeOverloadButton.isSelected()
			&& !noNodeOverloadButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Node Overload'</b> parameter must be Yes or No</p><html>");
		return;
	}
	
	// Algorithm parameters
	Scenario scenario = GUI.getInstance().getScenario();
	NetworkStack ns = scenario.getNetworkStack();
	AlgorithmParameter param = new AlgorithmParameter();
	param.put("PathSplitting", "False");
	String distance = noIsDistanceButton.isSelected() ? "-1" : maxDistSpinner.getValue().toString();
	param.put("distance", distance);
	param.put("kShortestPaths", kSpinner.getValue().toString());
	String overload = yesNodeOverloadButton.isSelected() ? "True" : "False";
	param.put("overload", overload);

	// finally generate the algorithm
	AbstractAlgorithm algo = new AvailableResources(param);
	algo.setStack(ns);
	
	new MyProgressBarDialog(algo);
	GUI.getInstance().getGraphPanel().autoZoomToFit();
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:36,代码来源:AvailableResourcesWizard.java

示例5: doAction

import vnreal.algorithms.AbstractAlgorithm; //导入依赖的package包/类
@Override
protected void doAction() {

	if (!yesIsDistanceButton.isSelected()
			&& !noIsDistanceButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Distance'</b> parameter must be specified</p><html>");
		return;
	} else if (!yesNodeOverloadButton.isSelected()
			&& !noNodeOverloadButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Node Overload'</b> parameter must be Yes or No</p><html>");
		return;
	}
	
	// Algorithm parameters
	Scenario scenario = GUI.getInstance().getScenario();
	NetworkStack ns = scenario.getNetworkStack();
	AlgorithmParameter param = new AlgorithmParameter();
	param.put("PathSplitting", "False");
	String distance = noIsDistanceButton.isSelected() ? "-1" : maxDistSpinner.getValue().toString();
	param.put("distance", distance);
	param.put("kShortestPaths", kSpinner.getValue().toString());
	String overload = yesNodeOverloadButton.isSelected() ? "True" : "False";
	param.put("overload", overload);
	
	// finally generate the algorithm
	AbstractAlgorithm algo = new NodeRanking(param);
	algo.setStack(ns);
	
	new MyProgressBarDialog(algo);
	GUI.getInstance().getGraphPanel().autoZoomToFit();
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:36,代码来源:NRkSPWizard.java

示例6: doAction

import vnreal.algorithms.AbstractAlgorithm; //导入依赖的package包/类
@Override
protected void doAction() {

	if (!deterministicButton.isSelected() && !randomizedButton.isSelected()) {
		JOptionPane
				.showMessageDialog(
						GUI.getInstance(),
						"<html><p><b>'Type'</b> parameter must be Deterministic or Randomized</p><html>");
		return;
	} else if (!yesNodeOverloadButton.isSelected()
			&& !noNodeOverloadButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Node Overload'</b> parameter must be Yes or No</p><html>");
		return;
	}
	
	// Algorithm parameters
	Scenario scenario = GUI.getInstance().getScenario();
	NetworkStack ns = scenario.getNetworkStack();
	AlgorithmParameter param = new AlgorithmParameter();
	param.put("PathSplitting", "False");
	param.put("distance", maxDistSpinner.getValue().toString());
	param.put("weightCpu", cpuWSpinner.getValue().toString());
	param.put("weightBw", bwWSpinner.getValue().toString());
	param.put("kShortestPaths", kSpinner.getValue().toString());
	String overload = yesNodeOverloadButton.isSelected() ? "True" : "False";
	param.put("overload", overload);
	String randomize = randomizedButton.isSelected() ? "True" : "False";
	param.put("randomize", randomize);
	
	// finally generate the algorithm
	AbstractAlgorithm algo = new CoordinatedMapping(param);
	algo.setStack(ns);
	
	new MyProgressBarDialog(algo);
	GUI.getInstance().getGraphPanel().autoZoomToFit();
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:39,代码来源:CoordinatedMappingkShortestPathWizard.java

示例7: doAction

import vnreal.algorithms.AbstractAlgorithm; //导入依赖的package包/类
@Override
protected void doAction() {

	// This should actually never happen
	if (!yesIsDistanceButton.isSelected()
			&& !noIsDistanceButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Distance'</b> parameter must be specified</p><html>");
		return;
	} else if (!yesNodeOverloadButton.isSelected()
			&& !noNodeOverloadButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Node Overload'</b> parameter must be Yes or No</p><html>");
		return;
	}
	
	// Algorithm parameters
	Scenario scenario = GUI.getInstance().getScenario();
	NetworkStack ns = scenario.getNetworkStack();
	AlgorithmParameter param = new AlgorithmParameter();
	param.put("PathSplitting", "True");
	String distance = noIsDistanceButton.isSelected() ? "-1" : maxDistSpinner.getValue().toString();
	param.put("distance", distance);
	param.put("weightCpu", cpuWSpinner.getValue().toString());
	param.put("weightBw", bwWSpinner.getValue().toString());
	String overload = yesNodeOverloadButton.isSelected() ? "True" : "False";
	param.put("overload", overload);
	
	// finally generate the algorithm
	AbstractAlgorithm algo = new AvailableResources(param);
	algo.setStack(ns);

	new MyProgressBarDialog(algo);
	GUI.getInstance().getGraphPanel().autoZoomToFit();
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:38,代码来源:AvailableResourcesPathSplittingWizard.java

示例8: doAction

import vnreal.algorithms.AbstractAlgorithm; //导入依赖的package包/类
@Override
protected void doAction() {

	if (!yesIsDistanceButton.isSelected()
			&& !noIsDistanceButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Distance'</b> parameter must be specified</p><html>");
		return;
	} else if (!yesNodeOverloadButton.isSelected()
			&& !noNodeOverloadButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Node Overload'</b> parameter must be Yes or No</p><html>");
		return;
	}
	
	// Algorithm parameters
	Scenario scenario = GUI.getInstance().getScenario();
	NetworkStack ns = scenario.getNetworkStack();
	AlgorithmParameter param = new AlgorithmParameter();
	param.put("PathSplitting", "True");
	String distance = noIsDistanceButton.isSelected() ? "-1" : maxDistSpinner.getValue().toString();
	param.put("distance", distance);
	param.put("weightCpu", cpuWSpinner.getValue().toString());
	param.put("weightBw", bwWSpinner.getValue().toString());
	param.put("kShortestPaths", kSpinner.getValue().toString());
	String overload = yesNodeOverloadButton.isSelected() ? "True" : "False";
	param.put("overload", overload);
	
			
	// finally generate the algorithm
	AbstractAlgorithm algo = new BFSCoordinated(param);
	algo.setStack(ns);
	
	new MyProgressBarDialog(algo);
	GUI.getInstance().getGraphPanel().autoZoomToFit();
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:39,代码来源:BFSNRPSWizard.java

示例9: doAction

import vnreal.algorithms.AbstractAlgorithm; //导入依赖的package包/类
@Override
protected void doAction() {

	if (!deterministicButton.isSelected() && !randomizedButton.isSelected()) {
		JOptionPane
				.showMessageDialog(
						GUI.getInstance(),
						"<html><p><b>'Type'</b> parameter must be Deterministic or Randomized</p><html>");
		return;
	} else if (!yesNodeOverloadButton.isSelected()
			&& !noNodeOverloadButton.isSelected()) {
		JOptionPane
				.showMessageDialog(GUI.getInstance(),
						"<html><p><b>'Node Overload'</b> parameter must be Yes or No</p><html>");
		return;
	}
	
	// Algorithm parameters
	Scenario scenario = GUI.getInstance().getScenario();
	NetworkStack ns = scenario.getNetworkStack();
	AlgorithmParameter param = new AlgorithmParameter();
	param.put("PathSplitting", "True");
	param.put("rounding", "True");
	param.put("distance", maxDistSpinner.getValue().toString());
	param.put("weightCpu", cpuWSpinner.getValue().toString());
	param.put("weightBw", bwWSpinner.getValue().toString());
	String overload = yesNodeOverloadButton.isSelected() ? "True" : "False";
	param.put("overload", overload);
	String randomize = randomizedButton.isSelected() ? "True" : "False";
	param.put("randomize", randomize);
	
	// finally generate the algorithm
	AbstractAlgorithm algo = new CoordinatedMapping(param);
	algo.setStack(ns);
	
	new MyProgressBarDialog(algo);
	GUI.getInstance().getGraphPanel().autoZoomToFit();
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:39,代码来源:CoordinatedMappingRoundingPathStrippingWizard.java

示例10: getAlgo

import vnreal.algorithms.AbstractAlgorithm; //导入依赖的package包/类
public AbstractAlgorithm getAlgo() {
	return algo;
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:4,代码来源:TestRun.java

示例11: setAlgo

import vnreal.algorithms.AbstractAlgorithm; //导入依赖的package包/类
public void setAlgo(AbstractAlgorithm algo) {
	this.algo = algo;
	if (this.scenario != null)
		this.algo.setStack(this.scenario.getNetworkStack());
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:6,代码来源:TestRun.java

示例12: getAlgorithm

import vnreal.algorithms.AbstractAlgorithm; //导入依赖的package包/类
public AbstractAlgorithm getAlgorithm() {
	return this.algo;
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:4,代码来源:Run.java

示例13: setAlgorithm

import vnreal.algorithms.AbstractAlgorithm; //导入依赖的package包/类
public void setAlgorithm(AbstractAlgorithm algo) {
	this.algo = algo;
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:4,代码来源:Run.java

示例14: getAlgorithm

import vnreal.algorithms.AbstractAlgorithm; //导入依赖的package包/类
@Override
public AbstractAlgorithm getAlgorithm(NetworkStack nstack) {
	return new NodeRankingPathSplitting(nstack, weightCpu, weightBw,
			distance, isDistance, nodeOverload);
}
 
开发者ID:fabe85,项目名称:Alevin,代码行数:6,代码来源:Pathsplitting.java

示例15: getAlgorithm

import vnreal.algorithms.AbstractAlgorithm; //导入依赖的package包/类
@Override
public AbstractAlgorithm getAlgorithm(NetworkStack nstack) {
	SubgraphIsomorphismAlgorithm algo = new AdvancedSubgraphIsomorphismAlgorithm(
			this.useEnergyResource);
	return new SubgraphIsomorphismStackAlgorithm(nstack, algo);
}
 
开发者ID:fabe85,项目名称:Alevin,代码行数:7,代码来源:Isomorphism.java


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