xegaGaCrossGene {xegaGaGene}R Documentation

One point crossover of 2 genes.

Description

xegaGaCrossGene randomly determines a cut point. It combines the bits before the cut point of the first gene with the bits after the cut point from the second gene (kid 1). It combines the bits before the cut point of the second gene with the bits after the cut point from the first gene (kid 2).

Usage

xegaGaCrossGene(gg1, gg2, lF)

Arguments

gg1

A binary gene.

gg2

A binary gene.

lF

The local configuration of the genetic algorithm.

Value

A list of one binary gene.

See Also

Other Crossover (1): xegaGaUCrossGene(), xegaGaUPCrossGene()

Examples

gene1<-xegaGaInitGene(lFxegaGaGene)
gene2<-xegaGaInitGene(lFxegaGaGene)
xegaGaDecodeGene(gene1, lFxegaGaGene)
xegaGaDecodeGene(gene2, lFxegaGaGene)
gene3<-xegaGaCrossGene(gene1, gene2, lFxegaGaGene)
xegaGaDecodeGene(gene3[[1]], lFxegaGaGene)

[Package xegaGaGene version 1.0.0.1 Index]