IMSL C Stat Library
ga_grow_population
Adds individuals to an existing population.
Synopsis
#include <imsls.h>
void imsls_f_ga_grow_population (int n, Imsls_f_individual *individual[], Imsls_f_population *population, …, 0)
The type double function is imsls_d_ga_grow_population.
Required Arguments
int n (Input)
The number of individuals to add to the population.
Imsls_f_individual *individual[] (Input)
An array of pointers to n individuals.
Imsls_f_population *population (Input/Output)
An existing population.
Synopsis with Optional Arguments
#include <imsls.h>
Imsls_f_population *imsls_f_ga_grow_population(int n, Imsls_f_individual *individual[],
Imsls_f_population *population,
IMSLS_PRINT,
IMSLS_FITNESS, float fitness[],
IMSLS_FITNESS_FCN, float fitness(),
IMSLS_FITNESS_FCN_WITH_PARMS, float fitness(), void *parms,
0)
Optional Arguments
IMSLS_PRINT, (Input)
By default, summary statistics are not printed. This option turns on printing of the summary statistics for the new population.
IMSLS_FITNESS, float fitness[] (Input)
An array of length n containing the fitness values for the individuals added to the population. fitness[i] is the fitness for the i-th individual.
IMSLS_FITNESS_FCN, float fitness(Imsls_f_individual *individual) (Input)
The fitness function calculated for individual. If this is supplied, fitness values are calculated for each individual and included within the expanded population data structure. Otherwise they are set to zero.
IMSLS_FITNESS_FCN_WITH_PARMS, float fitness(Imsls_f_individual *individual, void *parms), void *parms (Input)
The fitness function calculated for individual. If this is supplied, fitness values are calculated for each individual and included in the expanded population data structure. The parameters in parms are passed to the function.
Description
Function imsls_f_ga_grow_population grows an existing population by adding new individuals. The chromosome data structure of the individuals and the population must be identical. Fitness values for the new population are set to zero unless the fitness function is supplied using the optional arguments IMSLS_FITNESS_FCN or IMSLS_FITNESS_FCN_WITH_PARMS.
Fitness values for the new individuals can also be supplied using optional argument IMSLS_FITNESS.