Package jfftw

Examples of jfftw.FFTWComplex


    for(int i = 0; i < width*height; i++) {
        ArrayUtil.setComplex(data,i,Math.random(),Math.random());
    }

    //          Form the FFTWComplex do do the work
    FFTWComplex fft = new FFTWComplex();


    //    Take out-of -place forward fft, does not alter the data[]
    //    array.
    double[] ft = fft.twoDimensional(width,height,data,1,false);
        
    //    Take in place backwords fft 
    fft.twoDimensional(width,height,ft,-1,true);
   
    // Normalise...   (no default normalsiation when using FFTW)
   
    ArrayUtil.mult(ft,1.0/(width*height));

 
View Full Code Here


        data[i] = (float)Math.random();
        data[i+1] = (float)Math.random();
    }

    //          Form the FFTWComplex do do the work
    FFTWComplex fft = new FFTWComplex();


    //    Take out-of -place forward fft, does not alter the data[]
    //    array.
    float[] ft = fft.twoDimensional(width,height,data,1,false);
        
    //    Take in place backwords fft 
    fft.twoDimensional(width,height,ft,-1,true);
   
    // Normalise...   (no default normalsiation when using FFTW)
   
    ArrayUtil.mult(ft,(float)(1.0/(width*height)));
    //for(int i = 0; i<ft.length; i++) {
View Full Code Here

    //        Make a split array with specifed real and
    //        null imaginary, which defaults to zero
    double[][] dataSplit = ArrayUtil.split(rp,null);

    //         Make Complex FFT
    FFTWComplex fft = new FFTWComplex();

    //         FFT both formats, one in-place, other out-of-place
    //
    dataInterleave = fft.twoDimensional(width,height,dataInterleave,1,true);
    dataSplit = fft.twoDimensional(width,height,dataSplit,1,false);

    //         Form difference bwteeen modulus square (should be zero).
    double diff = 0.0;
    for(int i = 0; i < width*height; i++) {
        double a = ArrayUtil.getComplex(dataInterleave,i).modulusSq();
View Full Code Here

TOP

Related Classes of jfftw.FFTWComplex

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.