コード例 #1
0
            public double GetScore(TSpecies member)
            {
                double result;

                if (!this.mapSpeciesToScore.TryGetValue(member, out result))
                {
                    result = this.comparable.GetScore(member);
                    this.mapSpeciesToScore[member] = result;
                    return(result);
                }
                else
                {
                    return(result);
                }
            }
コード例 #2
0
            public TSpecies GetUniqueSpecies(TSpecies member)
            {
                for (int count = 0; count < 100; ++count)
                {
                    TSpecies result = this.mutator.Mutate(member);

                    if (this.speciesGenerator.Contains(result))
                    {
                        continue;
                    }

                    this.speciesGenerator.Add(result);
                    return(result);
                }

                return(default(TSpecies));
            }
コード例 #3
0
 public void RegisterSpecies(TSpecies member)
 {
     this.speciesGenerator.Add(member);
 }
コード例 #4
0
 public SpeciesScorePair(TSpecies species, float score)
 {
     this.species = species;
     this.score   = score;
 }