예제 #1
0
        /// <summary>
        /// Connect two neurons.  This method is used to
        /// build up connections within the network.  The only connection established
        /// by default is the connection to the bias node.
        /// </summary>
        /// <param name="baseNeuron">A base neuron to connect</param>
        /// <param name="dendrite">A dendrite neuron to connect</param>
        public void Connect(Neuron baseNeuron, Neuron dendrite)
        {
            Axon axon = new Axon();

            axon.Base     = baseNeuron;
            axon.Dendrite = dendrite;
            baseNeuron.AddOutputAxon(axon);
            dendrite.AddInputAxon(axon);
            axons.Add(axon);
        }
예제 #2
0
        /// <summary>
        /// Connect a neuron to the bias neuron.
        /// </summary>
        /// <param name="neuron">The bias neuron</param>
        private void ConnectToBias(Neuron neuron)
        {
            Axon biasAxon = new Axon();

            biasAxon.Base     = bias;
            biasAxon.Dendrite = neuron;
            bias.AddOutputAxon(biasAxon);
            neuron.AddInputAxon(biasAxon);
            axons.Add(biasAxon);
        }
예제 #3
0
		/// <summary>
		/// Connect two neurons.  This method is used to
		/// build up connections within the network.  The only connection established
		/// by default is the connection to the bias node.
		/// </summary>
		/// <param name="baseNeuron">A base neuron to connect</param>
		/// <param name="dendrite">A dendrite neuron to connect</param>
		public void Connect(Neuron baseNeuron, Neuron dendrite) {
			Axon axon = new Axon();
			axon.Base = baseNeuron;
			axon.Dendrite = dendrite;
			baseNeuron.AddOutputAxon(axon);
			dendrite.AddInputAxon(axon);
			axons.Add(axon);
		}