Converts the genetic encoding in the Bits into a string representation based on GeneType. The AsString function extracts the gene's bits (using the Offset and Size properties to specify where) and then converts the bits into a string representation, e.g., for numeric types, you see the decimal representation of the number, for booleans, you see "True" or "False, and for enumerations, you see the correct string from the Enumerations property.
The Bits parameter should be at least of the correct size for this gene and all preceding genes in the Genes collection (e.g., its size should be at least Offset + Size bits). The overloaded
AsString function accepts an index of an individual in the Population and automatically extracts the RSGeneticAlgorithm.TRSGAIndividual.Bits chromosome property.
Namespace: RSGeneticAlgorithm
Delphi |
public |
Parameters
Bits
Type: TRSEncodedBits
Type: String
The following example prints out the gene representation for every individual in the population: Delphi |
var |