コード例 #1
0
ファイル: Vega.cs プロジェクト: krzychu195/MOA
        public void Mutation()
        {
            IndividualEvaluations evaluations = new IndividualEvaluations();

            _populationAfterMutation = new Population();
            _populationAfterCrossing.GenerateProbabilities();

            for (var i = 0; i < _populationAfterCrossing.Size(); i++)
            {
                _populationAfterMutation.Add(
                    _populationAfterCrossing.GetIndividual(i).GetMutationProbability() < _mutationProbability
                        ? evaluations.Mutate(_populationAfterCrossing.GetIndividual(i))
                        : _populationAfterCrossing.GetIndividual(i));
                _populationAfterMutation.GetIndividual(i).Calculate(_function1, _function2);
            }
        }