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); } }