Package org.nevec.rjm

Class BigComplex


  • public class BigComplex
    extends java.lang.Object
    Complex numbers with BigDecimal real and imaginary components
    Since:
    2008-10-26
    Author:
    Richard J. Mathar
    • Constructor Summary

      Constructors 
      Constructor Description
      BigComplex()
      Default ctor equivalent to zero.
      BigComplex​(double x, double y)
      ctor with real and imaginary parts
      BigComplex​(java.math.BigDecimal x)
      ctor with real part.
      BigComplex​(java.math.BigDecimal x, java.math.BigDecimal y)
      ctor with real and imaginary parts
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String toString()
      Human-readable Fortran-type display
      java.lang.String toString​(java.math.MathContext mc)
      Human-readable Fortran-type display
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • BigComplex

        public BigComplex()
        Default ctor equivalent to zero.
      • BigComplex

        public BigComplex​(java.math.BigDecimal x,
                          java.math.BigDecimal y)
        ctor with real and imaginary parts
        Parameters:
        x - real part
        y - imaginary part
      • BigComplex

        public BigComplex​(java.math.BigDecimal x)
        ctor with real part.
        Parameters:
        x - real part. The imaginary part is set to zero.
      • BigComplex

        public BigComplex​(double x,
                          double y)
        ctor with real and imaginary parts
        Parameters:
        x - real part
        y - imaginary part
    • Method Detail

      • toString

        public java.lang.String toString()
        Human-readable Fortran-type display
        Overrides:
        toString in class java.lang.Object
        Returns:
        real and imaginary part in parenthesis, divided by a comma.
      • toString

        public java.lang.String toString​(java.math.MathContext mc)
        Human-readable Fortran-type display
        Returns:
        real and imaginary part in parenthesis, divided by a comma.