Learn R Programming

adana (version 1.1.0)

cx: Cycle Crossover (CX)

Description

The Cycle Crossover (CX) is an algorithm that considers the gene order in the parental chromosomes (Oliver et.al., 1987).

Usage

cx(x1, x2, cxon, ...)

Arguments

x1

A vector. It contains the chromosomal information of parent-1.

x2

A vector. It contains the chromosomal information of parent-2.

cxon

Number of offspring to be generated as a result of crossover

Further arguments passed to or from other methods.

Value

A matrix containing the generated offsprings.

References

Oliver, I.M., Smith, D. and Holland J.R. (1987). Study of the permutation crossover operators on the traveler salesman problem. In Grefenstette, J.J. (ed). Genetic Algorithms and Their Applications, Proc. of the 2nd Int. Conf. Hillsdale, New Jersey: Lawrence Erlbaum, pp. 224-230.

See Also

cross, px1, kpx, sc, rsc, hux, ux, ux2, mx, rrc, disc, atc, cpc, eclc, raoc, dc, ax, hc, sax, wax, lax, bx, ebx, blxa, blxab, lapx, elx, geomx, spherex, pmx, mpmx, upmx, ox, ox2, mpx, erx, pbx, pbx2, icx, smc

Examples

Run this code
# NOT RUN {
parent1 =c(9, 8, 2, 1, 7, 4, 5, 0, 6, 3)
parent2 =c(1, 2, 3, 4, 5, 6, 7, 8, 9, 0)
cx(parent1, parent2)
# }

Run the code above in your browser using DataLab