public class ShortCoding extends BitwiseChromosome.BitCoding<java.lang.Integer>
ByteCoding
,
IntCoding
,
GrayCoding
,
WordCoding
,
BitwiseChromosome.BitSize
,
BooleanCoding
Modifier and Type | Class and Description |
---|---|
static class |
ShortCoding.Mode
The integer coding representations
|
SIZE
Constructor and Description |
---|
ShortCoding()
Default constructor.
|
ShortCoding(ShortCoding.Mode mode)
Creates a ShortCoding with the specified mode, that is the number representation scheme.
|
public ShortCoding()
public ShortCoding(ShortCoding.Mode mode)
mode
- can be two's complement or module and sign.public final java.lang.Integer decode(int bits)
decode
in class BitwiseChromosome.BitCoding<java.lang.Integer>
bits
- coding the valuepublic final int encode(java.lang.Integer value)
encode
in class BitwiseChromosome.BitCoding<java.lang.Integer>
value
- the value to be coded