public class ComplexBuffer extends java.lang.Object implements ComplexNumber, java.io.Serializable
Constructor and Description |
---|
ComplexBuffer()
Create a complex buffer that initially has zero real and imaginary parts.
|
ComplexBuffer(ComplexNumber num)
Create a complex buffer that initially stores the specified complex number.
|
ComplexBuffer(double re)
Create a complex buffer that initially the specified real part and zero as
the imaginary part.
|
ComplexBuffer(double re,
double im)
Create a complex buffer that initially has the specified real and
imaginary parts
|
Modifier and Type | Method and Description |
---|---|
double |
abs()
Calculate the absolute value of the complex number in this complex buffer.
|
ComplexBuffer |
acoshInPlace()
Calculate the inverse hyperbolic cosine of the value of the buffer
and store the result in this buffer
|
ComplexBuffer |
acosInPlace()
Calculate the inverse cosine of the value of the buffer
and store the result in this buffer
|
ComplexBuffer |
addInPlace(ComplexNumber c)
Add another complex number to this buffer and store the result in this
buffer
|
ComplexBuffer |
addInPlace(double d)
Add a real number to this buffer and store the result in this buffer
|
double |
arg()
Calculate the argument of the complex number in this complex buffer.
|
ComplexBuffer |
asinhInPlace()
Calculate the inverse hyperbolic sine of the value of the buffer
and store the result in this buffer
|
ComplexBuffer |
asinInPlace()
Calculate the inverse sine of the value of the buffer
and store the result in this buffer
|
ComplexBuffer |
atanhInPlace()
Calculate the inverse hyperbolic tangent of the value of the buffer
and store the result in this buffer
|
ComplexBuffer |
atanInPlace()
Calculate the inverse tangent of the value of the buffer
and store the result in this buffer
|
ComplexBuffer |
conjugateInPlace()
Calculate the conjugate of the value of this buffer and store the
result in this buffer
|
ComplexBuffer |
coshInPlace()
Calculate the hyperbolic cosine of the value of the buffer
and store the result in this buffer
|
ComplexBuffer |
cosInPlace()
Calculate the cosine of the value of the buffer
and store the result in this buffer
|
ComplexBuffer |
divideInPlace(ComplexNumber c)
Divide the value of this complex buffer by another complex number
and store the result in this buffer
|
ComplexBuffer |
divideInPlace(double d)
Divide the value of this complex buffer by a real number
and store the result in this buffer
|
ComplexBuffer |
divideReversedInPlace(ComplexNumber c)
Divide another complex number by the value of this complex buffer
and store the result in this buffer
|
ComplexBuffer |
divideReversedInPlace(double d)
Divide a real number by the value of this complex buffer
and store the result in this buffer
|
ComplexBuffer |
expInPlace()
Calculate the exponential of the value of this buffer and store the result
in this buffer
|
ComplexBuffer |
expm1InPlace()
Calculate exp(this)-1 and store the result in this buffer
|
Complex |
get()
Get the value of this complex buffer as an immutable object
|
double |
getImag()
Returns the imaginary part of the complex number.
|
double |
getReal()
Returns the real part of the complex number.
|
ComplexBuffer |
invertInPlace()
Calculate the inverse of the value of this buffer and store the
result in this buffer
|
boolean |
isInfinite()
Check whether the complex number in this buffer is infinite.
|
boolean |
isNaN()
Check whether the complex number in this buffer is NaN (not-a-numer).
|
ComplexBuffer |
log1pInPlace()
Calculate the logarithm of 1 added to the value of this buffer and store
the result in this buffer
|
ComplexBuffer |
logInPlace()
Calculate the logarithm of the value of this buffer and store the result
in this buffer
|
ComplexBuffer |
multiplyInPlace(ComplexNumber c)
Multiply the value of this complex buffer by another complex number
and store the result in this buffer
|
ComplexBuffer |
multiplyInPlace(double d)
Multiply the value of this complex buffer by a real number
and store the result in this buffer
|
ComplexBuffer |
multiplyInPlace(int i)
Multiply the value of this complex buffer by an integer
and store the result in this buffer
|
ComplexBuffer |
negateInPlace()
Negate the value of this buffer and store the result in this buffer
|
ComplexBuffer |
powInPlace(ComplexNumber b)
Raise this complex number to a complex power
and store the result in this buffer
|
ComplexBuffer |
powInPlace(double b)
Raise this complex number to a real power
and store the result in this buffer
|
ComplexBuffer |
set(ComplexNumber num)
Modify the value of this complex buffer
|
ComplexBuffer |
set(double re)
Modify the real part of this complex buffer and set imaginary part to zero.
|
ComplexBuffer |
set(double re,
double im)
Modify the real and imaginary parts of this complex buffer
|
ComplexBuffer |
sinhInPlace()
Calculate the hyperbolic sine of the value of the buffer
and store the result in this buffer
|
ComplexBuffer |
sinInPlace()
Calculate the sine of the value of the buffer
and store the result in this buffer
|
ComplexBuffer |
sqrtInPlace()
Calculate the square root of the value of this buffer and store the result
in this buffer
|
ComplexBuffer |
subtractInPlace(ComplexNumber c)
Subtract another complex number from this buffer and store the result in
this buffer
|
ComplexBuffer |
subtractInPlace(double d)
Subtract a real number from this buffer and store the result in
this buffer
|
ComplexBuffer |
subtractReversedInPlace(ComplexNumber c)
Subtract the value of this buffer from another complex number and store
the result in this buffer
|
ComplexBuffer |
subtractReversedInPlace(double d)
Subtract the value of this buffer from a real number and store the result
in this buffer
|
ComplexBuffer |
tanhInPlace()
Calculate the hyperbolic tangent of the value of the buffer
and store the result in this buffer
|
ComplexBuffer |
tanInPlace()
Calculate the tangent of the value of the buffer
and store the result in this buffer
|
java.lang.String |
toString()
Returns a String representation of the complex number in this complex
buffer.
|
public ComplexBuffer(ComplexNumber num)
num
- The specified complex numberpublic ComplexBuffer()
public ComplexBuffer(double re)
re
- The initial real partpublic ComplexBuffer(double re, double im)
re
- The initial real partim
- The initial imaginary partpublic ComplexBuffer set(double re)
re
- The new real partpublic ComplexBuffer set(double re, double im)
re
- The new real partim
- The new imaginary partpublic ComplexBuffer set(ComplexNumber num)
num
- The new valuepublic Complex get()
public ComplexBuffer addInPlace(ComplexNumber c)
c
- The other complex numberpublic ComplexBuffer addInPlace(double d)
d
- The real numberpublic ComplexBuffer subtractInPlace(ComplexNumber c)
c
- The other complex numberpublic ComplexBuffer subtractInPlace(double d)
d
- The real numberpublic ComplexBuffer subtractReversedInPlace(ComplexNumber c)
c
- The other complex numberpublic ComplexBuffer subtractReversedInPlace(double d)
d
- The real numberpublic ComplexBuffer negateInPlace()
public ComplexBuffer conjugateInPlace()
public ComplexBuffer invertInPlace()
public ComplexBuffer sqrtInPlace()
public ComplexBuffer expInPlace()
public ComplexBuffer logInPlace()
public ComplexBuffer log1pInPlace()
public ComplexBuffer expm1InPlace()
public ComplexBuffer acoshInPlace()
public ComplexBuffer asinhInPlace()
public ComplexBuffer atanhInPlace()
public ComplexBuffer acosInPlace()
public ComplexBuffer asinInPlace()
public ComplexBuffer atanInPlace()
public ComplexBuffer cosInPlace()
public ComplexBuffer sinInPlace()
public ComplexBuffer tanInPlace()
public ComplexBuffer coshInPlace()
public ComplexBuffer sinhInPlace()
public ComplexBuffer tanhInPlace()
public ComplexBuffer powInPlace(double b)
b
- The real powerpublic ComplexBuffer powInPlace(ComplexNumber b)
b
- The complex powerpublic ComplexBuffer multiplyInPlace(ComplexNumber c)
c
- The other complex numberpublic ComplexBuffer multiplyInPlace(double d)
d
- The real numberpublic ComplexBuffer multiplyInPlace(int i)
i
- The integerpublic ComplexBuffer divideInPlace(ComplexNumber c)
c
- The other complex numberpublic ComplexBuffer divideInPlace(double d)
d
- The real numberpublic ComplexBuffer divideReversedInPlace(ComplexNumber c)
c
- The other complex numberpublic ComplexBuffer divideReversedInPlace(double d)
d
- The real numberpublic double getReal()
getReal
in interface ComplexNumber
public double getImag()
getImag
in interface ComplexNumber
public double abs()
abs
in interface ComplexNumber
public double arg()
arg
in interface ComplexNumber
public boolean isNaN()
isNaN
in interface ComplexNumber
public boolean isInfinite()
isInfinite
in interface ComplexNumber
public java.lang.String toString()
toString
in interface ComplexNumber
toString
in class java.lang.Object