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

# PGASetMutationAndCrossoverFlag(8)

A boolean flag to indicate if recombination uses both crossover and mutation on selected strings

## NAME

PGASetMutationAndCrossoverFlag - A boolean flag to indicate if recombination uses both crossover and mutation on selected strings

## INPUT PARAMETERS

- ctx

  \- context variable

- flag

  \- PGA\_TRUE (default) or PGA\_FALSE

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
void  PGASetMutationAndCrossoverFlag(ctx, flag)
PGAContext *ctx
int flag
```

## LOCATION

pga.c

## EXAMPLE

```
Example:
Set the genetic algorithm to use both crossover and mutation when
reproducing strings.
PGAContext *ctx;
:
PGASetMutationAndCrossoverFlag(ctx,PGA_FALSE);
```
