예제 #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);
 }
예제 #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;
 }
예제 #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();
 }
예제 #4
0
 /// <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);
 }