示例#1
0
 public void generateIndividual()
 {
     for (int i = 0; i < TrailPlan.getNumberOfPoints(); i++)
     {
         setPoint(i, TrailPlan.getPoint(i));
     }
     _trail = ShuffleList(_trail);
 }
示例#2
0
    private void bruteForce()
    {
        int n = TrailPlan.getNumberOfPoints();

        Point[] temp = new Point[n];
        for (int i = 0; i < n; i++)
        {
            temp [i] = (Point)TrailPlan.getPoint(i);
        }
        foreach (Point[] permutation in Permutation.getPermutations <Point>(temp))
        {
            ArrayList temporary = new ArrayList();
            for (int j = 0; j < permutation.Length; j++)
            {
                temporary.Add(permutation[j]);
            }
            Trail tempTrail = new Trail(temporary);
            bruteForcePopulation.saveTrail(permutationCounter, tempTrail);
            permutationCounter++;
        }
    }