This utility functions expect a control object, a matrix of
fitness values - each column containing the fitness value(s) of one individual -
and the number of individuals to select.
The corresponding selector, i.e., mating selector for selectForMating
or survival selector for selectForSurvival is than called internally
and a vector of indizes of selected individuals is returned.
selectForMating(control, fitness, n.select)selectForSurvival(control, fitness, n.select)
[integer] Integer vector with the indizes of selected individuals.
[ecr_control]
Control object.
[matrix]
Matrix of fitness values (each column contains the fitness value(s) of one
individual).
[integer(1)]
Number of individuals to select.
Both functions check the optimization directions stored in the task
inside the control object, i.e., whether to minimize or maximize each objective,
and transparently prepare/transform the fitness matrix for the selector.