### Question:
InterpolationMeasure { public InterpolationMeasure scale(double z) { return new InterpolationMeasure(sampleSize, measure.scale(z), distances.scale(z), probMass.scale(z)); } InterpolationMeasure(int dimensions, int sampleSize);  InterpolationMeasure(InterpolationMeasure base); private  InterpolationMeasure(int sampleSize, DiVector measure, DiVector distances, DiVector probMass); static InterpolationMeasure addToLeft(InterpolationMeasure left, InterpolationMeasure right); static Collector<InterpolationMeasure, InterpolationMeasure, InterpolationMeasure> collector(int dimensions,
            int sampleSize, int numberOfTrees); int getDimensions(); int getSampleSize(); InterpolationMeasure scale(double z); final DiVector measure; final DiVector distances; final DiVector probMass; }### Answer:
@Test public void testScale() { InterpolationMeasure copy = new InterpolationMeasure(dimensions, sampleSize); for (int i = 0; i < dimensions; i++) { output.probMass.high[i] = copy.probMass.high[i] = 2 * i; output.distances.high[i] = copy.distances.high[i] = 4 * i; output.measure.high[i] = copy.measure.high[i] = 6 * i; output.probMass.low[i] = copy.probMass.low[i] = 2 * i + 1; output.distances.low[i] = copy.distances.low[i] = 4 * i + 2; output.measure.low[i] = copy.measure.low[i] = 6 * i + 3; } assertArrayEquals(copy.probMass.high, output.probMass.high); assertArrayEquals(copy.distances.high, output.distances.high); assertArrayEquals(copy.measure.high, output.measure.high); assertArrayEquals(copy.probMass.low, output.probMass.low); assertArrayEquals(copy.distances.low, output.distances.low); assertArrayEquals(copy.measure.low, output.measure.low); InterpolationMeasure result = output.scale(0.9); assertArrayEquals(copy.probMass.low, output.probMass.low); assertArrayEquals(copy.distances.low, output.distances.low); assertArrayEquals(copy.measure.low, output.measure.low); assertArrayEquals(copy.probMass.high, output.probMass.high); assertArrayEquals(copy.distances.high, output.distances.high); assertArrayEquals(copy.measure.high, output.measure.high); for (int i = 0; i < dimensions; i++) { assertEquals(2 * i * 0.9, result.probMass.high[i]); assertEquals(4 * i * 0.9, result.distances.high[i]); assertEquals(6 * i * 0.9, result.measure.high[i]); assertEquals((2 * i + 1) * 0.9, result.probMass.low[i]); assertEquals((4 * i + 2) * 0.9, result.distances.low[i]); assertEquals((6 * i + 3) * 0.9, result.measure.low[i]); } }