@Test public void testEquals() { assertTrue(valueOf(A, B, C).equals(valueOf(A, B, C))); assertFalse(valueOf(B, C, A).equals(valueOf(A, B, C))); assertFalse(valueOf(A, B).equals(valueOf(A, B, C))); assertTrue(valueOf(A, B).equals(valueOf(A, B, 0))); assertTrue(valueOf(0).equals(valueOf(0, 0, 0))); assertTrue(valueOf(0).equals(valueOf(EPS))); assertTrue(valueOf(EPS * 2).equals(valueOf(EPS * 2))); assertTrue(valueOf(666).equals(valueOf(666 + EPS))); }
@Override public boolean equals(final Object obj) { return obj instanceof Polynomial ? equals((Polynomial) obj, EPSILON) : false; }
Polynomial implements IReadDataBlock { @Override public boolean equals(final Object obj) { return obj instanceof Polynomial ? equals((Polynomial) obj, EPSILON) : false; } }
Polynomial implements IReadDataBlock { @Override public boolean equals(final Object obj) { return obj instanceof Polynomial ? equals((Polynomial) obj, EPSILON) : false; } private  Polynomial(final double[] coefficients, final int degree); }
Polynomial implements IReadDataBlock { @Override public boolean equals(final Object obj) { return obj instanceof Polynomial ? equals((Polynomial) obj, EPSILON) : false; } private  Polynomial(final double[] coefficients, final int degree); static Division divide(final Polynomial num, final Polynomial denom); @Override void copyTo(double[] buffer, int start); @Override int getLength(); @Override IReadDataBlock rextract(int start, int length); static Complex[] checkRoots(final Complex[] roots); static double getEpsilon(); static Polynomial of(double[] coefficients); static Polynomial copyOf(double[] coefficients); static Polynomial copyOf(double[] coefficients, int start, int end); static Polynomial valueOf(double firstCoefficient, double... nextCoefficients); static Polynomial fromComplexRoots(Complex[] roots); static Polynomial fromComplexRoots(final Complex[] roots, final double c); static Polynomial fromData(IReadDataBlock data); static Polynomial factor(double c, int n); static void setEpsilon(final double value); static IRootsSolver getDefRootsSearcher(); static void setDefRootsSearcher(final IRootsSolver value); Polynomial adjustDegree(); Polynomial derivate(); Polynomial divide(final double d); Polynomial divide(final Polynomial r); @Override boolean equals(final Object obj); boolean equals(Polynomial other, double epsilon); Complex evaluateAt(final Complex x); double evaluateAt(final double x); static double revaluate(final double[] c, final double x); static double evaluate(final double[] c, final double x); static double evaluate(final int degree, IntToDoubleFunction fn, final double x); Complex evaluateAtFrequency(final double w); @Override double get(final int idx); double[] getCoefficients(); int getDegree(); @Override int hashCode(); boolean isZero(); boolean isIdentity(); Polynomial minus(double d); Polynomial minus(final Polynomial r); Polynomial mirror(); Polynomial negate(); Polynomial plus(final double d); Polynomial plus(final Polynomial r); Complex[] roots(); Complex[] roots(IRootsSolver searcher); Polynomial smooth(); Polynomial times(final double d); Polynomial times(final Polynomial r); Polynomial times(final Polynomial r, boolean computeroots); @Override String toString(); String toString(final char var, final boolean bSmooth); String toString(final String fmt, final char var,
            final boolean bSmooth); }
Polynomial implements IReadDataBlock { @Override public boolean equals(final Object obj) { return obj instanceof Polynomial ? equals((Polynomial) obj, EPSILON) : false; } private  Polynomial(final double[] coefficients, final int degree); static Division divide(final Polynomial num, final Polynomial denom); @Override void copyTo(double[] buffer, int start); @Override int getLength(); @Override IReadDataBlock rextract(int start, int length); static Complex[] checkRoots(final Complex[] roots); static double getEpsilon(); static Polynomial of(double[] coefficients); static Polynomial copyOf(double[] coefficients); static Polynomial copyOf(double[] coefficients, int start, int end); static Polynomial valueOf(double firstCoefficient, double... nextCoefficients); static Polynomial fromComplexRoots(Complex[] roots); static Polynomial fromComplexRoots(final Complex[] roots, final double c); static Polynomial fromData(IReadDataBlock data); static Polynomial factor(double c, int n); static void setEpsilon(final double value); static IRootsSolver getDefRootsSearcher(); static void setDefRootsSearcher(final IRootsSolver value); Polynomial adjustDegree(); Polynomial derivate(); Polynomial divide(final double d); Polynomial divide(final Polynomial r); @Override boolean equals(final Object obj); boolean equals(Polynomial other, double epsilon); Complex evaluateAt(final Complex x); double evaluateAt(final double x); static double revaluate(final double[] c, final double x); static double evaluate(final double[] c, final double x); static double evaluate(final int degree, IntToDoubleFunction fn, final double x); Complex evaluateAtFrequency(final double w); @Override double get(final int idx); double[] getCoefficients(); int getDegree(); @Override int hashCode(); boolean isZero(); boolean isIdentity(); Polynomial minus(double d); Polynomial minus(final Polynomial r); Polynomial mirror(); Polynomial negate(); Polynomial plus(final double d); Polynomial plus(final Polynomial r); Complex[] roots(); Complex[] roots(IRootsSolver searcher); Polynomial smooth(); Polynomial times(final double d); Polynomial times(final Polynomial r); Polynomial times(final Polynomial r, boolean computeroots); @Override String toString(); String toString(final char var, final boolean bSmooth); String toString(final String fmt, final char var,
            final boolean bSmooth); static final Polynomial ZERO; static final Polynomial ONE; }