jenes.chromosome.codings
Class ByteCoding

java.lang.Object
  extended by jenes.chromosome.BitwiseChromosome.BitCoding<java.lang.Integer>
      extended by jenes.chromosome.codings.ByteCoding

public class ByteCoding
extends BitwiseChromosome.BitCoding<java.lang.Integer>

Represents a byte coding with 8 bits unsigned representation. The range representable by this coding is [0,255].

Since:
1.0
Version:
1.2
Author:
Luigi Troiano, Pierpaolo Lombardi, Giuseppe Pascale, Thierry Bodhuin
See Also:
GrayCoding, IntCoding, ShortCoding, WordCoding, BitwiseChromosome.BitSize, BooleanCoding

Field Summary
 
Fields inherited from class jenes.chromosome.BitwiseChromosome.BitCoding
SIZE
 
Constructor Summary
ByteCoding()
          Default constructor
 
Method Summary
 java.lang.Integer decode(int bits)
          Returns the value of coded bits
 int encode(java.lang.Integer value)
          Returns the bits coding the value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteCoding

public ByteCoding()
Default constructor

Method Detail

decode

public final java.lang.Integer decode(int bits)
Returns the value of coded bits

Specified by:
decode in class BitwiseChromosome.BitCoding<java.lang.Integer>
Parameters:
bits - coding the value
Returns:
the value

encode

public final int encode(java.lang.Integer value)
Returns the bits coding the value

Specified by:
encode in class BitwiseChromosome.BitCoding<java.lang.Integer>
Parameters:
value - the value to be coded
Returns:
the coding bits