Function PGABinaryHash

Function Documentation

PGAHash PGABinaryHash(PGAContext *ctx, int p, int pop)

Return hash value of given gene.

Description

Note that this function is set in PGASetUp() as the hash user function for the binary datatype by default.

Parameters
  • ctx – context variable

  • p – string index of the string to hash

  • pop – symbolic constant of the population string p is in

Returns

Hash value for string