Description Usage Arguments Details Value Author(s) See Also Examples
Taking a matrix OldChrom containing the binary representation of the individuals in the current population, applying crossover to consecutive pairs of individuals with defined probability and returns the resulting population.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
OldChrom |
a matrix containing the chromosomes of the old population. Each row corresponds to one individual. |
Px |
a number indicating the probability of recombination ocurring between pairs of individuals. If omitted, 0.7 is set. |
Npt |
an optinal number indicating the number of crossover points to use. Specifically, 1 indicates single point recombination; 2 indicates double point recombination; and 0 indicates shuffle point recombination. Default is set to 0. |
Rs |
an optional logical value indicating whether or not to force the production of offspring different from their parents. Default is set to FALSE. |
xovmp is the general crossover function for binary representation and
can be called by all other crossover functions. When xovmp called by
recombin, high-level crossover function, its arguments can also
be passed on to. With different combination of argumetents, it can be used identically
to xovsp, xovdp, xovsh, xovsprs, xovdprs and
xovshrs. Althogh these replicatical use, other form of crossover funcions
are maintained for completence reason.
xovsp performs single-point crossover between pairs of individuals. When called by
recombin, recombin("xovsp",Chrom) is identical to
recombin("xovmp",Chrom,Npt=1).
xovdp performs double-point crossover between pairs of individuals. When called by
recombin, recombin("xovdp",Chrom) is identical to
recombin("xovmp",Chrom,Npt=2).
xovsh performs shuffle-point crossover between pairs of individuals. When called by
recombin, recombin("xovsh",Chrom) is identical to
recombin("xovmp",Chrom).
xovsprs performs single-point reduced surrogate crossover between
pairs of individuals. When called by recombin,
recombin("xovsprs",Chrom) is identical to
recombin("xovmp",Chrom,Npt=1,Rs=TRUE).
xovdprs performs double-point reduced surrogate crossover between
pairs of individuals. When called by recombin,
recombin("xovdprs",Chrom) is identical to
recombin("xovmp",Chrom,Npt=2,Rs=TRUE).
xovshrs performs shuffle-point reduced surrogate crossover between
pairs of individuals. When called by recombin,
recombin("xovshrs",Chrom) is identical to
recombin("xovmp",Chrom,Rs=TRUE).
a matrix containing the offspring after mating, ready to be mutated and/or evaluated, in the same format as OldChrom.
The original matlab implementation was written by Carlos Fonseca and updated by Andrew Chipperfield. The R implementation was written by David Zhao.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.