Function PGASortND_Both
Defined in File pop.c
Function Documentation
-
unsigned int PGASortND_Both(PGAContext *ctx, PGAIndividual **start, size_t n, int goal)
Perform nondominated sorting, compare old and new implementation.
Description
Perform dominance computation known as nondominated sorting or ranking. This version compares the old O(n**2) implementation against the new O(n*(log(n))**m) algorithm (where n is the population size and m is the number of objectives). It asserts that the two produce identical results.
- Parameters:
ctx – context variable
start – pointer to individuals
n – number of individuals
goal – number of individuals needed in next generation
- Returns:
Maximum rank given or UINT_MAX if goal was reached exactly (in which case no crowding is necessary)