Last updated

API / geotoolkit / seismic / analysis / maths / ComplexArray / ComplexArray

Class: 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

Table of contents

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))
Methods

Contents

Constructors

new ComplexArray(real)

new ComplexArray(real)

Parameters

Name Type Description
realnumber | Float32Array | ComplexArraycomplex array or length

new ComplexArray(real, imag)

new ComplexArray(real, imag)

Parameters

Name Type Description
realFloat32ArrayReal part of the complex array.
imagFloat32ArrayThe imaginary part of the complex array.
Methods

get

get(index): ComplexNumber

Gets a new ComplexNumber from the ComplexArray at a specified index

Parameters

Name Type Description
indexnumberThe index location at which to get the complex number.

Returns

ComplexNumber

complex The complex number.


getClassName

getClassName(): string

Returns

string


getImagArray

getImagArray(): Float32Array

Gets the array of imaginary components.

Returns

Float32Array

imagArray The imaginary data array.


getLength

getLength(): number

Gets the length of the complex array.

Returns

number

length The length of the complex array.


getRealArray

getRealArray(): Float32Array

Gets the array of real components.

Returns

Float32Array

realArray The real data array.


set

set(complexNumber, index): ComplexArray

Set the value of ComplexArray at a specified index with the ComplexNumber complexNumber.

Parameters

Name Type Description
complexNumberComplexNumberThe complex number.
indexnumberThe index at which the complex number will be set.

Returns

ComplexArray

this


getClassName

Static getClassName(): string

Returns

string