ArrayMath provides some basic methods for manipulating numeric arrays.
Constructor | Description |
Full Usage:
ArrayMath()
|
|
Static member | Description |
Full Usage:
ArrayMath.CopyFromComplexToSplittedArrays(src, destreal, destimag, n)
Parameters:
Complex[]
-
The source array.
destreal : float[]
-
The array where the real part values are stored into.
destimag : float[]
-
The destination array where the imaginary part values are stored into.
n : int
-
The number of elements to copy. The copying is done from index 0 to n-1.
|
Copies an array of Complex elements into an array of the real part values and an array of the imaginary part values.
|
Full Usage:
ArrayMath.CopyFromSplittedArraysToComplex(srcreal, srcimag, dest, n)
Parameters:
float[]
-
The source array containing the real part values.
srcimag : float[]
-
The source array containing the imaginary part values.
dest : Complex[]
-
The destination array.
n : int
-
The number of elements to copy. The copying is done from index 0 to n-1.
|
|
Full Usage:
ArrayMath.MultiplySplittedComplexArrays(src1real, src1imag, src2real, src2imag, destreal, destimag, n)
Parameters:
float[]
-
Real part of the first input array. Must be at least of length n.
src1imag : float[]
-
Imaginary part of the first input array. Must be at least of length n.
src2real : float[]
-
Real part of the first input array. Must be at least of length n.
src2imag : float[]
-
Imaginary part of the first input array. Must be at least of length n.
destreal : float[]
-
Real part of the resulting array. Must be at least of length n.
destimag : float[]
-
Imaginary part of the resulting array. Must be at least of length n.
n : int
-
Normally, the size of the arrays. The multiplication is done from index 0 to n-1.
|
Multiplies two splitted complex array and stores the result in a splitted complex array. The resulting array may be identical to one of the input arrays.
|
Full Usage:
ArrayMath.MultiplySplittedComplexArraysCrossed(src1real, src1imag, src2real, src2imag, destreal, destimag, n, scale)
Parameters:
float[]
-
Real part of the first input array. Must be at least of length n.
src1imag : float[]
-
Imaginary part of the first input array. Must be at least of length n.
src2real : float[]
-
Real part of the first input array. Must be at least of length n.
src2imag : float[]
-
Imaginary part of the first input array. Must be at least of length n.
destreal : float[]
-
Real part of the resulting array. Must be at least of length n.
destimag : float[]
-
Imaginary part of the resulting array. Must be at least of length n.
n : int
-
Normally, the size of the arrays. The multiplication is done from index 0 to n-1. See remarks for details.
scale : float
-
A factor the result is multiplied with.
|
Multiplies two splitted complex arrays which are the result of Fourier transformations in inverse order like result=x[w]*x[-w] (w is frequency) and stores the result in a splitted complex array. Note that this is not simply x[i]*x[n-i], since there are the special points i=0 and i=n/2. Furthermore, this operation is not transitive, i.e. multiplying src1 with src2 gives not the same result as multipying src2 with src1. See remarks for detail.
1. The resulting array may be identical to one of the input arrays. This operation is defined as follows: result[i] = scale * src1[i] * src2[j]; with i=1..(n-1) and j=(n-1)..1 result[0] = scale * src1[0] * src2[0]; result[n/2] = scale * src1[n/2]* src2[n/2]; // (only if n is even)
|
Full Usage:
ArrayMath.NormalizeArrays(arr1, arr2, factor, n)
Parameters:
float[]
-
The first array.
arr2 : float[]
-
The second array.
factor : float
-
The factor the elements of both arrays are multiplied with.
n : int
-
The multiplication is done from index 0 to n-1.
|
Multiplies the elements of array arr1 and array arr2 by a factor.
|