public override Individual Clone() { NovoIndividuo newobj = (NovoIndividuo)this.MemberwiseClone(); newobj.fitness = 0f; newobj.trackPoints = new Dictionary <float, float>(this.trackPoints); return(newobj); }
void InitPopulation() { population = new List <Individual>(); while (population.Count < populationSize) { if (individuo == 0) { ExampleIndividual newind = new ExampleIndividual(info); newind.Initialize(); population.Add(newind); } if (individuo == 1) { NovoIndividuo newind = new NovoIndividuo(info, numPontosCorte); newind.Initialize(); population.Add(newind); } } }