Description Usage Arguments Details Value Examples
Make 2 individual parent chromosomes crossover and mutate when breeding offsprings.
1 | crossover(chr1, chr2)
|
chr1, chr2 |
a numeric vectors represents individual parent chromosome. |
This function makes two individual parent chromosomes perfrom
crossover and mutation when breeding offspring.
Note that the crossover is simply one-point crossover and the mutation
is based on GA::mutation()
.
A C by 2 matrix with each column representing the offspring from a genetic operator of crossover and mutation, C is the chromosome length.
1 2 3 | ind1 <- initialization(10, 15)[, 1]
ind2 <- initialization(10, 15)[, 2]
crossover(ind1, ind2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.