Beispiel #1
0
 public static ComputeFeature RandomFeature(int maxNumOfOperations, int width, int height)
 {
     int numOfOperations = rand.Next(1, maxNumOfOperations);
     int operationLib = operations.Count();
     ComputeFeature f = new ComputeFeature();
     for (int i = 0; i < numOfOperations; i++) {
         f.operationStack.Add(new AtomicOperation(rand.Next(0, width), rand.Next(0, height), rand.Next(0, operationLib)));
     }
     return f;
 }
Beispiel #2
0
        public static ComputeFeature RandomFeature(int maxNumOfOperations, int width, int height)
        {
            int            numOfOperations = rand.Next(1, maxNumOfOperations);
            int            operationLib    = operations.Count();
            ComputeFeature f = new ComputeFeature();

            for (int i = 0; i < numOfOperations; i++)
            {
                f.operationStack.Add(new AtomicOperation(rand.Next(0, width), rand.Next(0, height), rand.Next(0, operationLib)));
            }
            return(f);
        }