Documentation of 'jsci.maths.polynomials.PolynomialMath' Java class
PolynomialMath
jsci.maths.polynomials

Class PolynomialMath

    • Method Detail

      • toCompanionMatrix

        public static AbstractDoubleSquareMatrix toCompanionMatrix(RealPolynomial p)
        Returns the companion matrix of a given polynomial. The eigenvalues of the companion matrix are the roots of the polynomial.
        Parameters:
        p - the polynomial
        Returns:
        the companion matrix
      • findRoots

        public static Complex[] findRoots(RealPolynomial p)
        Calculates the roots of a given polynomial by solving the eigenvalue problem for the companion matrix. This is not yet implemented (depends on a QR- decomposition)
        Parameters:
        p - the polynomial
        Returns:
        (unordered) list of roots.
      • maxDegree

        public static int maxDegree(Polynomial p1,
                                    Polynomial p2)
        Get the maximum degree of two polynomials
        Parameters:
        p1 -
        p2 -
      • minDegree

        public static int minDegree(Polynomial p1,
                                    Polynomial p2)
        Get the minimal degree of two polynomials
        Parameters:
        p1 -
        p2 -
      • evalPolynomial

        public static double evalPolynomial(RealPolynomial p,
                                            double t)
        Evaluates a polynomial by Horner's scheme.
        Parameters:
        p -
        t -
      • interpolateLagrange

        public static RealPolynomial interpolateLagrange(double[][] samplingPoints)
        Interpolates a polynomial. Caveat: this method is brute-force, slow and not very stable. It shouldn't be used for more than approx. 10 points. Remember the strong variations of higher degree polynomials.
        Parameters:
        samplingPoints - an array[2][n] where array[0] denotes x-values, array[1] y-values
      • interpolateLagrange

        public static ComplexPolynomial interpolateLagrange(Complex[][] samplingPoints)
        Interpolates a polynomial. Caveat: this method is brute-force, slow and not very stable. It shouldn't be used for more than approx. 10 points. Remember the strong variations of higher degree polynomials.
        Parameters:
        samplingPoints - an array[2][n] where array[0] denotes x-values, array[1] y-values
      • normalize

        public static RealPolynomial normalize(RealPolynomial p)
        Normalizes a given real polynomial, i.e. divide by the leading coefficient.
        Parameters:
        p -
      • normalize

        public static ComplexPolynomial normalize(ComplexPolynomial p)
        Normalizes a given complex polynomial, i.e. divide by the leading coefficient.
        Parameters:
        p -

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.