Commit 26552aa1 authored by Philipp Spohr's avatar Philipp Spohr
Browse files

Workaround for CyColumn being not tunable (as of now, Cyto 3.7 maybe?)

parent a49f59eb
......@@ -14,7 +14,7 @@ public class ParameterSet implements TunableValidator
public int timeLimit = -1;
@Tunable(description="A column in the edge table containing weights", context="nogui")
public CyColumn weightColumn;
public String weightColumnName;
@Tunable(description="A column containing boolean entries for edges that are to be treated as permanent",context="nogui")
public CyColumn permanentColumn;
@Tunable(description="A column containing boolean entries for edges that are to be treated as forbidden",context="nogui")
......
......@@ -346,7 +346,7 @@ public class MainPanel extends JPanel implements CytoPanelComponent {
private ParameterSet fetchParameters(CyNetwork net) {
ParameterSet ret = new ParameterSet();
ret.timeLimit = opModePanel.getTimeLimit();
ret.weightColumn = ecPanel.getWeightColumn();
ret.weightColumnName = ecPanel.getWeightColumn().getName();
ret.permanentColumn = ecPanel.getPermanentColumn();
ret.forbiddenColumn = ecPanel.getForbiddenColumn();
ret.defaultInsertionCost = ecPanel.getDefaultInsertionCost();
......
......@@ -226,6 +226,9 @@ public class SolutionTab extends JPanel {
this.setLayout(layout);
}
/**
* Simply disables the CCV and CMG graph to visually highlight the fact that those tasks are no longer possible
*/
public void invalidateResult() {
createClusterView.setEnabled(false);
createMetaGraph.setEnabled(false);
......
......@@ -138,7 +138,7 @@ public class AlgorithmTask extends AbstractTask implements ObservableTask {
c_input = NetworkParser.parseNetwork(
net,
nodeMap,
parameterSet.weightColumn,
net.getDefaultEdgeTable().getColumn(parameterSet.weightColumnName),
parameterSet.permanentColumn,
parameterSet.forbiddenColumn,
parameterSet.defaultDeletionCost
......@@ -147,7 +147,7 @@ public class AlgorithmTask extends AbstractTask implements ObservableTask {
boolean containsRealValues = GraphAnalyzer.containsRealValues(
net,
parameterSet.weightColumn,
net.getDefaultEdgeTable().getColumn(parameterSet.weightColumnName),
parameterSet.permanentColumn,
parameterSet.forbiddenColumn,
parameterSet.defaultInsertionCost,
......
......@@ -20,6 +20,8 @@ import de.hhu.ba.yoshikoWrapper.cytoUtil.StyleManager;
import de.hhu.ba.yoshikoWrapper.graphModel.YoshikoCluster;
import de.hhu.ba.yoshikoWrapper.graphModel.YoshikoSolution;
//TODO: Should also not be possible / throw an exception if the result was invalidated (might currently just be disabled via GUI)
public class CreateMetaGraphTask extends AbstractTask{
private final YoshikoSolution solution;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment