Package edu.jas.root

Class DecimalRoots<C extends GcdRingElem<C> & Rational>

  • Type Parameters:
    C - coefficient type.
    All Implemented Interfaces:
    java.io.Serializable

    public class DecimalRoots<C extends GcdRingElem<C> & Rational>
    extends java.lang.Object
    implements java.io.Serializable
    Container for the real and complex algebraic roots of a univariate polynomial.
    See Also:
    Serialized Form
    • Constructor Detail

      • DecimalRoots

        public DecimalRoots​(GenPolynomial<C> p,
                            GenPolynomial<Complex<C>> cp,
                            java.util.List<BigDecimal> r,
                            java.util.List<Complex<BigDecimal>> c)
        Constructor.
        Parameters:
        p - univariate polynomial
        cp - univariate complex polynomial
        r - list of real decimal roots
        c - list of complex decimal roots
    • Method Detail

      • toString

        public java.lang.String toString()
        String representation of AlgebraicRoots.
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • toScript

        public java.lang.String toScript()
        Get a scripting compatible string representation.
        Returns:
        script compatible representation for this Interval.
      • copy

        public DecimalRoots<C> copy()
        Copy this.
        Returns:
        a copy of this.
      • equals

        public boolean equals​(java.lang.Object b)
        Comparison with any other object.
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • hashCode

        public int hashCode()
        Hash code for this AlgebraicRoots.
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()