Class ColorPolynomial<C extends RingElem<C>>

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

    public class ColorPolynomial<C extends RingElem<C>>
    extends java.lang.Object
    implements java.io.Serializable
    Colored Polynomials with green, red and white coefficients. Not implementing RingElem. Note: not general purpose, use only in comprehensive GB.
    Author:
    Heinz Kredel
    See Also:
    Serialized Form
    • Method Detail

      • toString

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

        public boolean isZERO()
        Is this polynomial ZERO.
        Returns:
        true, if there are only green terms, else false.
      • isONE

        public boolean isONE()
        Is this polynomial ONE.
        Returns:
        true, if the only non green term is 1, else false.
      • equals

        public boolean equals​(java.lang.Object p)
        Is this polynomial equal to other.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        p - other polynomial.
        Returns:
        true, if this is equal to other, else false.
      • hashCode

        public int hashCode()
        Hash code for this colored polynomial.
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • isDetermined

        public boolean isDetermined()
        Is this polynomial determined.
        Returns:
        true, if there are nonzero red terms or if this == 0, else false.
      • checkInvariant

        public boolean checkInvariant()
        Check ordering invariants. TT(green) > LT(red) and TT(red) > LT(white).
        Returns:
        true, if all ordering invariants are met, else false.
      • length

        public int length()
        Length of red and white parts.
        Returns:
        length of essential parts.
      • sum

        public ColorPolynomial<Csum​(ColorPolynomial<C> S)
        ColorPolynomial summation. Note: green coefficients stay green, all others become white.
        Parameters:
        S - ColorPolynomial.
        Returns:
        this+S.
      • subtract

        public ColorPolynomial<Csubtract​(ColorPolynomial<C> S)
        ColorPolynomial subtraction. Note: green coefficients stay green, all others become white.
        Parameters:
        S - ColorPolynomial.
        Returns:
        this-S.