示例#1
0
文件: Population.cs 项目: marusi/TSP
        public Population genNewPop(int n)
        {
            List <Tour> p = new List <Tour>();

            for (int i = 0; i < n; ++i)
            {
                Tour t = this.select().crossover(this.select());

                foreach (City c in t.t)
                {
                    t = t.mutate();
                }

                p.Add(t);
            }

            return(new Population(p));
        }