Commit 3cfe5eaf authored by Philipp Spohr's avatar Philipp Spohr
Browse files

Some fixes (Java is NOT C++ apparently)

parent f1f3c7c6
......@@ -86,26 +86,32 @@ public class ParameterSet implements TunableValidator
*/
public ParameterSet() {
ArrayList<CyColumn> columns = new ArrayList<CyColumn>();
ArrayList<CyColumn> numericColumns = new ArrayList<CyColumn>();
//Only numeric columns are relevant for weight mapping
for (CyColumn col : net.getDefaultEdgeTable().getColumns()) {
if (Number.class.isAssignableFrom(col.getType())) {
columns.add(col);
numericColumns.add(col);
}
}
weightColumn = new ListSingleSelection<CyColumn>(columns);
weightColumn = new ListSingleSelection<CyColumn>(numericColumns);
columns.clear();
ArrayList<CyColumn> booleanColumns = new ArrayList<CyColumn>();
//Only boolean columns are relevant for forbidden/permanent mapping
for (CyColumn col : net.getDefaultEdgeTable().getColumns()) {
if (col.getType() == Boolean.class) {
columns.add(col);
booleanColumns.add(col);
}
}
forbiddenColumn = new ListSingleSelection<CyColumn>(columns);
permanentColumn = new ListSingleSelection<CyColumn>(columns);
forbiddenColumn = new ListSingleSelection<CyColumn>(booleanColumns);
permanentColumn = new ListSingleSelection<CyColumn>(booleanColumns);
//Don't select any columns by default
weightColumn.setSelectedValue(null);
forbiddenColumn.setSelectedValue(null);
permanentColumn.setSelectedValue(null);
}
@Override
......
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