This function expects as primary parameters the desired instance size \(n\),
a number of iteration iters to perform and a collection of mutation operators
collection. The generation process is sequential:
Place \(n\) points uniformly at random in \([0,1]^2\). We shall denote this set as \(P\) in the following..
For the desired number of iterations iters repeat the following
process: select a mutation operator \(m\) from the collection at random (according
to the probability distribution stored in collection and set \(P = m(P)\).
build(n, iters = 10L, collection, return.all = FALSE, upper = 1, bound.handling = "uniform")
| n | [ |
|---|---|
| iters | [ |
| collection | [ |
| return.all | [ |
| upper | [ |
| bound.handling | [ |
Either a netgen Network if return.all = FALSE, otherwise a
list of netgen networks of length iters + 1.
If setProbabilities was not called on the collection
the algorithm falls back to the uniform distribution, i.e., each mutation operator
is selected with equal probability for application in each iteration.
# set up a set of mutation operators collection = init() collection = addMutator(collection, "doUniformMutation", pm = 0.3) collection = addMutator(collection, "doExplosionMutation", min.eps = 0.2, max.eps = 0.4) collection = addMutator(collection, "doImplosionMutation", min.eps = 0.2, max.eps = 0.4) collection = addMutator(collection, "doAxisProjectionMutation") # specify probability distribution. collection = setProbabilities(collection, probs = c(0.1, 0.6, 0.2, 0.1)) x = build(n = 50, iters = 10, collection = collection) x = build(n = 100, iters = 50, collection = collection, return.all = TRUE, bound.handling = "boundary")