/** * Returns a transformed parameter. * @param i The parameter to return. * @return The value of the parameter. */ public double get(int i) { Mapping m = maps[i]; return m == null ? params[i] : m.apply(params[i]); }
/** * Maps results to positive values. * @return A positive value. */ public static Mapping exponential() { return exponential(1); }
/** * Maps input to the open interval (min, max) with 0 going to the mean of min and * max. When scale is large, a larger proportion of values are mapped to points * near the boundaries. * @see #softLimit(double, double, double) * @param min The largest lower bound on values to be returned. * @param max The least upper bound on values to be returned. * @return A mapping that satisfies the desired constraint. */ public static Mapping softLimit(double min, double max) { return softLimit(min, max, 1); }
/** * Returns a transformed parameter. * @param i The parameter to return. * @return The value of the parameter. */ public double get(int i) { Mapping m = maps[i]; return m == null ? params[i] : m.apply(params[i]); }
/** * Maps input to the open interval (min, max) with 0 going to the mean of min and * max. When scale is large, a larger proportion of values are mapped to points * near the boundaries. * @see #softLimit(double, double, double) * @param min The largest lower bound on values to be returned. * @param max The least upper bound on values to be returned. * @return A mapping that satisfies the desired constraint. */ public static Mapping softLimit(double min, double max) { return softLimit(min, max, 1); }
/** * Maps results to positive values. * @return A positive value. */ public static Mapping exponential() { return exponential(1); }
/** * Returns a transformed parameter. * @param i The parameter to return. * @return The value of the parameter. */ public double get(int i) { Mapping m = maps[i]; return m == null ? params[i] : m.apply(params[i]); }
/** * Maps input to the open interval (min, max) with 0 going to the mean of min and * max. When scale is large, a larger proportion of values are mapped to points * near the boundaries. * @see #softLimit(double, double, double) * @param min The largest lower bound on values to be returned. * @param max The least upper bound on values to be returned. * @return A mapping that satisfies the desired constraint. */ public static Mapping softLimit(double min, double max) { return softLimit(min, max, 1); }
/** * Maps results to positive values. * @return A positive value. */ public static Mapping exponential() { return exponential(1); }
@Override public double apply(double v) { return Math.exp(wrapped.apply(v)); }
@Override public double apply(double v) { return Math.exp(wrapped.apply(v)); }
@Override public double apply(double v) { return Math.exp(wrapped.apply(v)); }