---
name: "PGACopyIndividual"
section: "3"
platform: "linux"
package: "pgapack"
version: "1.0.0.1-3"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/PGACopyIndividual/3"
---

# PGACopyIndividual(3)

copies string p1 in population pop1 to position p2 in population pop2

## NAME

PGACopyIndividual - copies string p1 in population pop1 to position p2 in population pop2

## INPUT PARAMETERS

- ctx

  \- context variable

- p1

  \- string to copy

- pop1

  \- symbolic constant of population containing string p1

- p2

  \- string to copy p1 to

- pop2

  \- symbolic constant of population containing string p2

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
void  PGACopyIndividual(ctx, p1, pop1, p2, pop2)
PGAContext *ctx
int p1
int pop1
int p2
int pop2
```

## LOCATION

utility.c

## EXAMPLE

```
Example:
PGAContext *ctx;
int i,j;
:
PGACopyIndividual(ctx, i, PGA_OLDPOP, j, PGA_NEWPOP);
```
