/** * Configure the maximum number of iterations. * @param newMaxIter maximum number of iterations * @return a new instance. */ public SimpleCurveFitter withMaxIterations(int newMaxIter) { return new SimpleCurveFitter(function, initialGuess, newMaxIter); }
/** * Creates a curve fitter. * The maximum number of iterations of the optimization algorithm is set * to {@link Integer#MAX_VALUE}. * * @param f Function to fit. * @param start Initial guess for the parameters. Cannot be {@code null}. * Its length must be consistent with the number of parameters of the * function to fit. * @return a curve fitter. * * @see #withStartPoint(double[]) * @see #withMaxIterations(int) */ public static SimpleCurveFitter create(ParametricUnivariateFunction f, double[] start) { return new SimpleCurveFitter(f, start, Integer.MAX_VALUE); }
/** * Configure the start point (initial guess). * @param newStart new start point (initial guess) * @return a new instance. */ public SimpleCurveFitter withStartPoint(double[] newStart) { return new SimpleCurveFitter(function, newStart.clone(), maxIter); }
/** * Configure the maximum number of iterations. * @param newMaxIter maximum number of iterations * @return a new instance. */ public SimpleCurveFitter withMaxIterations(int newMaxIter) { return new SimpleCurveFitter(function, initialGuess, newMaxIter); }
/** * Configure the maximum number of iterations. * @param newMaxIter maximum number of iterations * @return a new instance. */ public SimpleCurveFitter withMaxIterations(int newMaxIter) { return new SimpleCurveFitter(function, initialGuess, newMaxIter); }
/** * Creates a curve fitter. * The maximum number of iterations of the optimization algorithm is set * to {@link Integer#MAX_VALUE}. * * @param f Function to fit. * @param start Initial guess for the parameters. Cannot be {@code null}. * Its length must be consistent with the number of parameters of the * function to fit. * @return a curve fitter. * * @see #withStartPoint(double[]) * @see #withMaxIterations(int) */ public static SimpleCurveFitter create(ParametricUnivariateFunction f, double[] start) { return new SimpleCurveFitter(f, start, Integer.MAX_VALUE); }
/** * Creates a curve fitter. * The maximum number of iterations of the optimization algorithm is set * to {@link Integer#MAX_VALUE}. * * @param f Function to fit. * @param start Initial guess for the parameters. Cannot be {@code null}. * Its length must be consistent with the number of parameters of the * function to fit. * @return a curve fitter. * * @see #withStartPoint(double[]) * @see #withMaxIterations(int) */ public static SimpleCurveFitter create(ParametricUnivariateFunction f, double[] start) { return new SimpleCurveFitter(f, start, Integer.MAX_VALUE); }
/** * Configure the start point (initial guess). * @param newStart new start point (initial guess) * @return a new instance. */ public SimpleCurveFitter withStartPoint(double[] newStart) { return new SimpleCurveFitter(function, Cloner.clone(newStart), maxIter); }
/** * Configure the start point (initial guess). * @param newStart new start point (initial guess) * @return a new instance. */ public SimpleCurveFitter withStartPoint(double[] newStart) { return new SimpleCurveFitter(function, newStart.clone(), maxIter); }