Example #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;
 }
Example #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;
        }
Example #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;
 }
Example #4
0
 /// <summary>
 /// Adds all the vector pairs from another vector bundle.
 /// </summary>
 /// <param name="data">Another vector bundle.</param>
 public void Add(VectorBundle data)
 {
     InputVectorCollection.AddRange(data.InputVectorCollection);
     OutputVectorCollection.AddRange(data.OutputVectorCollection);
     return;
 }