Show/Hide Toolbars

RiverSoftAVG Products Help

Navigation: Code Documentation > GeneticAlgorithm > RSGeneticAlgorithm > Classes > TRSGAGene > Methods

TRSGAGene.AsString(TRSEncodedBits) Method

Scroll Prev Top Next More

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

Parameters

Bits

Type: TRSEncodedBits

Return Value

Type: String

RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb