public void performEditConfig() {
EncogConfigDialog dialog = new EncogConfigDialog(EncogWorkBench
.getInstance().getMainWindow());
EncogWorkBenchConfig config = EncogWorkBench.getInstance().getConfig();
dialog.getDefaultError().setValue(config.getDefaultError());
dialog.getThreadCount().setValue(config.getThreadCount());
dialog.getUseOpenCL().setValue(config.isUseOpenCL());
switch (config.getErrorCalculation()) {
case RMS:
((JComboBox) dialog.getErrorCalculation().getField())
.setSelectedIndex(0);
break;
case MSE:
((JComboBox) dialog.getErrorCalculation().getField())
.setSelectedIndex(1);
break;
}
if (dialog.process()) {
config.setDefaultError(dialog.getDefaultError().getValue());
config.setThreadCount(dialog.getThreadCount().getValue());
config.setUseOpenCL(dialog.getUseOpenCL().getValue());
switch (((JComboBox) dialog.getErrorCalculation().getField())
.getSelectedIndex()) {
case 0:
config.setErrorCalculation(ErrorCalculationMode.RMS);
break;
case 1:
config.setErrorCalculation(ErrorCalculationMode.MSE);
break;
}
EncogWorkBench.getInstance().getConfig().saveConfig();
ErrorCalculation.setMode(EncogWorkBench.getInstance().getConfig()