Пример #1
0
        /// <summary>
        /// Adds an incoming connection.
        /// </summary>
        /// <param name="from">The neuron which the connections is coming from.</param>
        /// <param name="weight">The weight for the connection.</param>
        public void AddInputConnection(Neuron from, double weight)
        {
            Connection connection = new Connection(from, this, weight);

            inputs.Add(connection);
        }
Пример #2
0
 public void AddDendrite(Neuron dendrite, double weight)
 {
     Dendrites.Add(new Dendrite(dendrite, weight));
 }
Пример #3
0
        /// <summary>
        /// Adds an incoming connection. Weight is [-0.5, 0.5].
        /// </summary>
        /// <param name="from">The neuron which the connections is coming from.</param>
        public void AddInputConnection(Neuron from)
        {
            double weight = RandomNum.RandomDouble() - 0.5;

            AddInputConnection(from, weight);
        }
Пример #4
0
 // Getters & Setters
 public void AddDendrite(Neuron dendrite)
 {
     Dendrites.Add(new Dendrite(dendrite));
 }
Пример #5
0
 protected bool Equivelant(Neuron other)
 {
     return(other.Name == Name);
 }
Пример #6
0
 public Dendrite(Neuron neuron, double weight)
 {
     Neuron = neuron;
     Weight = weight;
 }
Пример #7
0
 public Dendrite(Neuron neuron) : this(neuron, Random.Next(RandomUpper))
 {
 }
Пример #8
0
 /// <summary>
 /// Initializes a new instance of the
 /// <see cref="ArtificialNeuralNetwork.Connection"/> class.
 /// </summary>
 /// <param name="from">The sending neuron.</param>
 /// <param name="to">The recieving neuron.</param>
 /// <param name="weight">The weight of the connection.</param>
 public Connection(Neuron from, Neuron to, double weight)
 {
     this.from   = from;
     this.to     = to;
     this.weight = weight;
 }