public void run() { for (int s = firstSlice; s < lastSlice; s++) { for (int r = 0; r < rows; r++) { fftColumns.realForwardFull(a[s][r]); } } } });
public void run() { for (int s = firstSlice; s < lastSlice; s++) { for (int r = 0; r < rows; r++) { fftColumns.realForwardFull(a[s][r]); } } } });
/** * Computes 1D forward DFT of real data leaving the result in <code>a</code> * . This method computes the full real forward transform, i.e. you will get * the same result as from <code>complexForward</code> called with all * imaginary parts equal 0. Because the result is stored in <code>a</code>, * the size of the input array must greater or equal 2*n, with only the * first n elements filled with real data. To get back the original data, * use <code>complexInverse</code> on the output of this method. * * @param a data to transform */ public void realForwardFull(double[] a) { realForwardFull(a, 0); }
/** * Computes 1D forward DFT of real data leaving the result in <code>a</code> * . This method computes the full real forward transform, i.e. you will get * the same result as from <code>complexForward</code> called with all * imaginary parts equal 0. Because the result is stored in <code>a</code>, * the size of the input array must greater or equal 2*n, with only the * first n elements filled with real data. To get back the original data, * use <code>complexInverse</code> on the output of this method. * * @param a data to transform */ public void realForwardFull(DoubleLargeArray a) { realForwardFull(a, 0); }
/** * Computes 1D forward DFT of real data leaving the result in <code>a</code> * . This method computes the full real forward transform, i.e. you will get * the same result as from <code>complexForward</code> called with all * imaginary parts equal 0. Because the result is stored in <code>a</code>, * the size of the input array must greater or equal 2*n, with only the * first n elements filled with real data. To get back the original data, * use <code>complexInverse</code> on the output of this method. * * @param a data to transform */ public void realForwardFull(double[] a) { realForwardFull(a, 0); }
/** * Computes 1D forward DFT of real data leaving the result in <code>a</code> * . This method computes the full real forward transform, i.e. you will get * the same result as from <code>complexForward</code> called with all * imaginary parts equal 0. Because the result is stored in <code>a</code>, * the size of the input array must greater or equal 2*n, with only the * first n elements filled with real data. To get back the original data, * use <code>complexInverse</code> on the output of this method. * * @param a data to transform */ public void realForwardFull(DoubleLargeArray a) { realForwardFull(a, 0); }
public void run() { for (int s = firstSlice; s < lastSlice; s++) { int idx1 = s * sliceStride; for (int r = 0; r < rows; r++) { System.arraycopy(a, idx1 + r * rowStride, temp2[s][r], 0, columns); fftColumns.realForwardFull(temp2[s][r]); } } } });
public void run() { for (int s = firstSlice; s < lastSlice; s++) { int idx1 = s * sliceStride; for (int r = 0; r < rows; r++) { System.arraycopy(a, idx1 + r * rowStride, temp2[s][r], 0, columns); fftColumns.realForwardFull(temp2[s][r]); } } } });
double [][] newRes = new double[samplesPerWindow*2][Matrixres.numberOfSegments]; double [] colForFFT = new double [samplesPerWindow*2]; DoubleFFT_1D fft = new DoubleFFT_1D(samplesPerWindow); for(int y = 0; y < Matrixres.numberOfSegments; y++) { //copy the original col into a col and and a col of zeros before FFT for(int x = 0; x < samplesPerWindow; x++) { colForFFT[x] = Matrixres.res[x][y]; } //fft on each col of the matrix fft.realForwardFull(colForFFT); //Y=fft(y,nfft); //copy the output of col*2 size into a new matrix for(int x = 0; x < samplesPerWindow*2; x++) { newRes[x][y] = colForFFT[x]; } }
public void run() { double[] temp = new double[twon3]; for (int s = firstSlice; s >= lastSlice; s--) { int idx1 = s * sliceStride; int idx2 = s * twoSliceStride; for (int r = rows - 1; r >= 0; r--) { System.arraycopy(a, idx1 + r * rowStride, temp, 0, columns); fftColumns.realForwardFull(temp); System.arraycopy(temp, 0, a, idx2 + r * twoRowStride, twon3); } } } });
public void run() { double[] temp = new double[twon3]; for (int s = firstSlice; s >= lastSlice; s--) { int idx1 = s * sliceStride; int idx2 = s * twoSliceStride; for (int r = rows - 1; r >= 0; r--) { System.arraycopy(a, idx1 + r * rowStride, temp, 0, columns); fftColumns.realForwardFull(temp); System.arraycopy(temp, 0, a, idx2 + r * twoRowStride, twon3); } } } });
public void run() { for (long s = firstSlice; s < lastSlice; s++) { long idx1 = s * sliceStridel; for (long r = 0; r < rowsl; r++) { LargeArrayUtils.arraycopy(a, idx1 + r * rowStridel, temp2, s * rowsl * twon3 + r * twon3, columnsl); fftColumns.realForwardFull(temp2, s * rowsl * twon3 + r * twon3); } } } });
public void run() { for (long s = firstSlice; s < lastSlice; s++) { long idx1 = s * sliceStridel; for (long r = 0; r < rowsl; r++) { LargeArrayUtils.arraycopy(a, idx1 + r * rowStridel, temp2, s * rowsl * twon3 + r * twon3, columnsl); fftColumns.realForwardFull(temp2, s * rowsl * twon3 + r * twon3); } } } });
public void run() { for (int r = firstRow; r < lastRow; r++) { double[] row = new double[2 * columns]; System.arraycopy(elements[r], 0, row, 0, columns); fftRows.realForwardFull(row); C.viewRow(r).assign(row); } } });
x = new double[(int) (2 * sizes1D[i])]; IOUtils.fillMatrix_1D(sizes1D[i], x); fft.realForwardFull(x); IOUtils.fillMatrix_1D(sizes1D[i], x); fft.realForwardFull(x); IOUtils.fillMatrix_1D(sizes1D[i], x); elapsedTime = System.nanoTime(); fft.realForwardFull(x); elapsedTime = System.nanoTime() - elapsedTime; if (elapsedTime < min_time) {
x = new double[(int) (2 * sizes1D[i])]; IOUtils.fillMatrix_1D(sizes1D[i], x); fft.realForwardFull(x); IOUtils.fillMatrix_1D(sizes1D[i], x); fft.realForwardFull(x); IOUtils.fillMatrix_1D(sizes1D[i], x); elapsedTime = System.nanoTime(); fft.realForwardFull(x); elapsedTime = System.nanoTime() - elapsedTime; if (elapsedTime < min_time) {
public void run() { DoubleLargeArray temp = new DoubleLargeArray(twon3); for (long s = firstSlice; s >= lastSlice; s--) { long idx1 = s * sliceStridel; long idx2 = s * twoSliceStride; for (long r = rowsl - 1; r >= 0; r--) { LargeArrayUtils.arraycopy(a, idx1 + r * rowStridel, temp, 0, columnsl); fftColumns.realForwardFull(temp); LargeArrayUtils.arraycopy(temp, 0, a, idx2 + r * twoRowStride, twon3); } } } });
public void run() { DoubleLargeArray temp = new DoubleLargeArray(twon3); for (long s = firstSlice; s >= lastSlice; s--) { long idx1 = s * sliceStridel; long idx2 = s * twoSliceStride; for (long r = rowsl - 1; r >= 0; r--) { LargeArrayUtils.arraycopy(a, idx1 + r * rowStridel, temp, 0, columnsl); fftColumns.realForwardFull(temp); LargeArrayUtils.arraycopy(temp, 0, a, idx2 + r * twoRowStride, twon3); } } } });
public void run() { for (int c = firstCol; c < lastColumn; c++) { double[] column = new double[2 * rows]; System.arraycopy(viewColumn(c).copy().elements(), 0, column, 0, rows); fftColumns.realForwardFull(column); C.viewColumn(c).assign(column); } } });
/** * Returns new complex matrix which is the discrete Fourier transform (DFT) * of this matrix. * * @return the discrete Fourier transform (DFT) of this matrix. */ public DenseDComplexMatrix1D getFft() { int oldNthreads = ConcurrencyUtils.getNumberOfThreads(); ConcurrencyUtils.setNumberOfThreads(ConcurrencyUtils.nextPow2(oldNthreads)); final double[] elems; if (isNoView == true) { elems = elements; } else { elems = (double[]) this.copy().elements(); } DenseDComplexMatrix1D c = new DenseDComplexMatrix1D(size); final double[] elementsC = (c).elements(); System.arraycopy(elems, 0, elementsC, 0, size); if (fft == null) { fft = new DoubleFFT_1D(size); } fft.realForwardFull(elementsC); ConcurrencyUtils.setNumberOfThreads(oldNthreads); return c; }