EnglishFrenchSpanish

OnWorks favicon

PGAGetIntegerFromGrayCode - Online in the Cloud

Run PGAGetIntegerFromGrayCode in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command PGAGetIntegerFromGrayCode that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


PGAGetIntegerFromGrayCode - interpets a binary reflected Gray code sequence as encoding an
integer value and returns the integer value it represents.

INPUT PARAMETERS


ctx - context variable
p - string index
pop - symbolic constant of the population the string is in
start - starting bit position in the binary representation
end - ending bit position in the binary representation

OUTPUT PARAMETERS


none

SYNOPSIS


#include "pgapack.h"
int PGAGetIntegerFromGrayCode(ctx, p, pop, start, end)
PGAContext *ctx
int p
int pop
int start
int end

LOCATION


evaluate.c

EXAMPLE


Example:
Get an integer j from bits 10--29 of string p in population PGA_NEWPOP.
The string is encoded in Gray code.

PGAContext *ctx;
int j, p;
:
j = PGAGetIntegerFromGrayCode(ctx, p, PGA_NEWPOP, 10, 29);

05/01/95 PGAGetIntegerFromGrayCode(1)

Use PGAGetIntegerFromGrayCode online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

Linux commands

Ad