Class for storing an 1- to 3-dimensional array of complex numbers as an 1D array of alternating real and imaginary parts in double precision. More...
Public Member Functions | |
ComplexArray (int n) | |
Constructor to generate a 1D array of complex numbers. More... | |
ComplexArray (int n, int m) | |
Constructor to generate a 2D array of complex numbers. More... | |
ComplexArray (int n, int m, int L) | |
Constructor to generate a 3D array of complex numbers. More... | |
int | getDimension () |
Return the dimension of this complex array. More... | |
int | getTotalLength () |
Return the total length of this complex array. More... | |
int[] | getOriginalSize () |
Return the array that shows the size of the original array before storing using this method. More... | |
double[] | getWholeArray () |
Return the complex array. More... | |
void | setWholeArray (double[] inputArray) |
Set the array to values of a array of doubles. More... | |
void | setWholeArray (ComplexArray input) |
Set the array to values to those of another AltComplex. More... | |
void | setRealAt (double realPart, int i, int j, int k) |
Set value at given coordinates. More... | |
void | setRealAt (double realPart, int i, int j) |
Set value at given coordinates. More... | |
void | setRealAt (double realPart, int i) |
Set value at given coordinates. More... | |
void | setImagAt (double imagPart, int i, int j, int k) |
Set the 'imaginary' part of the array to a value. More... | |
void | setImagAt (double imagPart, int i, int j) |
Set the 'imaginary' part of the array to a value. More... | |
void | setImagAt (double imagPart, int i) |
Set the 'imaginary' part of the array to a value. More... | |
void | setComplexAt (Complex c, int i, int j, int k) |
Set the 'imaginary' part of the array to a Complex number. More... | |
void | setComplexAt (Complex c, int i, int j) |
Set the 'imaginary' part of the array to a Complex number. More... | |
void | setComplexAt (Complex c, int i) |
Set the 'imaginary' part of the array to a Complex number. More... | |
double | getRealAt (int i, int j, int k) |
Get value at specified coordinates. More... | |
double | getRealAt (int i, int j) |
Get value at specified coordinates. More... | |
double | getRealAt (int i) |
Get value at specified coordinates. More... | |
double | getImagAt (int i, int j, int k) |
Get imaginary value part of this object at specified coordinates. More... | |
double | getImagAt (int i, int j) |
Get imaginary value part of this object at specified coordinates. More... | |
double | getImagAt (int i) |
Get imaginary value part of this object at specified coordinates. More... | |
Complex | getComplexAt (int i, int j, int k) |
Get the complex number stored at a given position in the array. More... | |
Complex | getComplexAt (int i, int j) |
Get the complex number stored at a given position in the array. More... | |
Complex | getComplexAt (int i) |
Get the complex number stored at a given position in the array. More... | |
void | add (double realNumber, int i, int j, int k) |
Add a double to the data in a given position in the array. More... | |
void | sub (double realNumber, int i, int j, int k) |
Subtract a double to the data in a given position in the array. More... | |
void | mul (double realNumber, int i, int j, int k) |
Multiply a double to the data in a given position in the array. More... | |
void | div (double realNumber, int i, int j, int k) |
Divide a double to the data in a given position in the array. More... | |
void | add (double realNumber, int i, int j) |
Add a double to the data in a given position in the array. More... | |
void | sub (double realNumber, int i, int j) |
Subtract a double to the data in a given position in the array. More... | |
void | mul (double realNumber, int i, int j) |
Multiply a double to the data in a given position in the array. More... | |
void | div (double realNumber, int i, int j) |
Divide a double to the data in a given position in the array. More... | |
void | add (double realNumber, int i) |
Add a double to the data in a given position in the array. More... | |
void | sub (double realNumber, int i) |
Subtract a double to the data in a given position in the array. More... | |
void | mul (double realNumber, int i) |
Multiply a double to the data in a given position in the array. More... | |
void | div (double realNumber, int i) |
Divide a double to the data in a given position in the array. More... | |
void | add (Complex c, int i, int j, int k) |
Add a complex number to the data in a given position in the array. More... | |
void | sub (Complex c, int i, int j, int k) |
Subtract a complex number from the data in a given position in the array. More... | |
void | mul (Complex c, int i, int j, int k) |
Multiply a complex number to the data in a given position in the array. More... | |
void | div (Complex c, int i, int j, int k) |
Divide a complex number to the data in a given position in the array. More... | |
void | add (Complex c, int i, int j) |
Add a complex number to the data in a given position in the array. More... | |
void | add (Complex c, int i) |
Add a complex number to the data in a given position in the array. More... | |
void | sub (Complex c, int i, int j) |
Subtract a complex number from the data in a given position in the array. More... | |
void | sub (Complex c, int i) |
Subtract a complex number from the data in a given position in the array. More... | |
void | mul (Complex c, int i, int j) |
Multiply a complex number to the data in a given position in the array. More... | |
void | mul (Complex c, int i) |
Multiply a complex number to the data in a given position in the array. More... | |
void | div (Complex c, int i, int j) |
Divide a complex number to the data in a given position in the array. More... | |
void | div (Complex c, int i) |
Divide a complex number to the data in a given position in the array. More... | |
Protected Attributes | |
double[] | altArray |
int | _dim |
int | _l |
int | _m |
int | _n |
int[] | _originalSize = {_n, _m, _l} |
int | _ntot |
Class for storing an 1- to 3-dimensional array of complex numbers as an 1D array of alternating real and imaginary parts in double precision.
Class for storing an 1- to 3-dimensional array of complex numbers as an 1D array of alternating real and imaginary parts in double precision. This data structure optimizes efficiency of fast fourier transformation (fft) by the "Numerical Recipes" algorithm. Includes basic math operations (addition, subtraction, multiplication, division)
utils.ComplexArray.ComplexArray | ( | int | n | ) |
Constructor to generate a 1D array of complex numbers.
Constructor to generate a 1D array of complex numbers
n | The number of entries that will be included in this array |
utils.ComplexArray.ComplexArray | ( | int | n, |
int | m | ||
) |
Constructor to generate a 2D array of complex numbers.
Constructor to generate a 2D array of complex numbers
n | The number of entries in the n direction that will be included in this array |
m | The number of entries in the m direction that will be included in this array |
utils.ComplexArray.ComplexArray | ( | int | n, |
int | m, | ||
int | L | ||
) |
Constructor to generate a 3D array of complex numbers.
Constructor to generate a 3D array of complex numbers
n | The number of entries in the n direction that will be included in this array |
m | The number of entries in the m direction that will be included in this array |
L | The number of entries in the L direction that will be included in this array |
void utils.ComplexArray.add | ( | double | realNumber, |
int | i, | ||
int | j, | ||
int | k | ||
) |
Add a double to the data in a given position in the array.
Add a double to the data in a given position in the array
realNumber | Value to add |
i | Array coordinate i |
j | Array coordinate j |
k | Array coordinate k |
void utils.ComplexArray.add | ( | double | realNumber, |
int | i, | ||
int | j | ||
) |
Add a double to the data in a given position in the array.
Add a double to the data in a given position in the array
realNumber | Value to add |
i | Array coordinate i |
j | Array coordinate j |
void utils.ComplexArray.add | ( | double | realNumber, |
int | i | ||
) |
Add a double to the data in a given position in the array.
Add a double to the data in a given position in the array
realNumber | Value to add |
i | Array coordinate i |
void utils.ComplexArray.add | ( | Complex | c, |
int | i, | ||
int | j, | ||
int | k | ||
) |
Add a complex number to the data in a given position in the array.
Add a complex number to the data in a given position in the array
c | Value to add |
i | Array coordinate i |
j | Array coordinate j |
k | Array coordinate k |
void utils.ComplexArray.add | ( | Complex | c, |
int | i, | ||
int | j | ||
) |
Add a complex number to the data in a given position in the array.
Add a complex number to the data in a given position in the array
c | Value to add |
i | Array coordinate i |
j | Array coordinate j |
void utils.ComplexArray.add | ( | Complex | c, |
int | i | ||
) |
Add a complex number to the data in a given position in the array.
Add a complex number to the data in a given position in the array
c | Value to add |
i | Array coordinate i |
void utils.ComplexArray.div | ( | double | realNumber, |
int | i, | ||
int | j, | ||
int | k | ||
) |
Divide a double to the data in a given position in the array.
Divide a double to the data in a given position in the array
realNumber | Value to divide by |
i | Array coordinate i |
j | Array coordinate j |
k | Array coordinate k |
void utils.ComplexArray.div | ( | double | realNumber, |
int | i, | ||
int | j | ||
) |
Divide a double to the data in a given position in the array.
Divide a double to the data in a given position in the array
realNumber | Value to divide by |
i | Array coordinate i |
j | Array coordinate j |
void utils.ComplexArray.div | ( | double | realNumber, |
int | i | ||
) |
Divide a double to the data in a given position in the array.
Divide a double to the data in a given position in the array
realNumber | Value to divide by |
i | Array coordinate i |
void utils.ComplexArray.div | ( | Complex | c, |
int | i, | ||
int | j, | ||
int | k | ||
) |
Divide a complex number to the data in a given position in the array.
Divide a complex number to the data in a given position in the array
c | Value to divide by |
i | Array coordinate i |
j | Array coordinate j |
k | Array coordinate k |
void utils.ComplexArray.div | ( | Complex | c, |
int | i, | ||
int | j | ||
) |
Divide a complex number to the data in a given position in the array.
Divide a complex number to the data in a given position in the array
c | Value to divide |
i | Array coordinate i |
j | Array coordinate j |
void utils.ComplexArray.div | ( | Complex | c, |
int | i | ||
) |
Divide a complex number to the data in a given position in the array.
Divide a complex number to the data in a given position in the array
c | Value to divide by |
i | Array coordinate i |
Complex utils.ComplexArray.getComplexAt | ( | int | i, |
int | j, | ||
int | k | ||
) |
Get the complex number stored at a given position in the array.
Get the complex number stored at a given position in the array
i | Array coordinate i |
j | Array coordinate j |
k | Array coordinate k |
Complex utils.ComplexArray.getComplexAt | ( | int | i, |
int | j | ||
) |
Get the complex number stored at a given position in the array.
Get the complex number stored at a given position in the array
i | Array coordinate i |
j | Array coordinate j |
Complex utils.ComplexArray.getComplexAt | ( | int | i | ) |
Get the complex number stored at a given position in the array.
Get the complex number stored at a given position in the array
i | Array coordinate i |
int utils.ComplexArray.getDimension | ( | ) |
Return the dimension of this complex array.
Return the dimension of this complex array
double utils.ComplexArray.getImagAt | ( | int | i, |
int | j, | ||
int | k | ||
) |
Get imaginary value part of this object at specified coordinates.
Get imaginary value part of this object at specified coordinates
i | Array coordinate i |
j | Array coordinate j |
k | Array coordinate k |
double utils.ComplexArray.getImagAt | ( | int | i, |
int | j | ||
) |
Get imaginary value part of this object at specified coordinates.
Get imaginary value part of this object at specified coordinates
i | Array coordinate i |
j | Array coordinate j |
double utils.ComplexArray.getImagAt | ( | int | i | ) |
Get imaginary value part of this object at specified coordinates.
Get imaginary value part of this object at specified coordinates
i | Array coordinate i |
int [] utils.ComplexArray.getOriginalSize | ( | ) |
Return the array that shows the size of the original array before storing using this method.
Return the array that shows the size of the original array before storing using this method
double utils.ComplexArray.getRealAt | ( | int | i, |
int | j, | ||
int | k | ||
) |
Get value at specified coordinates.
Get value at specified coordinates
i | Array coordinate i |
j | Array coordinate j |
k | Array coordinate k |
double utils.ComplexArray.getRealAt | ( | int | i, |
int | j | ||
) |
Get value at specified coordinates.
Get value at specified coordinates
i | Array coordinate i |
j | Array coordinate j |
double utils.ComplexArray.getRealAt | ( | int | i | ) |
Get value at specified coordinates.
Get value at specified coordinates
i | Array coordinate i |
int utils.ComplexArray.getTotalLength | ( | ) |
Return the total length of this complex array.
Return the total length of this complex array
double [] utils.ComplexArray.getWholeArray | ( | ) |
void utils.ComplexArray.mul | ( | double | realNumber, |
int | i, | ||
int | j, | ||
int | k | ||
) |
Multiply a double to the data in a given position in the array.
Multiply a double to the data in a given position in the array
realNumber | Value to multiply |
i | Array coordinate i |
j | Array coordinate j |
k | Array coordinate k |
void utils.ComplexArray.mul | ( | double | realNumber, |
int | i, | ||
int | j | ||
) |
Multiply a double to the data in a given position in the array.
Multiply a double to the data in a given position in the array
realNumber | Value to multiply |
i | Array coordinate i |
j | Array coordinate j |
void utils.ComplexArray.mul | ( | double | realNumber, |
int | i | ||
) |
Multiply a double to the data in a given position in the array.
Multiply a double to the data in a given position in the array
realNumber | Value to multiply |
i | Array coordinate i |
void utils.ComplexArray.mul | ( | Complex | c, |
int | i, | ||
int | j, | ||
int | k | ||
) |
Multiply a complex number to the data in a given position in the array.
Multiply a complex number to the data in a given position in the array
c | Value to add |
i | Array coordinate i |
j | Array coordinate j |
k | Array coordinate k |
void utils.ComplexArray.mul | ( | Complex | c, |
int | i, | ||
int | j | ||
) |
Multiply a complex number to the data in a given position in the array.
Multiply a complex number to the data in a given position in the array
c | Value to multiply |
i | Array coordinate i |
j | Array coordinate j |
void utils.ComplexArray.mul | ( | Complex | c, |
int | i | ||
) |
Multiply a complex number to the data in a given position in the array.
Multiply a complex number to the data in a given position in the array
c | Value to multiply |
i | Array coordinate i |
void utils.ComplexArray.setComplexAt | ( | Complex | c, |
int | i, | ||
int | j, | ||
int | k | ||
) |
void utils.ComplexArray.setComplexAt | ( | Complex | c, |
int | i, | ||
int | j | ||
) |
void utils.ComplexArray.setComplexAt | ( | Complex | c, |
int | i | ||
) |
void utils.ComplexArray.setImagAt | ( | double | imagPart, |
int | i, | ||
int | j, | ||
int | k | ||
) |
Set the 'imaginary' part of the array to a value.
Set the 'imaginary' part of the array to a value
imagPart | Value to set this part of the array to |
i | Array coordinate i |
j | Array coordinate j |
k | Array coordinate k |
void utils.ComplexArray.setImagAt | ( | double | imagPart, |
int | i, | ||
int | j | ||
) |
Set the 'imaginary' part of the array to a value.
Set the 'imaginary' part of the array to a value
imagPart | Value to set this part of the array to |
i | Array coordinate i |
j | Array coordinate j |
void utils.ComplexArray.setImagAt | ( | double | imagPart, |
int | i | ||
) |
Set the 'imaginary' part of the array to a value.
Set the 'imaginary' part of the array to a value
imagPart | Value to set this part of the array to |
i | Array coordinate i |
void utils.ComplexArray.setRealAt | ( | double | realPart, |
int | i, | ||
int | j, | ||
int | k | ||
) |
Set value at given coordinates.
Set value at given coordinates
realPart | The value to set the array coordinate to |
i | Array coordinate i |
j | Array coordinate j |
k | Array coordinate k |
void utils.ComplexArray.setRealAt | ( | double | realPart, |
int | i, | ||
int | j | ||
) |
Set value at given coordinates.
Set value at given coordinates
realPart | The value to set the array coordinate to |
i | Array coordinate i |
j | Array coordinate j |
void utils.ComplexArray.setRealAt | ( | double | realPart, |
int | i | ||
) |
Set value at given coordinates.
Set value at given coordinates
realPart | The value to set the array coordinate to |
i | Array coordinate i |
void utils.ComplexArray.setWholeArray | ( | double[] | inputArray | ) |
Set the array to values of a array of doubles.
Set the array to values of a array of doubles
inputArray | Array of values to set this complex array to |
void utils.ComplexArray.setWholeArray | ( | ComplexArray | input | ) |
Set the array to values to those of another AltComplex.
Set the array to values to those of another AltComplex
input | Complex array of values whose values should be cloned into this array |
void utils.ComplexArray.sub | ( | double | realNumber, |
int | i, | ||
int | j, | ||
int | k | ||
) |
Subtract a double to the data in a given position in the array.
Subtract a double to the data in a given position in the array
realNumber | Value to subtract |
i | Array coordinate i |
j | Array coordinate j |
k | Array coordinate k |
void utils.ComplexArray.sub | ( | double | realNumber, |
int | i, | ||
int | j | ||
) |
Subtract a double to the data in a given position in the array.
Subtract a double to the data in a given position in the array
realNumber | Value to subtract |
i | Array coordinate i |
j | Array coordinate j |
void utils.ComplexArray.sub | ( | double | realNumber, |
int | i | ||
) |
Subtract a double to the data in a given position in the array.
Subtract a double to the data in a given position in the array
realNumber | Value to subtract |
i | Array coordinate i |
void utils.ComplexArray.sub | ( | Complex | c, |
int | i, | ||
int | j, | ||
int | k | ||
) |
Subtract a complex number from the data in a given position in the array.
Subtract a complex number from the data in a given position in the array
c | Value to add |
i | Array coordinate i |
j | Array coordinate j |
k | Array coordinate k |
void utils.ComplexArray.sub | ( | Complex | c, |
int | i, | ||
int | j | ||
) |
Subtract a complex number from the data in a given position in the array.
Subtract a complex number from the data in a given position in the array
c | Value to subtract |
i | Array coordinate i |
j | Array coordinate j |
void utils.ComplexArray.sub | ( | Complex | c, |
int | i | ||
) |
Subtract a complex number from the data in a given position in the array.
Subtract a complex number from the data in a given position in the array
c | Value to subtract |
i | Array coordinate i |
|
protected |
Dimension of the source array
|
protected |
Number of voxels in the l direction
|
protected |
Number of voxels in the m direction
|
protected |
Number of voxels in the n direction
|
protected |
Length of the main array
Integer array storing the original size of the array (nxmxl)
|
protected |
The main array