public class cuComplex extends Object
Modifier and Type | Field and Description |
---|---|
float |
x
The real part of the complex number
|
float |
y
The imaginary part of the complex number
|
Modifier and Type | Method and Description |
---|---|
static float |
cuCabs(cuComplex x)
Returns the absolute value of the given complex number.
|
static cuComplex |
cuCadd(cuComplex x,
cuComplex y)
Returns a new complex number that is the sum of the given
complex numbers.
|
static cuComplex |
cuCdiv(cuComplex x,
cuComplex y)
Returns the quotient of the given complex numbers.
|
static float |
cuCimag(cuComplex x)
Returns the imaginary part of the given complex number.
|
static cuComplex |
cuCmplx(float r,
float i)
Creates a new complex number consisting of the given real and
imaginary part.
|
static cuComplex |
cuCmul(cuComplex x,
cuComplex y)
Returns the product of the given complex numbers.
|
static cuComplex |
cuConj(cuComplex x)
Returns the complex conjugate of the given complex number.
|
static float |
cuCreal(cuComplex x)
Returns the real part of the given complex number.
|
String |
toString()
Returns a String representation of this complex number.
|
public float x
public float y
public static float cuCreal(cuComplex x)
x
- The complex number whose real part should be returnedpublic static float cuCimag(cuComplex x)
x
- The complex number whose imaginary part should be returnedpublic static cuComplex cuCmplx(float r, float i)
r
- The real part of the complex numberi
- The imaginary part of the complex numberpublic static cuComplex cuConj(cuComplex x)
x
- The complex number whose complex conjugate should be returnedpublic static cuComplex cuCadd(cuComplex x, cuComplex y)
x
- The first addendy
- The second addendpublic static cuComplex cuCmul(cuComplex x, cuComplex y)
x
- The first factory
- The second factorpublic static cuComplex cuCdiv(cuComplex x, cuComplex y)
x
- The dividendy
- The divisorpublic static float cuCabs(cuComplex x)
x
- The complex number whose absolute value should be returnedCopyright © 2020. All rights reserved.