PGADuplicate(8)

NAME
PGADuplicate - determines if a specified string is a duplicate of one already in an existing population

INPUT PARAMETERS
ctx - context variable
p   - string index
pop1
    - symbolic constant of the population containing string p
pop2
    - symbolic constant of the (possibly partial) population containing strings to compare string p against
n   - the number of strings in pop2 to compare string p against
n   -1)

OUTPUT PARAMETERS
none

SYNOPSIS
#include "pgapack.h"
int  PGADuplicate(ctx, p, pop1, pop2, n)
PGAContext *ctx
int p
int pop1
int pop2
int n

LOCATION
duplicate.c

EXAMPLE
0,...,n-1 in population pop2.  Otherwise returns PGAFALSE
Example:
To check if string b in population PGA_OLDPOP is a duplicate of any
of the strings in the first half of population PGA_NEWPOP use
PGAContext *ctx;
int b, n;
:
b  = PGAGetBest(ctx, PGA_OLDPOP);
n  = PGAGetPopsize(ctx);
n /= 2;
PGADuplicate(ctx, b, PGA_OLDPOP, PGA_NEWPOP, n);