@Test public void testGetCoefficients() { PolynomialFunction2D f = new PolynomialFunction2D(new double[] {1.0, 2.0}); double[] c = f.getCoefficients(); assertArrayEquals(new double[]{1.0, 2.0}, c, 0); c[0] = 99.9; assertArrayEquals(new double[]{1.0, 2.0}, f.getCoefficients(), 0); }
public double[] getCoefficients() { return this.coefficients.clone(); }
PolynomialFunction2D implements Function2D, Serializable { public double[] getCoefficients() { return this.coefficients.clone(); } }
PolynomialFunction2D implements Function2D, Serializable { public double[] getCoefficients() { return this.coefficients.clone(); } PolynomialFunction2D(double[] coefficients); }
PolynomialFunction2D implements Function2D, Serializable { public double[] getCoefficients() { return this.coefficients.clone(); } PolynomialFunction2D(double[] coefficients); double[] getCoefficients(); int getOrder(); @Override double getValue(double x); @Override boolean equals(Object obj); @Override int hashCode(); }
PolynomialFunction2D implements Function2D, Serializable { public double[] getCoefficients() { return this.coefficients.clone(); } PolynomialFunction2D(double[] coefficients); double[] getCoefficients(); int getOrder(); @Override double getValue(double x); @Override boolean equals(Object obj); @Override int hashCode();  }