double max = cdfFunction[NUM_MAP_VALUES-1];
assert(max > 0.9 && max <1.01);
cdfFunction[NUM_MAP_VALUES-1] = 1.0;
Range xRange = new Range(0.0, 1.0);
FunctionInverter inverter = new FunctionInverter(cdfFunction);
functionMap = inverter.createInverseFunction(xRange);
redistributionFunction = new ArrayFunction(functionMap, cdfFunction);
}