Learn R Programming

ecr (version 1.0)

makeGenerator: Construct a generator.

Description

Helper function which constructs a generator, i. e., a function which generates an initial population.

Usage

makeGenerator(generator, name, description, supported = getAvailableRepresentations(), params = list())

Arguments

generator
[function] Actual generator function. Should expect the size of the population size as a first and a ecr control object control as the second argument.
name
[character(1)] Name of the generator.
description
[character(1)] Short description of how the generator works.
supported
[character] Vector of strings/names of supported parameter representations, i.e., 'permutation', 'float', 'binary' or 'custom'.
params
[list] Named list of the parameters the generator has been initialized with. Default is the empty list.

Value

[ecr_generator] Generator object.