public Connection(Neuron A, Neuron B, double W, double P) { this.NeuronA = A; this.NeuronB = B; this.Weight = W; this.PreWeight = W; this.P = P; }
public Layer(int NumberOfNeurons, ITransferFunction func) { neurons = new List<Neuron>(); for (int i = 0; i < NumberOfNeurons; i++) { Neuron n = new Neuron(); n.SetTransferFunction(func); neurons.Add(n); } Output = new double[NumberOfNeurons]; }
public void AddConnections(Neuron A) { Connection c = new Connection(A, this, RandomHub.Next(RandomHub.MIN, RandomHub.MAX), 0.0); A.ForwardConnections.Add(c); BackwardConnections.Add(c); }