public class IntDecoder extends Decoder
chromosome, chromosomeNumber, geneLength, geneStart, transferList
Constructor and Description |
---|
IntDecoder()
Constructs the IntDecoder with a gene length of one.
|
Modifier and Type | Method and Description |
---|---|
boolean |
readBit(int start)
Decode a bit of the chromosome.
|
int |
readInt(int start,
double min,
double max)
Decodes an integer from the IntChromosome.
|
double |
readReal(int start,
double min,
double max)
Decodes a real from an IntChromosome by simply using readInt().
|
void |
setGeneLength(int geneLength)
Always keeps length at 1.
|
clone, getChromosome, getChromosomeNumber, getGeneLength, getGeneStart, read, read, read, setChromosome, setChromosome, setChromosomeNumber, setGeneStart, toString
public IntDecoder()
public void setGeneLength(int geneLength)
setGeneLength
in class Decoder
geneLength
- the lengthpublic boolean readBit(int start)
public int readInt(int start, double min, double max)