|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jfftw.FFTW jfftw.FFTWComplex
public class FFTWComplex
Class to implement simple one-off Complex to Complex Fourier transforms using jfftw as a native library.
A new plan is created for each FFT. This is sub-optimal for a large number of FFTs, but reasonable for ``one-off''.
Field Summary |
---|
Fields inherited from class jfftw.FFTW |
---|
BACKWARD, errorStream, ESTIMATE, EXHAUSTIVE, FORWARD, FOURIER, loaded, PATIENT, planFlag, REAL, throwLoadException, version |
Constructor Summary | |
---|---|
FFTWComplex()
Default constructor which load sharable library and sets defaults. |
|
FFTWComplex(boolean systemWisdom)
Constructor to optionally load system wisdom file |
|
FFTWComplex(FFTW fft)
Constructor to form a FFTWComplex from a FFTW, The PlanFlag is also copied. |
|
FFTWComplex(String wisdomFile)
Constructor to load specified wisdom file by name |
Method Summary | |
---|---|
double[][] |
oneDimensional(double[][] in,
double[][] out,
int dirn)
Method to take a Complex one-dimensional FFT with the real and imaging data split format in a two-dimensional array of size [2][length] with the the i th component with real in the [0][i] element and the imaginary element in the [1][i] element. |
double[][] |
oneDimensional(double[][] in,
int dirn,
boolean overwrite)
Method to take a Complex one-dimensional FFT with the real and imaging data split format in a two-dimensional array of size [2][length] with the the i th component with real in the [0][i] element and the imaginary element in the [1][i] element. |
double[] |
oneDimensional(double[] in,
double[] out,
int dirn)
Method to take one-dimensional Complex FFT with the data supplied in a one-dimensional interleaved double array. |
double[] |
oneDimensional(double[] in,
int dirn,
boolean overwrite)
Method to take one-dimensional Complex FFT with the data supplied in a one-dimensional interleaved double array. |
double[][] |
threeDimensional(int width,
int height,
int depth,
double[][] in,
double[][] out,
int dirn)
Method to take a Complex three-dimensional FFT with the real and imaging data split format in a two-dimensional array of size [2][length] with the the i th component with real in the [0][i] element and the imaginary element in the [1][i] element. |
double[][] |
threeDimensional(int width,
int height,
int depth,
double[][] in,
int dirn,
boolean overwrite)
Method to take a Complex three-dimensional FFT with the real and imaging data split format in a two-dimensional array of size [2][length] with the the i th component with real in the [0][i] element and the imaginary element in the [1][i] element. |
double[] |
threeDimensional(int width,
int height,
int depth,
double[] in,
double[] out,
int dirn)
Method to take three-dimensional Complex FFT with the data supplied in a one-dimensional double array with real parts in even elements, and imaginary in the odd. |
double[] |
threeDimensional(int width,
int height,
int depth,
double[] in,
int dirn,
boolean overwrite)
Method to take three-dimensional Complex FFT with the data supplied in a one-dimensional double array with real parts in even elements, and imaginary in the odd. |
double[][] |
twoDimensional(int width,
int height,
double[][] in,
double[][] out,
int dirn)
Method to take a Complex two-dimensional FFT with the real and imaging data split format in a two-dimensional array of size [2][length] with the the i th component with real in the [0][i] element and the imaginary element in the [1][i] element. |
double[][] |
twoDimensional(int width,
int height,
double[][] in,
int dirn,
boolean overwrite)
Method to take a Complex two-dimensional FFT with the real and imaging data split format in a two-dimensional array of size [2][length] with the the i th component with real in the [0][i] element and the imaginary element in the [1][i] element. |
double[] |
twoDimensional(int width,
int height,
double[] in,
double[] out,
int dirn)
Method to take two-dimensional Complex FFT with the data supplied in a one-dimensional double array with real parts in even elements, and imaginary in the odd.Element i,j is located at Real part 2*(j*width + i) Imag part 2*(j*width + i) + 1 |
double[] |
twoDimensional(int width,
int height,
double[] in,
int dirn,
boolean overwrite)
Method to take two-dimensional Complex FFT with the data supplied in a one-dimensional double array with real parts in even elements, and imaginary in the odd Element i,j is located at Real part 2*(j*width + i) Imag part 2*(j*width + i) + 1 |
Methods inherited from class jfftw.FFTW |
---|
addPlanFlag, clearWisdom, exportWisdom, getPlanFlag, getVersion, getWisdom, loadWisdom, loadWisdom, loadWisdomFromString, readWisdom, readWisdom, setErrorStream, setPlanFlag, setSystemWisdom, writeWisdom |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FFTWComplex()
public FFTWComplex(FFTW fft)
fft
- the FFTWpublic FFTWComplex(boolean systemWisdom)
systemWisdom
- if true loads system wisdom filepublic FFTWComplex(String wisdomFile)
wisdomFile
- Method Detail |
---|
public double[] oneDimensional(double[] in, double[] out, int dirn)
double
array.
in
- the input dataout
- the output data (may be the same as in)dirn
- direction +1 for forward, -1 to backward
double[]
the output array being out
NullPointerException
- of null or zero length arrays send.
IllegalArgumentException
- of in and out arrays of different lengthpublic double[] oneDimensional(double[] in, int dirn, boolean overwrite)
double
array.
in
- the data to be transformeddirn
- direction +1 for forward, -1 to backwardoverwrite
- if true data is overwritten with FFT, else a
new array is returned.
double[]
the FFTed array
(if overwrite = true, this will overwrite the input array).public double[][] oneDimensional(double[][] in, double[][] out, int dirn)
in
- two-dimensional array, real in [0][i] and imag in [0][i]out
- two-dimensional array to return the data.dirn
- forward or inverse transform
double[][]
transformed data, being out
IllegalArgumentException
- if real and imaginary
array of different length.public double[][] oneDimensional(double[][] in, int dirn, boolean overwrite)
in
- two-dimensional array, real in [0][i] and imag in [0][i]dirn
- forward or inverse transformoverwrite
- if true transform will overwrite in,
else a new array will be created.
double[][]
transformed data.public double[] twoDimensional(int width, int height, double[] in, double[] out, int dirn)
width
- the width of the dataheight
- the height of the datain
- the input data array to be transformedout
- the output data array, may be the same as in
dirn
- direction +1 for forward, -1 to backward
double[]
the FFTed array
NullPointerException
- if null or zero length data send.
IllegalArgumentException
- if width and height
does not match the both array lengths.public double[] twoDimensional(int width, int height, double[] in, int dirn, boolean overwrite)
width
- the width of the image dataheight
- the height of the image datain
- the data to be transformeddirn
- direction +1 for forward, -1 to backwardoverwrite
- if true data is overwritten with FFT, else a
new array is returned.
double[]
the FFTed array
(if overwrite = true, this will
be the same at the input data array.public double[][] twoDimensional(int width, int height, double[][] in, double[][] out, int dirn)
width
- width of the dataheight
- height of the datain
- two-dimensional array, real in [0][i] and imag in [0][i]out
- two-dimensional array for the output.dirn
- forward or inverse transform
double[][]
transformed data
IllegalArgumentException
- if real and imaginary
array of different length, or
width*height does not match the array lengths.public double[][] twoDimensional(int width, int height, double[][] in, int dirn, boolean overwrite)
width
- width of the dataheight
- height of the datain
- two-dimensional array, real in [0][i] and imag in [0][i]dirn
- forward or inverse transformoverwrite
- in true it will overwrite the in array, else
a new array will be created.
double[][]
transformed datapublic double[] threeDimensional(int width, int height, int depth, double[] in, double[] out, int dirn)
width
- the width of the image dataheight
- the height of the image datain
- input the dataout
- the output data, may be the same as in.dirn
- direction +1 for forward, -1 to backward
IllegalArgumentException
- if width, height and depth does
not match the array length.public double[] threeDimensional(int width, int height, int depth, double[] in, int dirn, boolean overwrite)
width
- the width of the image dataheight
- the height of the image datain
- the data to be transformeddirn
- direction +1 for forward, -1 to backwardoverwrite
- if true data is overwritten with FFT, else a
new array is returned.
IllegalArgumentException
- if width, height and depth does
not match the array length.public double[][] threeDimensional(int width, int height, int depth, double[][] in, double[][] out, int dirn)
width
- width of the dataheight
- height of the datadepth
- depth of the datain
- two-dimensional array, real in [0][i] and
imag in [1][i]out
- the output array.dirn
- forward or inverse transform
double[][]
transformed data
IllegalArgumentException
- if real and imaginary
array of different length, or
width*height does not match the array lengths.public double[][] threeDimensional(int width, int height, int depth, double[][] in, int dirn, boolean overwrite)
width
- width of the dataheight
- height of the datadepth
- depth of the datain
- two-dimensional array, real in [0][i] and
imag in [1][i]dirn
- forward or inverse transformoverwrite
- if true it the output will overwrite
else a new array will be formed.
double[][]
transformed data
IllegalArgumentException
- if real and imaginary
array of different length, or
width*height does not match the array lengths.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |