Package mpi
Class DoubleComplex
java.lang.Object
mpi.DoubleComplex
This class wraps a complex number stored in a buffer.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DoubleComplexget(double[] array) Wraps a complex number stored in the first two values of an array.static DoubleComplexget(double[] array, int index) Wraps the complex number at the specified position of an array of complex numbers stored in an array of doubles.static DoubleComplexget(ByteBuffer buffer) Wraps a complex number stored in a bufferstatic DoubleComplexget(ByteBuffer buffer, int index) Wraps the complex number at the specified position of an array of complex numbers stored in a buffer.static DoubleComplexget(DoubleBuffer buffer) Wraps a complex number stored in a bufferstatic DoubleComplexget(DoubleBuffer buffer, int index) Wraps the complex number at the specified position of an array of complex numbers stored in a buffer.Gets the buffer where the complex number is stored.doublegetImag()Gets the imaginary value.doublegetReal()Gets the real value.voidputImag(double imag) Puts the imaginary value.voidputReal(double real) Puts the real value.
-
Method Details
-
get
Wraps a complex number stored in a buffer- Parameters:
buffer- buffer- Returns:
- complex number
-
get
Wraps the complex number at the specified position of an array of complex numbers stored in a buffer.- Parameters:
buffer- bufferindex- index- Returns:
- complex number
-
get
Wraps a complex number stored in the first two values of an array.- Parameters:
array- array- Returns:
- complex number
-
get
Wraps the complex number at the specified position of an array of complex numbers stored in an array of doubles.- Parameters:
array- arrayindex- index- Returns:
- complex number
-
get
Wraps a complex number stored in a buffer- Parameters:
buffer- buffer- Returns:
- complex number
-
get
Wraps the complex number at the specified position of an array of complex numbers stored in a buffer.- Parameters:
buffer- bufferindex- index- Returns:
- complex number
-
getReal
public double getReal()Gets the real value.- Returns:
- real value
-
getImag
public double getImag()Gets the imaginary value.- Returns:
- imaginary value.
-
putReal
public void putReal(double real) Puts the real value.- Parameters:
real- real value
-
putImag
public void putImag(double imag) Puts the imaginary value.- Parameters:
imag- imaginary value
-
getBuffer
Gets the buffer where the complex number is stored.- Returns:
- buffer where the complex number is stored
-