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

# PGASelect(3)

performs genetic algorithm selection using either the default selection scheme or that specified with PGASetSelectType().

## NAME

PGASelect - performs genetic algorithm selection using either the default selection scheme or that specified with PGASetSelectType().

## DESCRIPTION

Valid selection methods are proportional, stochastic universal, tournament, or probabilistic tournament selection, PGA\_SELECT\_PROPORTIONAL, PGA\_SELECT\_SUS,  PGA\_SELECT\_TOURNAMENT, and PGA\_SELECT\_PTOURNAMENT, respectively.  This  function updates an internal array with the indices of members of popix  selected for recombination.  These indices may be accessed with  PGASelectNextIndex()

## INPUT PARAMETERS

- ctx

  \- context variable

- popix

  \- symbolic constant of population to select from

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
void  PGASelect(ctx, popix)
PGAContext *ctx
int popix
```

## LOCATION

select.c

## EXAMPLE

```
Example:
PGAContext *ctx,
:
PGASelect(ctx, PGA_OLDPOP);
```
