math.fourierTransforms
Class DFT

java.lang.Object
  extended by math.fourierTransforms.DFT

public class DFT
extends java.lang.Object

Copyright 2005, DocJava, Inc. User: dlyon Date: Oct 31, 2005 Time: 1:26:24 PM Totally self-contained DFT example. This is an O(N**2) algorithm that works for any value of N.


Constructor Summary
DFT(int N)
           
 
Method Summary
 double[] dft(double[] inputData)
          Do a FFTR2Double via direct methods.
 double[] getPowerSpectralDensity()
           
 double[] idft()
           
static void main(java.lang.String[] args)
           
static void testDFT()
          Test the DFT using a small number of samples.
static void testDFT2(double offset)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DFT

public DFT(int N)
Method Detail

dft

public double[] dft(double[] inputData)
Do a FFTR2Double via direct methods. This is an O(N**2) time algorithm.

Parameters:
inputData - input real numbers.
Returns:
PSD

idft

public double[] idft()

getPowerSpectralDensity

public double[] getPowerSpectralDensity()
Returns:
the square of the psd

testDFT

public static void testDFT()
Test the DFT using a small number of samples. This is an O(N**2) algorithm.


testDFT2

public static void testDFT2(double offset)

main

public static void main(java.lang.String[] args)