Show/Hide Toolbars

RiverSoftAVG Products Help

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

TRSGAGene.SetGeneAsBoolean(TRSEncodedBits,Integer,Boolean) Method

Scroll Prev Top Next More

Writes the value into the Bits chromosome parameter. The function allows write access to the bits as boolean values. The equivalent    GeneAsBoolean method provides read access. The SetGeneAsBoolean function will translate boolean 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 using the correct size in the Bits chromosome using the    Size property but allows you to specify where in the bits the gene should be stored. The overloaded SetGeneAsBoolean method will also automatically use the    Offset property.
 

Namespace: RSGeneticAlgorithm

Parameters

Bits

Type: TRSEncodedBits

Offset

Type: Integer

Value

Type: Boolean

RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb