class BitSetGrayCodeBinaryRepresentation extends BitSetBinaryRepresentation {

    @Override
    protected void encodeBinaryGenome() {
        BitSet grayGenome = new BitSet(this.genomeLength);
        int index = 0; // index in all genome
        for (int variable = 0; variable < this.descriptor.numVariables; variable++){
            grayGenome.set(index, this.genome.get(index++)); // MSB bit of every variable is preserved
            for (int i = 1; i < this.descriptor.variablesLengths[variable]; i++){
                grayGenome.set(index, this.genome.get(index-1) ^ this.genome.get(index++));
            }
        }
        this.genome = grayGenome;
    }

    public  BitSetGrayCodeBinaryRepresentation(SimpleBinaryGenomeDescriptor descriptor);
    public  BitSetGrayCodeBinaryRepresentation(BitSetGrayCodeBinaryRepresentation second);

}