<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«


Return to chapter overview


GetChromosome(Population As Integer, Individual As Integer, Chromosome As Integer, ChromoValue As Single)


Purpose: This function returns the current value of a specified chromosome of a specific individual in the population.  As chromosome values change after each new generation step, the only way to retrieve new values is to use the GetChromosome function.



Population is the number of the population with which you are working.

Individual is the number of the individual whose chromosome value you want to load into a variable in your program.  Individual numbers start with 0.

Chromosome is the number of the chromosome whose value you want to get.  Chromosome numbers start with 0.

ChromoValue is a variable in your program where you want the value of the chromosome to be stored.


Example: i = GetChromosome(PopNo, 0, 1, ChromoVal)


This example retrieves the value of chromosome 1 of individual 0 in the population whose number is stored in the PopNo variable.  The chromosome value is stored in ChromoVal by GeneHunter.


Related Functions: MakeChromosome, PutChromosome