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

# PGASetMaxSimilarityValue(3)

Specifiy the maximum percent of homogeneity of the population before stopping. 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.

## NAME

PGASetMaxSimilarityValue - Specifiy the maximum percent of homogeneity of the population before stopping.  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);
```
