generators {ecr}R Documentation

Population generators

Description

Utility functions to build a set of individuals. The function gen expects an R expression and a number n in order to create a list of n individuals based on the given expression. Functions genBin, genPerm and genReal are shortcuts for initializing populations of binary strings, permutations or real-valued vectors respectively.

Usage

gen(expr, n)

genBin(n, n.dim)

genPerm(n, n.dim)

genReal(n, n.dim, lower, upper)

Arguments

expr

[R expression]
Expression to generate a single individual.

n

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

n.dim

[integer(1)]
Dimension of the decision space.

lower

[numeric]
Vector of minimal values for each parameter of the decision space in case of float encoding.

upper

[numeric]
Vector of maximal values for each parameter of the decision space in case of float encoding.

Value

[list]


[Package ecr version 2.1.1 Index]