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

# PGASetMaxSimilarityValue(8)

Specifiy the maximum percent of homogeneity of the population before stopping.

## NAME

PGASetMaxSimilarityValue - Specifiy the maximum percent of homogeneity of the population before stopping.

## DESCRIPTION

The similarity measure is the same evaluation function value.  The default value is 95 percent.  The stopping rule PGA\_STOP\_TOOSIMILAR must have been set by PGASetStoppingRuleType for this function call to have any effect.

## INPUT PARAMETERS

- ctx

  \- context variable

- max\_similarity

  \- the maximum percent of the population that can share the same evaluation function value

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
void  PGASetMaxSimilarityValue(ctx, max_similarity)
PGAContext *ctx
int max_similarity
```

## LOCATION

stop.c

## EXAMPLE

```
Example:
PGAContext *ctx;
:
PGASetMaxSimilarityValue(ctx,99);
```
