public void SetGetSignalTest() { double signal = 9; Synapse synapse = new Synapse(); synapse.SetSignal(signal); Assert.AreEqual(synapse.GetSignal(), signal); }
// методы для соединения нейронов 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); }