Package org.apfloat.jscience
Class FixedPrecisionApcomplexField
java.lang.Object
java.lang.Number
org.jscience.mathematics.number.Number<FixedPrecisionApcomplexField>
org.apfloat.jscience.AbstractField<FixedPrecisionApcomplexField,Apcomplex>
org.apfloat.jscience.FixedPrecisionApcomplexField
- All Implemented Interfaces:
Serializable,Comparable<FixedPrecisionApcomplexField>,Immutable,Realtime,ValueType,XMLSerializable,Field<FixedPrecisionApcomplexField>,GroupAdditive<FixedPrecisionApcomplexField>,GroupMultiplicative<FixedPrecisionApcomplexField>,Ring<FixedPrecisionApcomplexField>,Structure<FixedPrecisionApcomplexField>
public class FixedPrecisionApcomplexField
extends AbstractField<FixedPrecisionApcomplexField,Apcomplex>
This class represents a fixed-precision complex number. The precision
is reset after each computation using the provided
FixedPrecisionApcomplexHelper.
This can help avoid accumulating round-off errors and loss of precision
in complicated computations such as matrix inversion.- Since:
- 1.8.0
- Version:
- 1.8.0
- Author:
- Mikko Tommila
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFixedPrecisionApcomplexField(Apcomplex value, FixedPrecisionApcomplexHelper helper) Constructs a new complex field object with the specified value and precision helper. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns a copy of this object.helper()Return the precision helper.inverse()Returns the multiplicative inverse of this object.opposite()Returns the additive inverse of this object.Returns the sum of this object with the one specified.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
-
FixedPrecisionApcomplexField
Constructs a new complex field object with the specified value and precision helper.- Parameters:
value- The value.helper- The precision helper.
-
-
Method Details
-
plus
Description copied from class:AbstractFieldReturns the sum of this object with the one specified.- Specified by:
plusin interfaceGroupAdditive<FixedPrecisionApcomplexField>- Specified by:
plusin classAbstractField<FixedPrecisionApcomplexField,Apcomplex> - Parameters:
that- The addend.- Returns:
this + that
-
opposite
Description copied from class:AbstractFieldReturns the additive inverse of this object.- Specified by:
oppositein interfaceGroupAdditive<FixedPrecisionApcomplexField>- Specified by:
oppositein classAbstractField<FixedPrecisionApcomplexField,Apcomplex> - Returns:
-this
-
times
Description copied from class:AbstractFieldReturns the product of this object with the one specified.- Specified by:
timesin interfaceGroupMultiplicative<FixedPrecisionApcomplexField>- Specified by:
timesin interfaceRing<FixedPrecisionApcomplexField>- Specified by:
timesin classAbstractField<FixedPrecisionApcomplexField,Apcomplex> - Parameters:
that- The multiplicand.- Returns:
this * that
-
inverse
Description copied from class:AbstractFieldReturns the multiplicative inverse of this object.- Specified by:
inversein interfaceGroupMultiplicative<FixedPrecisionApcomplexField>- Specified by:
inversein classAbstractField<FixedPrecisionApcomplexField,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<FixedPrecisionApcomplexField,Apcomplex> - Returns:
- A copy of this object.
-
helper
Return the precision helper.- Returns:
- The precision helper.
-