public OneToOneSynapse(ILayer fromLayer, ILayer toLayer) { if (fromLayer.NeuronCount != toLayer.NeuronCount) { String str = "From and to layers must have the same number of " + "neurons."; #if logging if (this.logger.IsErrorEnabled) { this.logger.Error(str); } #endif throw new NeuralNetworkError(str); } this.FromLayer = fromLayer; this.ToLayer = toLayer; }