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); } }
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)); }
public void RegisterSpecies(TSpecies member) { this.speciesGenerator.Add(member); }
public SpeciesScorePair(TSpecies species, float score) { this.species = species; this.score = score; }