Defines the RSEncodedBits.TRSEncodedBits class, which provides the ability to pack integers, strings, reals, etc into the smallest number of bits possible. This class is used by the Genetic Algorithm library to pack the encoding for each generation's attributes.
|
Name
|
Description
|
|
TRSEncodedBits
|
Extends the TBits class with methods for storing and retrieving simple types in the bits at any location.
Note
|
Floating point works with below 32 bits but the precision and range starts suffering drastically. Basically, the TRSEncodedBits class divides a floating point number into 1 bit Sign (PreserveSignBit = True), 1/4 Len Exponent, and 3/4 Len - 1 Mantissa. The class tries to fit the exponent into the +/-range of bits, e.g., if the exponent has 8 bits, the range of exponents can be -126 to 127. Exponent overflows can occur and are not flagged.
|
|
Top
|