Exemplo n.º 1
0
        public override TSolution[] Apply(TSolution[] population)
        {
            Selector.BeforeSelection(population);
            var parents = Selector.Select(population);

            var children = new TSolution[parents.Length];

            for (int i = 0; i < children.Length; i++)
            {
                children[i] = new TSolution();
            }
            Crossover.CrossCoordinates(parents, children);

            Mutator.MutateCoordinates(children);
            Evaluator.Evaluate(children);
            Fitter.Fit(children);
            return(children);
        }