select {ecr}R Documentation

Select individuals.

Description

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.

Usage

selectForMating(control, fitness, n.select)

selectForSurvival(control, fitness, n.select)

Arguments

control

[ecr_control]
Control object.

fitness

[matrix]
Matrix of fitness values (each column contains the fitness value(s) of one individual).

n.select

[integer(1)]
Number of individuals to select.

Details

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.

Value

[integer] Integer vector with the indizes of selected individuals.


[Package ecr version 2.1.1 Index]