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
PGASendReceiveIndividual(4) PGAPack PGASendReceiveIndividual(4)NAME
PGASendReceiveIndividual - Send an individual to a process, while receiving a different individual from a different process.
INPUT PARAMETERS
ctx - context variable
send_p - index of string to send
send_pop
- symbolic constant of population to send from
dest - destination process
send_tag
- tag to send with
recv_p - index of string to receive
recv_pop
- symbolic constant of population to receive from
source - process to receive from
recv_tag
- tag to receive with
comm - an MPI communicator
status - pointer to the MPI status structure
OUTPUT PARAMETERS
none
SYNOPSIS
#include "pgapack.h"
void PGASendReceiveIndividual(ctx, send_p, send_pop, dest, send_tag, recv_p, recv_pop, source, recv_tag, comm, status)
PGAContext *ctx
int send_p
int send_pop
int dest
int send_tag
int recv_p
int recv_pop
int source
int recv_tag
MPI_Comm comm
MPI_Status *status
LOCATION
parallel.c
EXAMPLE
Example:
A dedicated process is being used to perform an optimization algorithm
on the strings. Send a new string, s, to the process, while receiving an
optimized string, r, from it.
PGAContext *ctx;
MPI_Comm comm;
MPI_Status status;
int s, r;
:
PGASendReceiveIndividual(ctx, s, PGA_NEWPOP, 1, PGA_SR_STRINGTOMODIFY,
r, PGA_NEWPOP, 1, PGA_SR_MODIFIEDSTRING,
comm, &status);
05/01/95 PGASendReceiveIndividual(4)
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)
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)
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)
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)