Ejemplo n.º 1
0
        static public void iterativeSwap()
        {
            candList = new List <candidate>();

            for (int i = 1; i < neighborhood; i++)
            {
                candidate temp = new candidate(0);
                candCount++;
                temp    = chosen.copyTo(temp);
                temp.id = temp.id + candCount;

                int temp1 = temp.jsOrder[i];
                int temp2 = temp.jsOrder[i - 1];

                temp.jsOrder[i]     = temp2;
                temp.jsOrder[i - 1] = temp1;
                temp.swap1          = temp2;
                temp.swap2          = temp1;
                candList.Add(temp);
            }

            //Console.WriteLine("Check the neighborhood " + candList.Count);
        }