* @param targetLayer The target layer.
* @param neuron The target neuron.
*/
public void validateNeuron(final int targetLayer, final int neuron) {
if ((targetLayer < 0) || (targetLayer >= getLayerCount())) {
throw new NeuralNetworkError("Invalid layer count: " + targetLayer);
}
if ((neuron < 0) || (neuron >= getLayerTotalNeuronCount(targetLayer))) {
throw new NeuralNetworkError("Invalid neuron number: " + neuron);
}
}