예제 #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);