Example #1
0
 /// <summary>
 /// Creates a new connection to specified neuron with specified weight object
 /// </summary>
 /// <param name="connectTo">neuron to connect to</param>
 /// <param name="weight">weight for this connection</param>
 public Connection(Neuron fromNeuron, Neuron toNeuron, double weightValue)
 {
     this.fromNeuron = fromNeuron;
     this.toNeuron = toNeuron;
     this.weight = new Weight(weightValue);
 }
Example #2
0
 /// <summary>
 /// Creates a new connection to specified neuron with specified weight object
 /// </summary>
 /// <param name="connectTo">neuron to connect to</param>
 /// <param name="weight">weight for this connection</param>
 public Connection(Neuron fromNeuron, Neuron toNeuron, Weight weight)
 {
     this.fromNeuron = fromNeuron;
     this.toNeuron = toNeuron;
     this.weight = weight;
 }
Example #3
0
 /// <summary>
 /// Creates a new connection between specified neurons with random weight value
 /// </summary>
 /// <param name="fromNeuron">neuron to connect</param>
 /// <param name="toNeuron">neuron to connect to</param>
 public Connection(Neuron fromNeuron, Neuron toNeuron)
 {
     this.fromNeuron = fromNeuron;
     this.toNeuron = toNeuron;
     this.weight = new Weight();
 }
 /// <summary>
 /// Creates connection between two specified neurons
 /// </summary>
 /// <param name="from">output neuron</param>
 /// <param name="to">input neuron</param>
 /// <param name="weight">connection weight</param>
 public static void CreateConnection(Neuron from, Neuron to, Weight weight)
 {
     Connection connection = new Connection(from, to, weight);
     to.AddInputConnection(connection);
 }