|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.numerics.FFTReal
public class FFTReal
FFTReal computes the discrete Fourier coefficients a[0], ...., a[N/2] and b[1], ...., b[N/2 - 1] of the discrete partial Fourier sum a[0] + a[1]*cos(N/2*omega*x) + Sum (k=1,2,...,N/2-1) (a[2*k] * cos(k * omega * x) + a[2*k+1] * sin(k * omega * x)) given real functional values y[0], ...., y[N-1]. Adapted by W. Christian for use in the OSP project.
Constructor Summary | |
---|---|
FFTReal()
Constructs a real FFT transformation for n data points. |
|
FFTReal(int n)
Constructs a real FFT transformation for n data points. |
Method Summary | |
---|---|
double[] |
backtransform(double[] data)
Computes the (unnomalized) inverse FFT of data, leaving it in place. |
int |
getN()
Gets the number of data points. |
double[] |
getNaturalFreq(double delta)
Gets an array containing the frequencies in natural order. |
double[] |
getNaturalFreq(double xmin,
double xmax)
Gets an array containing the frequencies in natural order. |
double[] |
getNaturalOmega(double delta)
Gets an array containing the frequencies in natural order. |
double[] |
getNaturalOmega(double xmin,
double xmax)
Gets an array containing the frequencies in natural order. |
double[] |
inverse(double[] data)
Computes the (nomalized) inverse FFT of data, leaving it in place. |
void |
setN(int n)
Sets the number of data points. |
double[] |
transform(double[] data)
Computes the Fast Fourier Transform of the data leaving the result in data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FFTReal()
public FFTReal(int n)
n
- the number of data pointsMethod Detail |
---|
public void setN(int n)
n
- intpublic int getN()
public double[] transform(double[] data)
data
- double[] the data to be transformed
public double[] backtransform(double[] data)
data
- double[] the data to be transformed
public double[] inverse(double[] data)
data
- double[] the data to be transformed
public double[] getNaturalFreq(double delta)
delta
-
public double[] getNaturalFreq(double xmin, double xmax)
xmin
- xmax
-
public double[] getNaturalOmega(double delta)
delta
-
public double[] getNaturalOmega(double xmin, double xmax)
xmin
- xmax
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |