/// <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); }
public void AddDendrite(Neuron dendrite, double weight) { Dendrites.Add(new Dendrite(dendrite, weight)); }
/// <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); }
// Getters & Setters public void AddDendrite(Neuron dendrite) { Dendrites.Add(new Dendrite(dendrite)); }
protected bool Equivelant(Neuron other) { return(other.Name == Name); }
public Dendrite(Neuron neuron, double weight) { Neuron = neuron; Weight = weight; }
public Dendrite(Neuron neuron) : this(neuron, Random.Next(RandomUpper)) { }
/// <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; }