registerECROperator {ecr}R Documentation

Register operators to control object.

Description

In ecr the control object stores information on the fitness function and serves as a storage for evolutionary components used by your evolutionary algorithm. This function handles the registration process.

Usage

registerECROperator(control, slot, fun, ...)

Arguments

control

[ecr_control]
Control object.

slot

[character(1)]
Name of the field in the control object where to store the operator.

fun

[function]
Actual operator. In order to use the various helper functions of ecr one needs to stick to a simple convention: The first argument of function should be the individual to mutate, a list of individuals for recombination or a matrix of fitness values for recombination. If one does not want to use the corresponding helpers, e.g., mutate, the signature of the function does not matter. However, in this case you are responsible to pass arguments correctly.

...

[any]
Further arguments for fun. These arguments are stored in the control object and passed on to fun.

Value

[ecr_control]


[Package ecr version 2.1.1 Index]