Show/Hide Toolbars

RiverSoftAVG Products Help

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

TRSGAGene.SetGeneAsInteger(TRSEncodedBits,Integer) Method

Scroll Prev Top Next More

Writes the value into the Bits chromosome parameter. The function allows write access to the bits as integer values. The equivalent    GeneAsInteger method provides read access. The SetGeneAsInteger function will translate integer values into the chromosome bits, irregardless of the type specified in    GeneType. In other words, the gene does not enforce types, it just helps you to translate bits into a type. You should use the GeneType property to determine the type of the gene before using the accessor functions.

Note: The TRSGAGene class automatically stores the appropriate value into the correct place in the Bits chromosome using the    Offset and    Size properties. The overloaded SetGeneAsInteger method allows you to change the offset into the bits you want to use.
 

Namespace: RSGeneticAlgorithm

Parameters

Bits

Type: TRSEncodedBits

Value

Type: Integer

RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb