Пример #1
0
        /// <summary>
        /// Accepts a connection between one neuron (output) and this neuron (input).
        /// </summary>
        /// <param name="from">Source of the connection. This cell will create a dendrite that will be connected with this axon.</param>
        /// <returns>Dendrite that accepted this connection.</returns>
        private Dendrite AcceptConnection(Axon from)
        {
            var newDendrite = new Dendrite(this, from);

            Inputs.Add(newDendrite);
            return(newDendrite);
        }
Пример #2
0
 /// <summary>
 /// Creates new instance of Axon that belongs to the indicated parent cell.
 /// </summary>
 /// <param name="parentCell">Parent cell (usually the caller) that creates this axon.</param>
 /// <param name="from">Source through which signals will flow into this dendrite.</param>
 public Dendrite(Neuron parentCell, Axon from)
 {
     ParentCell        = parentCell;
     SignalSource      = from;
     from.SignalTarget = this;
     SignalWeight      = 1.0;
 }
Пример #3
0
        /// <summary>
        /// Creates a connection between an <see cref="Axon"/> (output) of this neuron
        /// with a <see cref="Dendrite"/> (input) of the other neuron.
        /// <para/>Signals from this neuron will be able to travel to the other neuron.
        /// </summary>
        /// <param name="other">Other neuron that should receive input from this neuron</param>
        public Axon ConnectTo(Neuron other)
        {
            var newAxon = new Axon(this);

            Outputs.Add(newAxon);
            other.AcceptConnection(newAxon);
            return(newAxon);
        }