/** * This method simply calls {@link #bracket(UnivariateFunction, double, double, double, * double, double, int) bracket(function, initial, lowerBound, upperBound, q, r, maximumIterations)} * with {@code q} and {@code r} set to 1.0. * @param function Function. * @param initial Initial midpoint of interval being expanded to * bracket a root. * @param lowerBound Lower bound (a is never lower than this value). * @param upperBound Upper bound (b never is greater than this * value). * @param maximumIterations Maximum number of iterations to perform * @return a two element array holding a and b. * @throws NoBracketingException if the algorithm fails to find a and b * satisfying the desired conditions. * @throws NotStrictlyPositiveException if {@code maximumIterations <= 0}. * @throws NullArgumentException if {@code function} is {@code null}. */ public static double[] bracket(UnivariateFunction function, double initial, double lowerBound, double upperBound, int maximumIterations) throws NullArgumentException, NotStrictlyPositiveException, NoBracketingException { return bracket(function, initial, lowerBound, upperBound, 1.0, 1.0, maximumIterations); }
NotStrictlyPositiveException, NoBracketingException { return bracket(function, initial, lowerBound, upperBound, 1.0, 1.0, Integer.MAX_VALUE);
/** * This method simply calls {@link #bracket(UnivariateFunction, double, double, double, * double, double, int) bracket(function, initial, lowerBound, upperBound, q, r, maximumIterations)} * with {@code q} and {@code r} set to 1.0. * @param function Function. * @param initial Initial midpoint of interval being expanded to * bracket a root. * @param lowerBound Lower bound (a is never lower than this value). * @param upperBound Upper bound (b never is greater than this * value). * @param maximumIterations Maximum number of iterations to perform * @return a two element array holding a and b. * @throws NoBracketingException if the algorithm fails to find a and b * satisfying the desired conditions. * @throws NotStrictlyPositiveException if {@code maximumIterations <= 0}. * @throws NullArgumentException if {@code function} is {@code null}. */ public static double[] bracket(UnivariateFunction function, double initial, double lowerBound, double upperBound, int maximumIterations) throws NullArgumentException, NotStrictlyPositiveException, NoBracketingException { return bracket(function, initial, lowerBound, upperBound, 1.0, 1.0, maximumIterations); }
NotStrictlyPositiveException, NoBracketingException { return bracket(function, initial, lowerBound, upperBound, 1.0, 1.0, Integer.MAX_VALUE);
/** * This method simply calls {@link #bracket(UnivariateFunction, double, double, double, * double, double, int) bracket(function, initial, lowerBound, upperBound, q, r, maximumIterations)} * with {@code q} and {@code r} set to 1.0. * @param function Function. * @param initial Initial midpoint of interval being expanded to * bracket a root. * @param lowerBound Lower bound (a is never lower than this value). * @param upperBound Upper bound (b never is greater than this * value). * @param maximumIterations Maximum number of iterations to perform * @return a two element array holding a and b. * @throws NoBracketingException if the algorithm fails to find a and b * satisfying the desired conditions. * @throws NotStrictlyPositiveException if {@code maximumIterations <= 0}. * @throws NullArgumentException if {@code function} is {@code null}. */ public static double[] bracket(UnivariateFunction function, double initial, double lowerBound, double upperBound, int maximumIterations) throws NullArgumentException, NotStrictlyPositiveException, NoBracketingException { return bracket(function, initial, lowerBound, upperBound, 1.0, 1.0, maximumIterations); }
NotStrictlyPositiveException, NoBracketingException { return bracket(function, initial, lowerBound, upperBound, 1.0, 1.0, Integer.MAX_VALUE);