CNL Stat : Data Mining : ga_copy_chromosome
ga_copy_chromosome
Copies the contents of one chromosome into another chromosome.
Synopsis
#include <imsls.h>
void imsls_f_ga_copy_chromosome (Imsls_f_chromosome *chromosomeIn, Imsls_f_chromosome *chromosomeOut)
The type double function is imsls_d_ga_copy_chromosome.
Required Arguments
Imsls_f_chromosome *chromosomeIn (Input)
An existing chromosome to be copied into chromosomeOut.
Imsls_f_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 imsls_f_ga_clone_chromosome 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.