<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«


Return to chapter overview


PutChromosomePool(Population As Integer, Individual As Integer, ChromoPool As Integer, PoolArray As Single)


Purpose: This function puts the information into a specific chromosome pool of a specific individual in the population.  Use PutChromosomePool when you want to start from a predetermined state of chromosomes in the population (e.g. to continue using a previously saved population). PoolArray is a one-dimensional array of 4-byte real numbers, the size of which equals the size of the specified chromosome pool, i.e., the number of chromosomes in the pool.  Normally, you will not have to use PutChromosomePool because GeneHunter initializes chromosomes to random values when MakeChromosomePool is called.



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

Individual is the number of the individual whose chromosome pool you want to load into an array in your program.  Individual numbers start with 0.

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

PoolArray is an array in your program, the contents of which will be transferred into the chromosome pool.


Example: i = PutChromoPool(PopNo, 5, 0, PoolArr(0))


This example sets individual 5 of chromosome pool 0 in the population PopNo with a number stored in the PopNo variable.  GeneHunter stores the contents of PoolArr starting from the 0 element of the array into the chromosome pool.


Related Functions: MakeChromosomePool, GetChromosomePool