API / geotoolkit / seismic / analysis / maths / ComplexArray / ComplexArray
maths.ComplexArray.ComplexArray
An array of complex numbers.
A complex number, C, has the form C = A + B*j, where A and B are both real. We refer to A as the 'real part' of C, and B as the 'imaginary part' of C where both A and B can be represented by double precision values.
This is a wrapper class that can hold two double arrays, one of which is interpreted as containing the real values, the other the imaginary values of the complex numbers. Ported from the Saddleback Geosolution's Java implementation
Constructors
| [new ComplexArray(real)](/solutions/geotoolkit/apis/classes/geotoolkit.seismic.analysis.maths.complexarray.complexarray.md#new complexarray(real)) | [new ComplexArray(real, imag)](/solutions/geotoolkit/apis/classes/geotoolkit.seismic.analysis.maths.complexarray.complexarray.md#new complexarray(real, imag)) |
|---|
Constructors
• new ComplexArray(real)
| Name | Type | Description |
|---|---|---|
real | number | Float32Array | ComplexArray | complex array or length |
• new ComplexArray(real, imag)
| Name | Type | Description |
|---|---|---|
real | Float32Array | Real part of the complex array. |
imag | Float32Array | The imaginary part of the complex array. |
Methods
▸ get(index): ComplexNumber
Gets a new ComplexNumber from the ComplexArray at a specified index
| Name | Type | Description |
|---|---|---|
index | number | The index location at which to get the complex number. |
complex The complex number.
▸ getClassName(): string
string
▸ getImagArray(): Float32Array
Gets the array of imaginary components.
Float32Array
imagArray The imaginary data array.
▸ getLength(): number
Gets the length of the complex array.
number
length The length of the complex array.
▸ getRealArray(): Float32Array
Gets the array of real components.
Float32Array
realArray The real data array.
▸ set(complexNumber, index): ComplexArray
Set the value of ComplexArray at a specified index with the ComplexNumber complexNumber.
| Name | Type | Description |
|---|---|---|
complexNumber | ComplexNumber | The complex number. |
index | number | The index at which the complex number will be set. |
this
▸ Static getClassName(): string
string