// методы для соединения нейронов public void ConnectNeuron(Neuron neuron, double signal, double weight) { Synapse newSynapse = new Synapse(); newSynapse.From = this; newSynapse.To = neuron; newSynapse.SetWeight(weight); newSynapse.SetSignal(signal); outputs.Add(newSynapse); neuron.inputs.Add(newSynapse); }
public void AddNeurons(Neuron neuron) { neurons.Add(neuron); }
public NeuronLayer CreateOutputLayer(int countNeuron) { Neuron outputNeuron = null; Synapse outputSynapse = null; for (int i = 0; i < countNeuron; i++ ) { outputNeuron = new Neuron(); outputSynapse = new Synapse(); outputSynapse.From = outputNeuron; outputNeuron.AddOutput(outputSynapse); outputLayer.AddNeuron(outputNeuron); } return outputLayer; }