/** * Maps input to positive values in the open interval (min, max) with * 0 going to the geometric mean. Near the geometric mean, values are * distributed roughly geometrically. * @param low The largest lower bound for output results. Must be >0. * @param high The least upper bound for output results. Must be >0. * @return A mapped value. */ public static Mapping logLimit(double low, double high) { Preconditions.checkArgument(low > 0, "Lower bound for log limit must be > 0 but was %f", low); Preconditions.checkArgument(high > 0, "Upper bound for log limit must be > 0 but was %f", high); return new LogLimit(low, high); }
private LogLimit(double low, double high) { wrapped = softLimit(Math.log(low), Math.log(high)); }
private LogLimit(double low, double high) { wrapped = softLimit(Math.log(low), Math.log(high)); }
private LogLimit(double low, double high) { wrapped = softLimit(Math.log(low), Math.log(high)); }
/** * Maps input to positive values in the open interval (min, max) with * 0 going to the geometric mean. Near the geometric mean, values are * distributed roughly geometrically. * @param low The largest lower bound for output results. Must be >0. * @param high The least upper bound for output results. Must be >0. * @return A mapped value. */ public static Mapping logLimit(double low, double high) { Preconditions.checkArgument(low > 0, "Lower bound for log limit must be > 0 but was %f", low); Preconditions.checkArgument(high > 0, "Upper bound for log limit must be > 0 but was %f", high); return new LogLimit(low, high); }
/** * Maps input to positive values in the open interval (min, max) with * 0 going to the geometric mean. Near the geometric mean, values are * distributed roughly geometrically. * @param low The largest lower bound for output results. Must be >0. * @param high The least upper bound for output results. Must be >0. * @return A mapped value. */ public static Mapping logLimit(double low, double high) { Preconditions.checkArgument(low > 0, "Lower bound for log limit must be > 0 but was %f", low); Preconditions.checkArgument(high > 0, "Upper bound for log limit must be > 0 but was %f", high); return new LogLimit(low, high); }