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

# PGAGetOptDirFlag(8)

Returns a symbolic constant that represents the direction of optimization

## NAME

PGAGetOptDirFlag - Returns a symbolic constant that represents the direction of optimization

## INPUT PARAMETERS

- ctx

  \- context variable

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
int  PGAGetOptDirFlag(ctx)
PGAContext *ctx
```

## LOCATION

pga.c

## EXAMPLE

```
Example:
PGAContext *ctx;
int optdir;
:
optdir = PGAGetOptDirFlag(ctx);
switch (optdir) {
case PGA_MAXIMIZE:
printf("Optimization direction = PGA_MAXIMIZE0);
break;
case PGA_MINIMIZE:
printf("Optimization direction = PGA_MINIMIZE0);
break;
}
```
