gaCopyChromosome

Copies the contents of one chromosome into another chromosome.

Synopsis

gaCopyChromosome (chromosomeIn, chromosomeOut)

Required Arguments

Imsls_d_chromosome chromosomeIn (Input)
An existing chromosome to be copied into chromosomeOut.
Imsls_d_chromosome chromosomeOut (Input/Output)
The contents of chromosomeOut are replaced with chromosomeIn. The memory for chromosomeOut must already be allocated.

Description

This function copies the contents of chromosomeIn into chromosomeOut. Both chromosomes must have been previously created with identical structures. The memory for both data structures must have already been allocated. If memory is not allocated, use gaCloneChromosome to create an entirely new copy of an existing chromosome. Although the structures can have different encoding boundaries, they must have the same number of binary, nominal, integer and real phenotypes.