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

# PGASetMutationProb(3)

Specifies the probability that a given allele will be mutated.

## NAME

PGASetMutationProb - Specifies the probability that a given allele will be mutated.

## DESCRIPTION

If this is called without calling PGASetMutationType(), the default mutation type is PGA\_MUTATION\_FIXED.  The default probability is the reciprocal of the string length.

## INPUT PARAMETERS

- ctx

  \- context variable

- p

  \- the mutation probability

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
void  PGASetMutationProb(ctx, mutation_prob)
PGAContext *ctx
double mutation_prob
```

## LOCATION

mutation.c

## EXAMPLE

```
Example:
PGAContext *ctx;
:
PGASetMutationProb(ctx,0.001);
```
