コード例 #1
0
        public State <T> AddChromosome(Chromosome <T> chromosome)
        {
            var newChromosomes = Chromosomes.Add(chromosome).OrderByDescending(c => c.Fitness);

            return(new State <T>(newChromosomes));
        }
コード例 #2
0
 public int CompareTo(Chromosome <T> other) => Fitness.CompareTo(other.Fitness);