Example #1
0
        /// <summary>
        /// Shuffles stored pairs
        /// </summary>
        /// <param name="rand">Random object</param>
        public void Shuffle(System.Random rand)
        {
            List <List <double[]> > l1 = new List <List <double[]> >(InputPatternCollection);
            List <double[]>         l2 = new List <double[]>(OutputVectorCollection);

            InputPatternCollection.Clear();
            OutputVectorCollection.Clear();
            int[] shuffledIndices = new int[l2.Count];
            shuffledIndices.ShuffledIndices(rand);
            for (int i = 0; i < shuffledIndices.Length; i++)
            {
                InputPatternCollection.Add(l1[shuffledIndices[i]]);
                OutputVectorCollection.Add(l2[shuffledIndices[i]]);
            }
            return;
        }
Example #2
0
 /// <summary>
 /// Adds pattern/vector pair into the bundle
 /// </summary>
 /// <param name="pattern">Input pattern of vectors</param>
 /// <param name="outputVector">Output vector (ideal)</param>
 public void AddPair(List <double[]> pattern, double[] outputVector)
 {
     InputPatternCollection.Add(pattern);
     OutputVectorCollection.Add(outputVector);
     return;
 }