예제 #1
0
        public void SetGetSignalTest()
        {
            double signal = 9;

            Synapse synapse = new Synapse();
            synapse.SetSignal(signal);

            Assert.AreEqual(synapse.GetSignal(), signal);
        }
예제 #2
0
        // методы для соединения нейронов
        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);
        }