Пример #1
0
 /// <summary>
 /// Adds vectors into the bundle.
 /// </summary>
 /// <param name="inputVector">The input vector.</param>
 /// <param name="computedVector">The computed vector.</param>
 /// <param name="idealVector">The ideal vector.</param>
 public void AddVectors(double[] inputVector, double[] computedVector, double[] idealVector)
 {
     InputVectorCollection.Add(inputVector);
     ComputedVectorCollection.Add(computedVector);
     IdealVectorCollection.Add(idealVector);
     return;
 }
Пример #2
0
        /// <summary>
        /// Shuffles stored pairs
        /// </summary>
        /// <param name="rand">Random object</param>
        public void Shuffle(Random rand)
        {
            List <double[]> l1 = new List <double[]>(InputVectorCollection);
            List <double[]> l2 = new List <double[]>(OutputVectorCollection);

            InputVectorCollection.Clear();
            OutputVectorCollection.Clear();
            int[] shuffledIndices = new int[l2.Count];
            shuffledIndices.ShuffledIndices(rand);
            for (int i = 0; i < shuffledIndices.Length; i++)
            {
                InputVectorCollection.Add(l1[shuffledIndices[i]]);
                OutputVectorCollection.Add(l2[shuffledIndices[i]]);
            }
            return;
        }
Пример #3
0
 /// <summary>
 /// Adds sample data pair into the bundle
 /// </summary>
 /// <param name="inputVector">Input vector</param>
 /// <param name="outputVector">Output vector (ideal)</param>
 public void AddPair(double[] inputVector, double[] outputVector)
 {
     InputVectorCollection.Add(inputVector);
     OutputVectorCollection.Add(outputVector);
     return;
 }