Poster of Linux kernelThe best gift for a Linux geek
PGAGetSortedPopIndex

PGAGetSortedPopIndex

Section: PGAPack (8) Updated: 05/01/95
Local index Up
 

NAME

PGAGetSortedPopIndex - returns a population string index from the array created by PGASortPop().  

INPUT PARAMETERS

ctx
- context variable
n
- specified which index element is to be returned.
 

OUTPUT PARAMETERS

none

 

SYNOPSIS

#include "pgapack.h"
int  PGAGetSortedPopIndex(ctx, n)
PGAContext *ctx
int n
 

LOCATION

pop.c  

EXAMPLE

Example:
Copy the five best strings from the old population into the new
population.  The rest of the new population will be created by
recombination, and is not shown.

PGAContext *ctx;
int i,j;
:
PGASetPopReplaceType(ctx,PGA_POPREPL_BEST)
PGASortPop(ctx, PGA_OLDPOP);
for ( i=0; i < 5; i++) {
j = PGAGetSortedPopIndex(ctx, i);
PGACopyIndividual (ctx, j, PGA_OLDPOP, i, PGA_NEWPOP);
:


 

Index

NAME
INPUT PARAMETERS
OUTPUT PARAMETERS
SYNOPSIS
LOCATION
EXAMPLE

This document was created by man2html, using the manual pages.
Time: 22:02:08 GMT, April 16, 2011