Package edu.jas.poly

Class Complex<C extends RingElem<C>>

java.lang.Object
edu.jas.poly.Complex<C>
Type Parameters:
C - base type of RingElem (for complex polynomials).
All Implemented Interfaces:
AbelianGroupElem<Complex<C>>, Element<Complex<C>>, GcdRingElem<Complex<C>>, MonoidElem<Complex<C>>, RingElem<Complex<C>>, StarRingElem<Complex<C>>, Serializable, Comparable<Complex<C>>

public class Complex<C extends RingElem<C>> extends Object implements StarRingElem<Complex<C>>, GcdRingElem<Complex<C>>
Generic Complex class implementing the RingElem interface. Objects of this class are immutable.
See Also:
  • Field Details

    • logger

      private static final org.apache.logging.log4j.Logger logger
    • debug

      private static final boolean debug
    • ring

      public final ComplexRing<C extends RingElem<C>> ring
      Complex class factory data structure.
    • re

      protected final C extends RingElem<C> re
      Real part of the data structure.
    • im

      protected final C extends RingElem<C> im
      Imaginary part of the data structure.
  • Constructor Details

    • Complex

      public Complex(ComplexRing<C> ring, C r, C i)
      The constructor creates a Complex object from two C objects as real and imaginary part.
      Parameters:
      ring - factory for Complex objects.
      r - real part.
      i - imaginary part.
    • Complex

      public Complex(ComplexRing<C> ring, C r)
      The constructor creates a Complex object from a C object as real part, the imaginary part is set to 0.
      Parameters:
      r - real part.
    • Complex

      public Complex(ComplexRing<C> ring, long r)
      The constructor creates a Complex object from a long element as real part, the imaginary part is set to 0.
      Parameters:
      r - real part.
    • Complex

      public Complex(ComplexRing<C> ring)
      The constructor creates a Complex object with real part 0 and imaginary part 0.
    • Complex

      public Complex(ComplexRing<C> ring, String s) throws NumberFormatException
      The constructor creates a Complex object from a String representation.
      Parameters:
      s - string of a Complex.
      Throws:
      NumberFormatException
  • Method Details