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

Class RealPolynomial

    • Constructor Detail

      • RealPolynomial

        public RealPolynomial(double[] coeff)
        Creates a new instance of RealPolynomial
      • RealPolynomial

        public RealPolynomial(Field.Member[] f)
        Creates a new RealPolynomial object.
        Parameters:
        f -
    • Method Detail

      • getCoefficient

        public Field.Member getCoefficient(int k)
        Get the coefficient of degree k, i.e. a_k if P(x) := sum_{k=0}^n a_k x^k
        Specified by:
        getCoefficient in interface Polynomial
        Parameters:
        k - degree
        Returns:
        coefficient as described above
      • getCoefficientAsDouble

        public double getCoefficientAsDouble(int k)
        Get the coefficient of degree k, i.e. a_k if P(x) := sum_{k=0}^n a_k x^k as a real number
        Parameters:
        k - degree
        Returns:
        coefficient as described above
      • getCoefficients

        public Field.Member[] getCoefficients()
        Get the coefficients as an array
        Specified by:
        getCoefficients in interface Polynomial
        Returns:
        the coefficients as an array
      • getCoefficientsAsDoubles

        public double[] getCoefficientsAsDoubles()
        Get the coefficients as an array of doubles
        Returns:
        the coefficients as an array
      • map

        public double map(double x)
        Evaluates this polynomial.
        Specified by:
        map in interface Mapping
      • degree

        public int degree()
        The degree
        Specified by:
        degree in interface Polynomial
        Returns:
        the degree
      • isZero

        public boolean isZero()
        Returns true if this polynomial is equal to zero. All coefficients are tested for |a_k| < GlobalSettings.ZERO_TOL.
        Returns:
        true if all coefficients < GlobalSettings.ZERO_TOL
      • isOne

        public boolean isOne()
        Returns true if this polynomial is equal to one. It is tested, whether |a_0 - 1| <= GlobalSettings.ZERO_TOL and the remaining coefficients are |a_k| < GlobalSettings.ZERO_TOL.
        Returns:
        true if this is equal to one.
      • add

        public RealFunction add(RealFunction g)
        The group composition law. Returns a new polynom with grade = max( this.grade, g.grade)
        Overrides:
        add in class RealFunction
        Parameters:
        g - a group member
      • differentiate

        public RealFunction differentiate()
        Differentiate the real polynomial. Only useful iff the polynomial is built over a Banach space and an appropriate multiplication law is provided.
        Specified by:
        differentiate in class RealFunction
        Returns:
        a new polynomial with degree = max(this.degree-1 , 0)
      • scalarDivide

        public Polynomial scalarDivide(Field.Member f)
        return a new real Polynomial with coefficients divided by f
        Specified by:
        scalarDivide in interface Polynomial
        Parameters:
        f - divisor
        Returns:
        new Polynomial with coefficients /= f
      • scalarDivide

        public RealPolynomial scalarDivide(double a)
        return a new real Polynomial with coefficients divided by a
        Parameters:
        a - divisor
        Returns:
        new Polynomial with coefficients /= a
      • equals

        public boolean equals(java.lang.Object o)
        Returns true if this polynomial is equal to another.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - the other polynomial
        Returns:
        true if so
      • hashCode

        public int hashCode()
        Some kind of hashcode... (Since I have an equals)
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        a hashcode
      • integrate

        public RealPolynomial integrate()
        "inverse" operation for differentiate
        Returns:
        the integrated polynomial
      • scalarMultiply

        public Polynomial scalarMultiply(Field.Member f)
        Returns the multiplication of this polynomial by a scalar
        Specified by:
        scalarMultiply in interface Polynomial
        Parameters:
        f -
        Returns:
        new Polynomial with coefficients *= a
      • scalarMultiply

        public RealPolynomial scalarMultiply(double a)
        Returns the multiplication of this polynomial by a scalar
        Parameters:
        a - factor
        Returns:
        new Polynomial with coefficients *= a
      • multiply

        public RealFunction multiply(RealFunction r)
        The multiplication law. Multiplies this Polynomial with another
        Overrides:
        multiply in class RealFunction
        Parameters:
        r - a polynomial
        Returns:
        a new Polynomial with grade = max( this.grade, r.grade) + min( this.grade, r.grade)
      • toString

        public java.lang.String toString()
        String representation P(x) = a_k x^k +...
        Overrides:
        toString in class java.lang.Object
        Returns:
        String

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.