public virtual double[] Compute( double[] input )
{
// local variable to avoid mutlithread conflicts
double[] output = new double[neuronsCount];
// compute each neuron
for ( int i = 0; i < neurons.Length; i++ )
output[i] = neurons[i].Compute( input );
// assign output property as well (works correctly for single threaded usage)
this.output = output;
return output;
}