_topn
Module Contents
Functions
|
Get indices of the top n genotypes sorted by their fitness. |
Attributes
- Genotype
- Fitness
- topn(n: int, genotypes: list[Genotype], fitnesses: list[Fitness]) list[int]
Get indices of the top n genotypes sorted by their fitness.
- Parameters:
n – The number of genotypes to select.
genotypes – The genotypes. Ignored, but argument kept for function signature compatibility with other selection functions/
fitnesses – Fitnesses of the genotypes.
- Returns:
Indices of the selected genotypes.