コード例 #1
0
    public override Individual Clone()
    {
        NovoIndividuo newobj = (NovoIndividuo)this.MemberwiseClone();

        newobj.fitness     = 0f;
        newobj.trackPoints = new Dictionary <float, float>(this.trackPoints);
        return(newobj);
    }
コード例 #2
0
ファイル: EvolutionState.cs プロジェクト: PutoPtg/IIA_TP3
 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);
         }
     }
 }