int index = fn.indexOf('[');
if (index != -1) {
name = fn.substring(0, index).toLowerCase();
int index2 = fn.indexOf(']');
if (index2 == -1) {
throw new EncogError(
"Unbounded [ while parsing activation function.");
}
String a = fn.substring(index + 1, index2);
params = NumberList.fromList(CSVFormat.EG_FORMAT, a);
} else {
name = fn.toLowerCase();
params = new double[0];
}
ActivationFunction af = allocateAF(name);
if( af==null ) {
return null;
}
if (af.getParamNames().length != params.length) {
throw new EncogError(name + " expected "
+ af.getParamNames().length + ", but " + params.length
+ " were provided.");
}
for (int i = 0; i < af.getParamNames().length; i++) {