public class RealDecoder extends Decoder
chromosome, chromosomeNumber, geneLength, geneStart, transferList
Constructor and Description |
---|
RealDecoder()
Constructs the RealDecoder with a gene length of one and without limiting of real numbers.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isLimited()
Returns the status of limiting real numbers.
|
boolean |
readBit(int start)
Returns a bit obeying the limited flag.
|
int |
readInt(int start,
double min,
double max)
Returns the real-encoded integer obeying the limited flag.
|
double |
readReal(int start,
double min,
double max)
Returns the real-encoded double obeying the limited flag.
|
void |
setGeneLength(int geneLength)
Always keeps length at 1.
|
void |
setLimited(boolean limited)
Sets the limiting of real numbers.
|
clone, getChromosome, getChromosomeNumber, getGeneLength, getGeneStart, read, read, read, setChromosome, setChromosome, setChromosomeNumber, setGeneStart, toString
public RealDecoder()
public void setGeneLength(int geneLength)
setGeneLength
in class Decoder
geneLength
- the lengthpublic boolean isLimited()
public void setLimited(boolean limited)
limited
- limit real numbers to [min, max]public boolean readBit(int start)
public int readInt(int start, double min, double max)
public double readReal(int start, double min, double max)