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