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

# PGARunMutationOrCrossover(3)

Performs crossover or mutation (but not both) from one populationto create the next. Assumes PGASelect has been called.

## NAME

PGARunMutationOrCrossover - Performs crossover or mutation (but not both) from one populationto create the next.  Assumes PGASelect has been called.

## INPUT PARAMETERS

- ctx

  \- context variable

- oldpop

  \- symbolic constant of old population

- newpop

  \- symbolic constant of new population

## OUTPUT PARAMETERS

- side

  \-effect.

## SYNOPSIS

```
#include "pgapack.h"
void  PGARunMutationOrCrossover(ctx, oldpop, newpop)
PGAContext *ctx
int oldpop
int newpop
```

## LOCATION

pga.c

## EXAMPLE

```
PGAContext *ctx,
:
PGARunMutationOrCrossover(ctx, PGA_OLDPOP, PGA_NEWPOP);
```
