Hide Comments
Hide Comments

Comments (0)

expandingMethods

 

Name

Description

public method

Clear

Resets all bits to 0

public method

CrossOver(TRSGABits,TRSGABits)

Overloaded. Modifies the bits of the current object by mixing the bits of the two Source bits, or Parents. The method randomly selects a crossover point and then copies bits from Source1 from the first bit to the crossover bit and then copies bits from Source2 from the crossover bit to the last bit. Thus, the current bits object becomes the child of the two parent bits.

public method

CrossOver(TRSGABits,TRSGABits,Integer)

Overloaded. Modifies the bits of the current object by mixing the bits of the two Source bits, or Parents. The method uses the CrossBit crossover point to copy bits from Source1 from the first bit to the crossover bit and then copy bits from Source2 from the crossover bit to the last bit. Thus, the current bits object becomes the child of the two parent bits.

public method

Invert(Integer,Integer)

Flips the bits in range of bits specified from Offset to Offset + Len. If Offset or Len are -1, the method selects a random number within the range of bits in the object.

public method

Mutate(TGAProbability)

Randomly mutates the bits in the object. The method steps through all of the bits of the object. For each bit, the Mutate method has a chance (based on the MutationProbability) to flip the bit, e.g., from True to False, or from False to True. If any bits are mutated, the method returns True.

public method

Randomize

Randomizes the bits of the class, e.g., it arbitrarily sets bits to True or False.

public method

ToString

Returns a string representation (0s and 1s) of the bits in the object

Top

Comments (0)