Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pgasetuserfunction(8) [debian man page]

PGASetUserFunction(8)						      PGAPack						     PGASetUserFunction(8)

NAME
PGASetUserFunction - specifies the name of a user-written function call to provide a specific GA capability (e.g., crossover, mutation, etc.). DESCRIPTION
This function MUST be used when using a non-native datatype and must be called once for each of: PGA_USERFUNCTION_CREATESTRING -- String creation PGA_USERFUNCTION_MUTATION -- Mutation PGA_USERFUNCTION_CROSSOVER -- Crossover PGA_USERFUNCTION_PRINTSTRING -- String Output PGA_USERFUNCTION_COPYSTRING -- Duplication PGA_USERFUNCTION_DUPLICATE -- Duplicate Checking PGA_USERFUNCTION_INITSTRING -- Initialization PGA_USERFUNCTION_BUILDDATATYPE -- MPI Datatype creation PGA_USERFUNCTION_STOPCOND -- Stopping conditions PGA_USERFUNCTION_ENDOFGEN -- Auxiliary functions at the end of each generation It MAY be called when using a native datatype to replace the built-in functions PGAPack has for that datatype (For example, if the Integer data type is used for a traveling salesperson problem, the user may want to provide their own custom crossover operator). See the user guide and the examples in the examples directory for more details. INPUT PARAMETERS
ctx - context variable constant - symbolic constant of the user function to set f - name of the function to use OUTPUT PARAMETERS
none SYNOPSIS
#include "pgapack.h" void PGASetUserFunction(ctx, constant, f) PGAContext *ctx int constant void *f LOCATION
user.c EXAMPLE
Example: void MyStringInit(PGAContext *, void *); PGAContext *ctx; : PGASetUserFunction(ctx, PGA_USERFUNCTION_INITSTRING, MyStringInit); 05/01/95 PGASetUserFunction(8)

Check Out this Related Man Page

PGASortPop(8)							      PGAPack							     PGASortPop(8)

NAME
PGASortPop - Creates an (internal) array of indices according to one of three criteria. DESCRIPTION
If PGA_POPREPL_BEST is used (the default) the array is sorted from most fit to least fit. If PGA_POPREPL_RANDOM_REP is used the indices in the array are selected randomly with replacement. If PGA_POPREPL_RANDOM_NOREP is used the indices in the array are selected randomly with- out replacement. The function PGASetPopReplaceType() is used to specify which strategy is used. The indices of the sorted population mem- bers may then be accessed from the internal array via PGAGetSortedPopIndex(). This routine is typically used during population replace- ment. INPUT PARAMETERS
ctx - context variable popindex - symbolic constant of the population from which to create the srted array. OUTPUT PARAMETERS
none SYNOPSIS
#include "pgapack.h" void PGASortPop(ctx, pop) PGAContext *ctx int pop LOCATION
pop.c EXAMPLE
Example: Copy the five best strings from the old population into the new population. The rest of the new population will be created by recombination, and is not shown. PGAContext *ctx; int i,j; : PGASetPopReplaceType(ctx,PGA_POPREPL_BEST) : PGASortPop(ctx, PGA_OLDPOP); for ( i=0; i < 5; i++) { j = PGAGetSortedPopIndex(ctx, i); PGACopyIndividual (ctx, j, PGA_OLDPOP, i, PGA_NEWPOP); : 05/01/95 PGASortPop(8)
Man Page

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Converting a String variable into Integer

Hi, I am passing a variable to a unix function. However when I try to assign the value to another variable like typeset -i I_CACHE_VAL=$2 Is this because of String to Integer conversion? I get an error. Please help me with thsi. Thanks (2 Replies)
Discussion started by: neeto
2 Replies

2. IP Networking

Two Servers via ethernet crossover cable

Hi, I'm trying to communicate two servers (HP DLProliant 380 G5) via a crossover cable, but I don't get them to ping each other. I am working in RHEL 4. These are the steps I've performed: 1) Plugged the crossover cables in eth2. (note: The cable is brand new. Also I built one myself... (3 Replies)
Discussion started by: jrodriguez365
3 Replies

3. Programming

Append data to smallint data in informix4gl?

Hi, I have an smallint variable, say "a", i would like to prefix it with "0" in certain conditions. Is it possible to achieve that with this datatype? For instance, a=9 --> a=09 Many thanks (1 Reply)
Discussion started by: dvah
1 Replies

4. Shell Programming and Scripting

Datatype file validation

I have a sourcefile which contains data as below.I want to check whether datatype,structure and date format looks good as mentioned. Data is delemited by cydila . Source file-Emp.txt sno name phoneno dept joineddate 1 vivek 0861 CSE 2013-05-29 00:00:00 2 dinesh 123456 ECE ... (2 Replies)
Discussion started by: katakamvivek
2 Replies