public static void ConstrainedCopy <T>(this T[] sourceArray, Int32 sourceIndex, T[] destinationArray, Int32 destinationIndex, Int32 length)
 {
     Array.ConstrainedCopy(sourceArray, sourceIndex, destinationArray, destinationIndex, length);
 }
Example #2
0
 /// <summary>
 /// Deep copy constructor
 /// </summary>
 /// <param name="otherNetwork">Neural Network to copy from</param>
 public NeuralNetwork(NeuralNetwork otherNetwork)
 {
     Array.ConstrainedCopy(otherNetwork.layers, 0, this.layers, 0, otherNetwork.layers.Length);
     Array.ConstrainedCopy(otherNetwork.neurons, 0, this.neurons, 0, otherNetwork.neurons.Length);
     Array.ConstrainedCopy(otherNetwork.weights, 0, this.weights, 0, otherNetwork.weights.Length);
 }
Example #3
0
 public static void ConstrainedCopy(this Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length)
 {
     Array.ConstrainedCopy(sourceArray, sourceIndex, destinationArray, destinationIndex, length);
 }
Example #4
0
 /// <summary>
 /// Initializes Neural Network with random weights
 /// </summary>
 /// <param name="layers">layers of the Neural Network</param>
 public NeuralNetwork(int[] layers)
 {
     Array.ConstrainedCopy(layers, 0, this.layers, 0, layers.Length);
     InitializeNeurons();
     InitializeWeights();
 }