Package org.apfloat.jscience
Class FixedPrecisionApcomplexField
- java.lang.Object
-
- java.lang.Number
-
- org.jscience.mathematics.number.Number<T>
-
- org.apfloat.jscience.AbstractField<FixedPrecisionApcomplexField,org.apfloat.Apcomplex>
-
- org.apfloat.jscience.FixedPrecisionApcomplexField
-
- All Implemented Interfaces:
Serializable,Comparable<FixedPrecisionApcomplexField>,javolution.lang.Immutable,javolution.lang.Realtime,javolution.lang.ValueType,javolution.xml.XMLSerializable,org.jscience.mathematics.structure.Field<FixedPrecisionApcomplexField>,org.jscience.mathematics.structure.GroupAdditive<FixedPrecisionApcomplexField>,org.jscience.mathematics.structure.GroupMultiplicative<FixedPrecisionApcomplexField>,org.jscience.mathematics.structure.Ring<FixedPrecisionApcomplexField>,org.jscience.mathematics.structure.Structure<FixedPrecisionApcomplexField>
public class FixedPrecisionApcomplexField extends AbstractField<FixedPrecisionApcomplexField,org.apfloat.Apcomplex>
This class represents a fixed-precision complex number. The precision is reset after each computation using the providedFixedPrecisionApcomplexHelper. 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FixedPrecisionApcomplexField(org.apfloat.Apcomplex value, org.apfloat.FixedPrecisionApcomplexHelper helper)Constructs a new complex field object with the specified value and precision helper.
-
Method Summary
Modifier and Type Method Description FixedPrecisionApcomplexFieldcopy()Returns a copy of this object.org.apfloat.FixedPrecisionApcomplexHelperhelper()Return the precision helper.FixedPrecisionApcomplexFieldinverse()Returns the multiplicative inverse of this object.FixedPrecisionApcomplexFieldopposite()Returns the additive inverse of this object.FixedPrecisionApcomplexFieldplus(FixedPrecisionApcomplexField that)Returns the sum of this object with the one specified.FixedPrecisionApcomplexFieldtimes(FixedPrecisionApcomplexField 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, value
-
-
-
-
Constructor Detail
-
FixedPrecisionApcomplexField
public FixedPrecisionApcomplexField(org.apfloat.Apcomplex value, org.apfloat.FixedPrecisionApcomplexHelper helper)Constructs a new complex field object with the specified value and precision helper.- Parameters:
value- The value.helper- The precision helper.
-
-
Method Detail
-
plus
public FixedPrecisionApcomplexField plus(FixedPrecisionApcomplexField that)
Description copied from class:AbstractFieldReturns the sum of this object with the one specified.- Specified by:
plusin interfaceorg.jscience.mathematics.structure.GroupAdditive<FixedPrecisionApcomplexField>- Specified by:
plusin classAbstractField<FixedPrecisionApcomplexField,org.apfloat.Apcomplex>- Parameters:
that- The addend.- Returns:
this + that
-
opposite
public FixedPrecisionApcomplexField opposite()
Description copied from class:AbstractFieldReturns the additive inverse of this object.- Specified by:
oppositein interfaceorg.jscience.mathematics.structure.GroupAdditive<FixedPrecisionApcomplexField>- Specified by:
oppositein classAbstractField<FixedPrecisionApcomplexField,org.apfloat.Apcomplex>- Returns:
-this
-
times
public FixedPrecisionApcomplexField times(FixedPrecisionApcomplexField that)
Description copied from class:AbstractFieldReturns the product of this object with the one specified.- Specified by:
timesin interfaceorg.jscience.mathematics.structure.GroupMultiplicative<FixedPrecisionApcomplexField>- Specified by:
timesin interfaceorg.jscience.mathematics.structure.Ring<FixedPrecisionApcomplexField>- Specified by:
timesin classAbstractField<FixedPrecisionApcomplexField,org.apfloat.Apcomplex>- Parameters:
that- The multiplicand.- Returns:
this * that
-
inverse
public FixedPrecisionApcomplexField inverse() throws ArithmeticException
Description copied from class:AbstractFieldReturns the multiplicative inverse of this object.- Specified by:
inversein interfaceorg.jscience.mathematics.structure.GroupMultiplicative<FixedPrecisionApcomplexField>- Specified by:
inversein classAbstractField<FixedPrecisionApcomplexField,org.apfloat.Apcomplex>- Returns:
1 / this- Throws:
ArithmeticException- If the divisor is zero.
-
copy
public FixedPrecisionApcomplexField copy()
Description copied from class:AbstractFieldReturns a copy of this object.- Specified by:
copyin interfacejavolution.lang.ValueType- Specified by:
copyin classAbstractField<FixedPrecisionApcomplexField,org.apfloat.Apcomplex>- Returns:
- A copy of this object.
-
helper
public org.apfloat.FixedPrecisionApcomplexHelper helper()
Return the precision helper.- Returns:
- The precision helper.
-
-