public class BitStringFactory extends AbstractCandidateFactory<org.uncommons.maths.binary.BitString>
BitString
Constructor and Description |
---|
BitStringFactory(int length) |
Modifier and Type | Method and Description |
---|---|
org.uncommons.maths.binary.BitString |
generateRandomCandidate(java.util.Random rng)
Generates a random bit string, with a uniform distribution of
ones and zeroes.
|
generateInitialPopulation, generateInitialPopulation
public BitStringFactory(int length)
length
- The length of all bit strings created by this
factory.public org.uncommons.maths.binary.BitString generateRandomCandidate(java.util.Random rng)
rng
- The source of randomness for setting the bits.