/** * Returns a copy of the coefficients array. * <p> * Changes made to the returned copy will not affect the polynomial.</p> * <p> * Note that coefficients computation can be ill-conditioned. Use with caution * and only when it is necessary.</p> * * @return a fresh copy of the coefficients array */ public double[] getCoefficients() { if (!coefficientsComputed) { computeCoefficients(); } double[] out = new double[coefficients.length]; System.arraycopy(coefficients, 0, out, 0, coefficients.length); return out; }
/** * Returns a copy of the coefficients array. * <p> * Changes made to the returned copy will not affect the polynomial.</p> * <p> * Note that coefficients computation can be ill-conditioned. Use with caution * and only when it is necessary.</p> * * @return a fresh copy of the coefficients array */ public double[] getCoefficients() { if (!coefficientsComputed) { computeCoefficients(); } double[] out = new double[coefficients.length]; System.arraycopy(coefficients, 0, out, 0, coefficients.length); return out; }
/** * Returns a copy of the coefficients array. * <p> * Changes made to the returned copy will not affect the polynomial.</p> * <p> * Note that coefficients computation can be ill-conditioned. Use with caution * and only when it is necessary.</p> * * @return a fresh copy of the coefficients array */ public double[] getCoefficients() { if (!coefficientsComputed) { computeCoefficients(); } double[] out = new double[coefficients.length]; System.arraycopy(coefficients, 0, out, 0, coefficients.length); return out; }