/** * Configure the maximum number of iterations. * @param newMaxIter maximum number of iterations * @return a new instance. */ public PolynomialCurveFitter withMaxIterations(int newMaxIter) { return new PolynomialCurveFitter(initialGuess, newMaxIter); }
/** * Creates a default curve fitter. * Zero will be used as initial guess for the coefficients, and the maximum * number of iterations of the optimization algorithm is set to * {@link Integer#MAX_VALUE}. * * @param degree Degree of the polynomial to be fitted. * @return a curve fitter. * * @see #withStartPoint(double[]) * @see #withMaxIterations(int) */ public static PolynomialCurveFitter create(int degree) { return new PolynomialCurveFitter(new double[degree + 1], Integer.MAX_VALUE); }
/** * Configure the start point (initial guess). * @param newStart new start point (initial guess) * @return a new instance. */ public PolynomialCurveFitter withStartPoint(double[] newStart) { return new PolynomialCurveFitter(newStart.clone(), maxIter); }
/** * Configure the maximum number of iterations. * @param newMaxIter maximum number of iterations * @return a new instance. */ public PolynomialCurveFitter withMaxIterations(int newMaxIter) { return new PolynomialCurveFitter(initialGuess, newMaxIter); }
/** * Configure the maximum number of iterations. * @param newMaxIter maximum number of iterations * @return a new instance. */ public PolynomialCurveFitter withMaxIterations(int newMaxIter) { return new PolynomialCurveFitter(initialGuess, newMaxIter); }
/** * Creates a default curve fitter. * Zero will be used as initial guess for the coefficients, and the maximum * number of iterations of the optimization algorithm is set to * {@link Integer#MAX_VALUE}. * * @param degree Degree of the polynomial to be fitted. * @return a curve fitter. * * @see #withStartPoint(double[]) * @see #withMaxIterations(int) */ public static PolynomialCurveFitter create(int degree) { return new PolynomialCurveFitter(new double[degree + 1], Integer.MAX_VALUE); }
/** * Creates a default curve fitter. * Zero will be used as initial guess for the coefficients, and the maximum * number of iterations of the optimization algorithm is set to * {@link Integer#MAX_VALUE}. * * @param degree Degree of the polynomial to be fitted. * @return a curve fitter. * * @see #withStartPoint(double[]) * @see #withMaxIterations(int) */ public static PolynomialCurveFitter create(int degree) { return new PolynomialCurveFitter(new double[degree + 1], Integer.MAX_VALUE); }
/** * Configure the start point (initial guess). * @param newStart new start point (initial guess) * @return a new instance. */ public PolynomialCurveFitter withStartPoint(double[] newStart) { return new PolynomialCurveFitter(Cloner.clone(newStart), maxIter); }
/** * Configure the start point (initial guess). * @param newStart new start point (initial guess) * @return a new instance. */ public PolynomialCurveFitter withStartPoint(double[] newStart) { return new PolynomialCurveFitter(newStart.clone(), maxIter); }