本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例10: getAlgo
import vnreal.algorithms.AbstractAlgorithm; //导入依赖的package包/类
public AbstractAlgorithm getAlgo() {
return algo;
}
示例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());
}
示例12: getAlgorithm
import vnreal.algorithms.AbstractAlgorithm; //导入依赖的package包/类
public AbstractAlgorithm getAlgorithm() {
return this.algo;
}
示例13: setAlgorithm
import vnreal.algorithms.AbstractAlgorithm; //导入依赖的package包/类
public void setAlgorithm(AbstractAlgorithm algo) {
this.algo = algo;
}
示例14: getAlgorithm
import vnreal.algorithms.AbstractAlgorithm; //导入依赖的package包/类
@Override
public AbstractAlgorithm getAlgorithm(NetworkStack nstack) {
return new NodeRankingPathSplitting(nstack, weightCpu, weightBw,
distance, isDistance, nodeOverload);
}
示例15: getAlgorithm
import vnreal.algorithms.AbstractAlgorithm; //导入依赖的package包/类
@Override
public AbstractAlgorithm getAlgorithm(NetworkStack nstack) {
SubgraphIsomorphismAlgorithm algo = new AdvancedSubgraphIsomorphismAlgorithm(
this.useEnergyResource);
return new SubgraphIsomorphismStackAlgorithm(nstack, algo);
}