public double GetLayerOutput(int layer, int neuronNumber)
{
_structure.RequireFlat();
int layerNumber = LayerCount - layer - 1;
int index = _structure.Flat.LayerIndex[layerNumber]
+ neuronNumber;
double[] output = _structure.Flat.LayerOutput;
if (index >= output.Length)
{
throw new NeuralNetworkError("The layer index: " + index
+ " specifies an output index larger than the network has.");
}
return output[index];
}