Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pgadebugprint(3) [debian man page]

PGADebugPrint(3)						      PGAPack							  PGADebugPrint(3)

NAME
PGADebugPrint - Write debugging information INPUT PARAMETERS
ctx - context variable level - a symbolic constant that maps to the type of print requested (e.g., an entry or exit print). Valid values are PGA_DEBUG_ENTERED, PGA_DEBUG_EXIT, PGA_DEBUG_MALLOC, PGA_DEBUG_PRINTVAR, PGA_DEBUG_SEND, and PGA_DEBUG_RECV. funcname - the name of the function that called this routine msg - message to print datatype - a symbolic constant that maps to the data type of the parameter data. Valid choices are PGA_INT, PGA_DOUBLE, PGA_CHAR and PGA_VOID (no data). data - a pointer, whose contents will be interpreted based upon the datatype parameter (or NULL, if PGA_VOID). OUTPUT PARAMETERS
none SYNOPSIS
#include "pgapack.h" void PGADebugPrint(ctx, level, funcname, msg, datatype, data) PGAContext *ctx int level char *funcname char *msg int datatype void *data LOCATION
debug.c EXAMPLE
Example: If the debugging level includes printing variables (level 82), print the value of the integer variable num as a debugging tool in the routine Add2Nums PGAContext *ctx; int num; : PGADebugPrint(ctx, PGA_DEBUG_PRINTVAR, "Add2Nums", "num = ", PGA_INT, (void *) &num); 05/01/95 PGADebugPrint(3)

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