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

# PGASetUniformCrossoverProb(3)

Probability used in uniform crossover to specify that an allele value value be selected from a particular parent.

## NAME

PGASetUniformCrossoverProb - Probability used in uniform crossover to specify that an allele value value be selected from a particular parent.

## DESCRIPTION

The default is 0.6.  The crossover type must have been set to PGA\_CROSSOVER\_UNIFORM with PGASetCrossoverType for this function call to have any effect.

## INPUT PARAMETERS

- ctx

  \- context variable

- p

  \- the crossover probability

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
void  PGASetUniformCrossoverProb(ctx, uniform_cross_prob)
PGAContext *ctx
double uniform_cross_prob
```

## LOCATION

cross.c

## EXAMPLE

```
Example:
PGAContext *ctx;
:
PGASetUniformCrossoverProb(ctx,0.9);
```
