|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjenes.chromosome.BitwiseChromosome.BitCoding<T>
T
- The type entailed by enconding/deconding operations.public abstract static class BitwiseChromosome.BitCoding<T>
Represents the coding used by a BitwiseChromosome
. A BitCoding can be used by subclassing
this class and providing implementation for encode(Object)
and
decode(int)
methods. A BitwiseChromosome.BitSize
object is useful to specify the number of bits
to use foreach coded number.
Field Summary | |
---|---|
BitwiseChromosome.BitSize |
SIZE
The bit structure characteristics. |
Constructor Summary | |
---|---|
protected |
BitwiseChromosome.BitCoding(BitwiseChromosome.BitSize size)
Constructs a new BitCoding with the specified BitwiseChromosome.BitSize |
Method Summary | |
---|---|
abstract T |
decode(int bits)
Returns the value of coded bits. |
abstract int |
encode(T obj)
Returns the bits coding the object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final BitwiseChromosome.BitSize SIZE
Constructor Detail |
---|
protected BitwiseChromosome.BitCoding(BitwiseChromosome.BitSize size)
BitwiseChromosome.BitSize
size
- the bitSize object to useMethod Detail |
---|
public abstract T decode(int bits)
bits
- coding the object
public abstract int encode(T obj)
obj
- the object to be coded
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |