Package org.apfloat.jscience
Class ApcomplexField
- All Implemented Interfaces:
Serializable,Comparable<ApcomplexField>,Immutable,Realtime,ValueType,XMLSerializable,Field<ApcomplexField>,GroupAdditive<ApcomplexField>,GroupMultiplicative<ApcomplexField>,Ring<ApcomplexField>,Structure<ApcomplexField>
This class represents an arbitrary precision complex number.
The precision of each calculation is determined separately, which means
that loss of precision can easily accumulate in complicated calculations
(e.g. matrix inversion). If this should be avoided, and a fixed precision is
required, then it may be better to use FixedPrecisionApcomplexField
instead.
- Since:
- 1.8.0
- Version:
- 1.8.0
- Author:
- Mikko Tommila
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionApcomplexField(Apcomplex value) Constructs a new complex field object with the specified value. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns a copy of this object.inverse()Returns the multiplicative inverse of this object.opposite()Returns the additive inverse of this object.plus(ApcomplexField that) Returns the sum of this object with the one specified.times(ApcomplexField that) Returns the product of this object with the one specified.Methods inherited from class org.apfloat.jscience.AbstractField
compareTo, doubleValue, equals, hashCode, isLargerThan, longValue, toText, valueMethods inherited from class org.jscience.mathematics.number.Number
byteValue, floatValue, intValue, isGreaterThan, isLessThan, minus, pow, shortValue, toString
-
Constructor Details
-
ApcomplexField
Constructs a new complex field object with the specified value.- Parameters:
value- The value.
-
-
Method Details
-
plus
Description copied from class:AbstractFieldReturns the sum of this object with the one specified.- Specified by:
plusin interfaceGroupAdditive<ApcomplexField>- Specified by:
plusin classAbstractField<ApcomplexField,Apcomplex> - Parameters:
that- The addend.- Returns:
this + that
-
opposite
Description copied from class:AbstractFieldReturns the additive inverse of this object.- Specified by:
oppositein interfaceGroupAdditive<ApcomplexField>- Specified by:
oppositein classAbstractField<ApcomplexField,Apcomplex> - Returns:
-this
-
times
Description copied from class:AbstractFieldReturns the product of this object with the one specified.- Specified by:
timesin interfaceGroupMultiplicative<ApcomplexField>- Specified by:
timesin interfaceRing<ApcomplexField>- Specified by:
timesin classAbstractField<ApcomplexField,Apcomplex> - Parameters:
that- The multiplicand.- Returns:
this * that
-
inverse
Description copied from class:AbstractFieldReturns the multiplicative inverse of this object.- Specified by:
inversein interfaceGroupMultiplicative<ApcomplexField>- Specified by:
inversein classAbstractField<ApcomplexField,Apcomplex> - Returns:
1 / this- Throws:
ArithmeticException- If the divisor is zero.
-
copy
Description copied from class:AbstractFieldReturns a copy of this object.- Specified by:
copyin interfaceValueType- Specified by:
copyin classAbstractField<ApcomplexField,Apcomplex> - Returns:
- A copy of this object.
-