Esempio n. 1
0
 @Override
 public String toString() {
   XStream xstream = new XStream();
   xstream.processAnnotations(this.getClass());
   xstream.processAnnotations(function.getClass());
   xstream.processAnnotations(adapter.getClass());
   return xstream.toXML(this);
 }
Esempio n. 2
0
 /**
  * Wrap the AbstractAdapter with this AbstractAdapter and keep the reference to it's FastAdapter
  * to which we forward all events correctly
  *
  * @param abstractAdapter an AbstractWrapper which wraps another AbstractAdapter or FastAdapter
  * @return this
  */
 public AbstractAdapter wrap(IAdapter abstractAdapter) {
   // this.mParentAdapter = abstractAdapter;
   this.mFastAdapter = abstractAdapter.getFastAdapter();
   this.mFastAdapter.registerAdapter(this);
   return this;
 }
Esempio n. 3
0
 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