@Override public String toString() { XStream xstream = new XStream(); xstream.processAnnotations(this.getClass()); xstream.processAnnotations(function.getClass()); xstream.processAnnotations(adapter.getClass()); return xstream.toXML(this); }
public double activate(double[] values) { double sum = 0; for (int i = 0; i < weights.length; i++) sum += weights[i] * values[i]; if (adapter != null) sum = adapter.adapt(sum); return function.transfer(sum); } // activate