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

# PGASetCrossoverType(3)

specify the type of crossover to use.

## NAME

PGASetCrossoverType - specify the type of crossover to use.

## DESCRIPTION

Valid choices are PGA\_CROSSOVER\_ONEPT, PGA\_CROSSOVER\_TWOPT, or PGA\_CROSSOVER\_UNIFORM for one-point, two-point, and uniform crossover, respectively.  The default is PGA\_CROSSOVER\_TWOPT.

## INPUT PARAMETERS

- ctx

  \- context variable

- crossover\_type

  \- symbolic constant to specify crossover type

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
void  PGASetCrossoverType(ctx, crossover_type)
PGAContext *ctx
int crossover_type
```

## LOCATION

cross.c

## EXAMPLE

```
Example:
Use uniform crossover when crossingover strings.
PGAContext *ctx;
:
PGASetCrossoverType(ctx, PGA_CROSSOVER_UNIFORM);
```
