SimpleBinaryRepresentation implements GenotypeRepresentation { public double[] getDoubleValue() { double[] intValues = this.binaryToInteger(); double[] doubleValues = new double[this.descriptor.getNumVariables()]; for (int i = 0; i < doubleValues.length; i++){ doubleValues[i] = this.descriptor.getVariablesLowerBounds()[i] + intValues[i] * this.descriptor.getVariablesPrecisions()[i]; } return doubleValues; } SimpleBinaryRepresentation(SimpleBinaryGenomeDescriptor descriptor);  SimpleBinaryRepresentation(SimpleBinaryRepresentation second); int getTotalLength(); int[] getValueLengths(); boolean getGeneAt(int idx); void setGeneAt(int idx, boolean value); void invertGeneAt(int idx); void swapGenes(GenotypeRepresentation secondRepresentation, int[] positions); void swapGenes(GenotypeRepresentation secondRepresentation, int from, int to); void receiveGenes(GenotypeRepresentation secondRepresentation, int[] positions); void receiveGenes(GenotypeRepresentation secondRepresentation, int from, int to); void andGenes(GenotypeRepresentation secondRepresentation, int[] positions); void andGenes(GenotypeRepresentation secondRepresentation, int from, int to); void orGenes(GenotypeRepresentation secondRepresentation, int[] positions); void orGenes(GenotypeRepresentation secondRepresentation, int from, int to); void xorGenes(GenotypeRepresentation secondRepresentation, int[] positions); void xorGenes(GenotypeRepresentation secondRepresentation, int from, int to); double[] getDoubleValue(); void setDoubleValue(double[] phenotypeValue); Representation copy();  }
@Test public void testGetDoubleValue1(){ this.representation.genome = new boolean[]{ false, true, false, true, true, true, true, false, true, true, true, true, true, true, true, true, true, false, true, false, false }; double[] expected = new double[]{13.0, 1.0, 1851.75+10e10, 123456.5}; double[] result = this.representation.getDoubleValue(); assertEquals(expected.length, result.length); Assert.assertArrayEquals(expected, result, 0.0); }