Class ComplexNumber
java.lang.Object
ch.nolix.tech.math.bigdecimalmath.ComplexNumber
- All Implemented Interfaces:
IComplexNumber, Comparable<IComplexNumber>
A
ComplexNumber is not mutable.- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(IComplexNumber complexNumber) booleanintgetPower(int exponent) getProduct(double number) getProduct(IComplexNumber complexNumber) getProduct(BigDecimal number) getSum(double number) getSum(IComplexNumber complexNumber) getSum(BigDecimal number) inthashCode()booleanbooleantoString()withDecimalPlaceCount(int decimalPlaces) static ComplexNumberwithRealComponentAndImaginaryComponent(double realComponent, double imaginaryComponent) static ComplexNumberwithRealComponentAndImaginaryComponent(BigDecimal realComponent, BigDecimal imaginaryComponent) static ComplexNumberwithRealComponentAndImaginaryComponentAndDecimalPlaceCount(double realComponent, double imaginaryComponent, int decimalPlaceCount) static ComplexNumberwithRealComponentAndImaginaryComponentAndDecimalPlaceCount(BigDecimal realComponent, BigDecimal imaginaryComponent, int decimalPlaceCount)
-
Method Details
-
withRealComponentAndImaginaryComponent
public static ComplexNumber withRealComponentAndImaginaryComponent(BigDecimal realComponent, BigDecimal imaginaryComponent) -
withRealComponentAndImaginaryComponentAndDecimalPlaceCount
public static ComplexNumber withRealComponentAndImaginaryComponentAndDecimalPlaceCount(BigDecimal realComponent, BigDecimal imaginaryComponent, int decimalPlaceCount) -
withRealComponentAndImaginaryComponent
public static ComplexNumber withRealComponentAndImaginaryComponent(double realComponent, double imaginaryComponent) -
withRealComponentAndImaginaryComponentAndDecimalPlaceCount
public static ComplexNumber withRealComponentAndImaginaryComponentAndDecimalPlaceCount(double realComponent, double imaginaryComponent, int decimalPlaceCount) -
compareTo
- Specified by:
compareToin interfaceComparable<IComplexNumber>
-
equals
-
getConjugate
- Specified by:
getConjugatein interfaceIComplexNumber
-
getDecimalPlaceCount
public int getDecimalPlaceCount()- Specified by:
getDecimalPlaceCountin interfaceIComplexNumber
-
getImaginaryComponent
- Specified by:
getImaginaryComponentin interfaceIComplexNumber
-
getMagnitude
- Specified by:
getMagnitudein interfaceIComplexNumber
-
getPower
- Specified by:
getPowerin interfaceIComplexNumber
-
getPower2
- Specified by:
getPower2in interfaceIComplexNumber
-
getPower3
- Specified by:
getPower3in interfaceIComplexNumber
-
getPower4
- Specified by:
getPower4in interfaceIComplexNumber
-
getProduct
- Specified by:
getProductin interfaceIComplexNumber
-
getProduct
- Specified by:
getProductin interfaceIComplexNumber
-
getProduct
- Specified by:
getProductin interfaceIComplexNumber
-
getRealComponent
- Specified by:
getRealComponentin interfaceIComplexNumber
-
getSquaredMagnitude
- Specified by:
getSquaredMagnitudein interfaceIComplexNumber
-
getSum
- Specified by:
getSumin interfaceIComplexNumber
-
getSum
- Specified by:
getSumin interfaceIComplexNumber
-
getSum
- Specified by:
getSumin interfaceIComplexNumber
-
hashCode
-
isPureImaginary
public boolean isPureImaginary()- Specified by:
isPureImaginaryin interfaceIComplexNumber
-
isPureReal
public boolean isPureReal()- Specified by:
isPureRealin interfaceIComplexNumber
-
toString
-
withDecimalPlaceCount
- Specified by:
withDecimalPlaceCountin interfaceIComplexNumber
-