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

    • Constructor Detail

      • RealAlgebraicRing

        public RealAlgebraicRing​(IdealWithUniv<C> m,
                                 ResidueRing<C> a,
                                 RealRootTuple<C> r)
        The constructor creates a RealAlgebraicNumber factory object from a IdealWithUniv, ResidueRing and a root tuple.
        Parameters:
        m - module IdealWithUniv<C>.
        a - module ResidueRing<C>.
        r - isolating rectangle for a complex root.
      • RealAlgebraicRing

        public RealAlgebraicRing​(IdealWithUniv<C> m,
                                 RealRootTuple<C> root)
        The constructor creates a RealAlgebraicNumber factory object from a IdealWithUniv and a root tuple.
        Parameters:
        m - module IdealWithUniv<C>.
        root - isolating rectangle for a complex root.
      • RealAlgebraicRing

        public RealAlgebraicRing​(IdealWithUniv<C> m,
                                 RealRootTuple<C> root,
                                 boolean isField)
        The constructor creates a RealAlgebraicNumber factory object from a IdealWithUniv and a root tuple.
        Parameters:
        m - module IdealWithUniv<C>.
        root - isolating rectangle for a complex root.
        isField - indicator if m is maximal.
    • Method Detail

      • setRoot

        public void setRoot​(RealRootTuple<C> v)
        Set a refined rectangle for the complex root. Note: rectangle may shrink eventually.
        Parameters:
        v - rectangle.
      • getRoot

        public RealRootTuple<C> getRoot()
        Get rectangle for the complex root.
        Returns:
        v rectangle.
      • getEps

        public BigRational getEps()
        Get epsilon.
        Returns:
        epsilon.
      • setEps

        public void setEps​(C e)
        Set a new epsilon.
        Parameters:
        e - epsilon.
      • setEps

        public void setEps​(BigRational e)
        Set a new epsilon.
        Parameters:
        e - epsilon.
      • refineRoot

        public void refineRoot​(BigRational e)
        Refine root.
        Parameters:
        e - epsilon.
      • isField

        public boolean isField()
        Query if this ring is a field.
        Specified by:
        isField in interface RingFactory<C extends GcdRingElem<C> & Rational>
        Returns:
        true if algebraic is prime, else false.
      • setField

        public void setField​(boolean isField)
        Assert that this ring is a field.
        Parameters:
        isField - true if this ring is a field, else false.
      • toString

        public java.lang.String toString()
        Get the String representation as RingFactory.
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • 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 RealAlgebraicNumber.
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • random

        public RealAlgebraicNumber<C> random​(int n,
                                             java.util.Random rnd)
        RealAlgebraicNumber random.
        Specified by:
        random in interface ElemFactory<C extends GcdRingElem<C> & Rational>
        Parameters:
        n - such that 0 ≤ v ≤ (2n-1).
        rnd - is a source for random bits.
        Returns:
        a random integer mod modul.