Package org.jblas
Class ComplexFloat
java.lang.Object
org.jblas.ComplexFloat
A complex value with float precision.
- Author:
- Mikio L. Braun
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ComplexFloat
static final ComplexFloat
static final ComplexFloat
static final ComplexFloat
static final ComplexFloat
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
abs()
Return the absolute valueadd
(float c) Add a real number to a complex number.add
(ComplexFloat c) Add two complex numbers.addi
(float c) Add a real number to complex number in-place, storing the result in this.addi
(float a, ComplexFloat result) Add a real number to a complex number in-place.addi
(ComplexFloat c) Add two complex numbers in-place storing the result in this.addi
(ComplexFloat c, ComplexFloat result) Add two complex numbers in-placefloat
arg()
Returns the argument of a complex number.conj()
conji()
copy
(ComplexFloat other) div
(float v) div
(ComplexFloat c) Divide two complex numbersdivi
(float v) divi
(float v, ComplexFloat result) divi
(ComplexFloat c) divi
(ComplexFloat c, ComplexFloat result) Divide two complex numbers, in-placedup()
boolean
eq
(ComplexFloat c) boolean
Comparing two ComplexFloat values.int
hashCode()
float
imag()
inv()
invi()
boolean
isImag()
boolean
isReal()
boolean
isZero()
mul
(float v) mul
(ComplexFloat c) Multiply two complex numbersmuli
(float v) muli
(float v, ComplexFloat result) muli
(ComplexFloat c) muli
(ComplexFloat c, ComplexFloat result) Multiply two complex numbers, in-placeboolean
ne
(ComplexFloat c) neg()
negi()
float
real()
set
(float real, float imag) sqrt()
sub
(float r) sub
(ComplexFloat c) Subtract two complex numberssubi
(float a) subi
(float a, ComplexFloat result) subi
(ComplexFloat c) subi
(ComplexFloat c, ComplexFloat result) Subtract two complex numbers, in-placetoString()
-
Field Details
-
UNIT
-
I
-
NEG_UNIT
-
NEG_I
-
ZERO
-
-
Constructor Details
-
ComplexFloat
-
ComplexFloat
-
-
Method Details
-
toString
-
set
-
real
-
imag
-
dup
-
copy
-
addi
Add two complex numbers in-place- Parameters:
c
- other complex numberresult
- complex number where result is stored- Returns:
- same as result
-
addi
Add two complex numbers in-place storing the result in this.- Parameters:
c
- other complex number- Returns:
- resulting complex number
-
add
Add two complex numbers.- Parameters:
c
- other complex number- Returns:
- new complex number with result
-
addi
Add a real number to a complex number in-place.- Parameters:
a
- real number to addresult
- complex number to hold result- Returns:
- same as result
-
addi
Add a real number to complex number in-place, storing the result in this.- Parameters:
c
- real number to add- Returns:
- resulting complex number
-
add
Add a real number to a complex number.- Parameters:
c
- real number to add- Returns:
- new complex number with result
-
subi
Subtract two complex numbers, in-place- Parameters:
c
- complex number to subtractresult
- resulting complex number- Returns:
- same as result
-
subi
-
sub
Subtract two complex numbers- Parameters:
c
- complex number to subtract- Returns:
- new complex number with result
-
subi
-
subi
-
sub
-
muli
Multiply two complex numbers, in-place- Parameters:
c
- other complex numberresult
- complex number where product is stored- Returns:
- same as result
-
muli
-
mul
Multiply two complex numbers- Parameters:
c
- other complex number- Returns:
- new complex number with product of this and c
-
mul
-
muli
-
muli
-
div
Divide two complex numbers- Parameters:
c
- complex number to divide this by- Returns:
- new complex number with quotient of this and c
-
divi
Divide two complex numbers, in-place- Parameters:
c
- complex number to divide this byresult
- complex number to hold result- Returns:
- same as result
-
divi
-
divi
-
divi
-
div
-
abs
Return the absolute value- Returns:
- the result (length of the vector in 2d plane)
-
arg
Returns the argument of a complex number.- Returns:
- the result (angle in radians of the vector in 2d plane)
-
invi
-
inv
-
neg
-
negi
-
conji
-
conj
-
sqrt
-
equals
Comparing two ComplexFloat values. -
hashCode
-
eq
-
ne
-
isZero
-
isReal
-
isImag
-