---
name: "PGARunMutationAndCrossover"
section: "8"
platform: "linux"
package: "pgapack"
version: "1.1.1-3"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/PGARunMutationAndCrossover"
---

# PGARunMutationAndCrossover(8)

Performs crossover and mutation from one population to create the next.

## NAME

PGARunMutationAndCrossover - Performs crossover and mutation from one population to create the next.

## DESCRIPTION

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  PGARunMutationAndCrossover(ctx, oldpop, newpop)
PGAContext *ctx
int oldpop
int newpop
```

## LOCATION

pga.c

## EXAMPLE

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