/// <summary> /// Initializes the connection with a random weight between -1 and 1 /// </summary> /// <param name="anteriorNeuron">The neuron on the anterior side of the connection.</param> /// <param name="posteriorNeuron">The neuron on the posterior side of the connection.</param> public Connection(Neuron anteriorNeuron, Neuron posteriorNeuron) : this(Gaussian.GetRandomGaussian(), anteriorNeuron, posteriorNeuron) { }
/// <summary> /// Initializes the connection. /// </summary> /// <param name="weightInitial">The initial weight of the connection. Bound from -1, 1</param> /// <param name="anteriorNeuron">The neuron on the anterior side of the connection.</param> /// <param name="posteriorNeuron">The neuron on the posterior side of the connection.</param> public Connection(double weightInitial, Neuron anteriorNeuron, Neuron posteriorNeuron) { this.Weight = weightInitial; this.AnteriorNeuron = anteriorNeuron; this.PosteriorNeuron = posteriorNeuron; }