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.
gen(expr, n)genBin(n, n.dim)
genPerm(n, n.dim)
genReal(n, n.dim, lower, upper)
[list
]
[R expression]
Expression to generate a single individual.
[integer(1)
]
Number of individuals to create.
[integer(1)
]
Dimension of the decision space.
[numeric
]
Vector of minimal values for each parameter of the decision space in case
of float encoding.
[numeric
]
Vector of maximal values for each parameter of the decision space in case
of float encoding.