/** * Returns the specified Fourier mode of the transformed data. The data * array results from a call to {@link FloatFFT_2D#realForward(float[][])} . * * @param r * the row index * @param c * the column index * @param packed * the transformed data * * @return the value of the <code>[r][c]</code> Fourier mode */ public float unpack(final int r, final int c, final float[][] packed) { final int index = getIndex(r, c); if (index >= 0) { return packed[index / columns][index % columns]; } else if (index > Integer.MIN_VALUE) { return -packed[(-index) / columns][(-index) % columns]; } else { return ZERO; } } }
/** * Returns the specified Fourier mode of the transformed data. The data * array results from a call to {@link FloatFFT_2D#realForward(float[][])} . * * @param r * the row index * @param c * the column index * @param packed * the transformed data * * @return the value of the <code>[r][c]</code> Fourier mode */ public float unpack(final int r, final int c, final float[][] packed) { final int index = getIndex(r, c); if (index >= 0) { return packed[index / columns][index % columns]; } else if (index > Integer.MIN_VALUE) { return -packed[(-index) / columns][(-index) % columns]; } else { return ZERO; } } }
/** * Returns the specified Fourier mode of the transformed data. The data * array results from a call to {@link DoubleFFT_2D#realForward(double[][])} * . * * @param r * the row index * @param c * the column index * @param packed * the transformed data * * @return the value of the <code>[r][c]</code> Fourier mode */ public double unpack(final int r, final int c, final double[][] packed) { final int index = getIndex(r, c); if (index >= 0) { return packed[index / columns][index % columns]; } else if (index > Integer.MIN_VALUE) { return -packed[(-index) / columns][(-index) % columns]; } else { return ZERO; } }
/** * Returns the specified Fourier mode of the transformed data. The data * array results from a call to {@link DoubleFFT_2D#realForward(double[][])} * . * * @param r * the row index * @param c * the column index * @param packed * the transformed data * * @return the value of the <code>[r][c]</code> Fourier mode */ public double unpack(final int r, final int c, final double[][] packed) { final int index = getIndex(r, c); if (index >= 0) { return packed[index / columns][index % columns]; } else if (index > Integer.MIN_VALUE) { return -packed[(-index) / columns][(-index) % columns]; } else { return ZERO; } }
/** * Returns the specified Fourier mode of the transformed data. The data * array results from a call to {@link FloatFFT_2D#realForward(float[])} * . * * @param r * the row index * @param c * the column index * @param packed * the transformed data * @param pos * index of the first element in array <code>packed</code> * * @return the value of the <code>[r][c]</code> Fourier mode */ public float unpack(final int r, final int c, final float[] packed, final int pos) { final int index = getIndex(r, c); if (index >= 0) { return packed[pos + index]; } else if (index > Integer.MIN_VALUE) { return -packed[pos - index]; } else { return ZERO; } }
/** * Returns the specified Fourier mode of the transformed data. The data * array results from a call to {@link FloatFFT_2D#realForward(float[])} * . * * @param r * the row index * @param c * the column index * @param packed * the transformed data * @param pos * index of the first element in array <code>packed</code> * * @return the value of the <code>[r][c]</code> Fourier mode */ public float unpack(final int r, final int c, final float[] packed, final int pos) { final int index = getIndex(r, c); if (index >= 0) { return packed[pos + index]; } else if (index > Integer.MIN_VALUE) { return -packed[pos - index]; } else { return ZERO; } }
/** * Returns the specified Fourier mode of the transformed data. The data * array results from a call to {@link DoubleFFT_2D#realForward(double[])}. * * @param r * the row index * @param c * the column index * @param packed * the transformed data * @param pos * index of the first element in array <code>packed</code> * * @return the value of the <code>[r][c]</code> Fourier mode */ public double unpack(final int r, final int c, final double[] packed, final int pos) { final int index = getIndex(r, c); if (index >= 0) { return packed[pos + index]; } else if (index > Integer.MIN_VALUE) { return -packed[pos - index]; } else { return ZERO; } }
/** * Returns the specified Fourier mode of the transformed data. The data * array results from a call to {@link DoubleFFT_2D#realForward(double[])}. * * @param r * the row index * @param c * the column index * @param packed * the transformed data * @param pos * index of the first element in array <code>packed</code> * * @return the value of the <code>[r][c]</code> Fourier mode */ public double unpack(final int r, final int c, final double[] packed, final int pos) { final int index = getIndex(r, c); if (index >= 0) { return packed[pos + index]; } else if (index > Integer.MIN_VALUE) { return -packed[pos - index]; } else { return ZERO; } }
/** * Sets the specified Fourier mode of the transformed data. The data array * results from a call to {@link FloatFFT_2D#realForward(float[][])}. * * @param val * the new value of the <code>[r][c]</code> Fourier mode * @param r * the row index * @param c * the column index * @param packed * the transformed data */ public void pack(final float val, final int r, final int c, final float[][] packed) { final int index = getIndex(r, c); if (index >= 0) { packed[index / columns][index % columns] = val; } else if (index > Integer.MIN_VALUE) { packed[(-index) / columns][(-index) % columns] = -val; } else { throw new IllegalArgumentException( String.format( "[%d][%d] component cannot be modified (always zero)", r, c)); } }
/** * Sets the specified Fourier mode of the transformed data. The data array * results from a call to {@link FloatFFT_2D#realForward(float[][])}. * * @param val * the new value of the <code>[r][c]</code> Fourier mode * @param r * the row index * @param c * the column index * @param packed * the transformed data */ public void pack(final float val, final int r, final int c, final float[][] packed) { final int index = getIndex(r, c); if (index >= 0) { packed[index / columns][index % columns] = val; } else if (index > Integer.MIN_VALUE) { packed[(-index) / columns][(-index) % columns] = -val; } else { throw new IllegalArgumentException( String.format( "[%d][%d] component cannot be modified (always zero)", r, c)); } }
/** * Sets the specified Fourier mode of the transformed data. The data array * results from a call to {@link DoubleFFT_2D#realForward(double[][])}. * * @param val * the new value of the <code>[r][c]</code> Fourier mode * @param r * the row index * @param c * the column index * @param packed * the transformed data */ public void pack(final double val, final int r, final int c, final double[][] packed) { final int index = getIndex(r, c); if (index >= 0) { packed[index / columns][index % columns] = val; } else if (index > Integer.MIN_VALUE) { packed[(-index) / columns][(-index) % columns] = -val; } else { throw new IllegalArgumentException( String.format( "[%d][%d] component cannot be modified (always zero)", r, c)); } }
/** * Sets the specified Fourier mode of the transformed data. The data array * results from a call to {@link FloatFFT_2D#realForward(float[])}. * * @param val * the new value of the <code>[r][c]</code> Fourier mode * @param r * the row index * @param c * the column index * @param packed * the transformed data * @param pos * index of the first element in array <code>packed</code> */ public void pack(final float val, final int r, final int c, final float[] packed, final int pos) { final int index = getIndex(r, c); if (index >= 0) { packed[pos + index] = val; } else if (index > Integer.MIN_VALUE) { packed[pos - index] = -val; } else { throw new IllegalArgumentException( String.format( "[%d][%d] component cannot be modified (always zero)", r, c)); } }
/** * Sets the specified Fourier mode of the transformed data. The data array * results from a call to {@link DoubleFFT_2D#realForward(double[])}. * * @param val * the new value of the <code>[r][c]</code> Fourier mode * @param r * the row index * @param c * the column index * @param packed * the transformed data * @param pos * index of the first element in array <code>packed</code> */ public void pack(final double val, final int r, final int c, final double[] packed, final int pos) { final int index = getIndex(r, c); if (index >= 0) { packed[pos + index] = val; } else if (index > Integer.MIN_VALUE) { packed[pos - index] = -val; } else { throw new IllegalArgumentException( String.format( "[%d][%d] component cannot be modified (always zero)", r, c)); } }
/** * Sets the specified Fourier mode of the transformed data. The data array * results from a call to {@link DoubleFFT_2D#realForward(double[])}. * * @param val * the new value of the <code>[r][c]</code> Fourier mode * @param r * the row index * @param c * the column index * @param packed * the transformed data * @param pos * index of the first element in array <code>packed</code> */ public void pack(final double val, final int r, final int c, final double[] packed, final int pos) { final int index = getIndex(r, c); if (index >= 0) { packed[pos + index] = val; } else if (index > Integer.MIN_VALUE) { packed[pos - index] = -val; } else { throw new IllegalArgumentException( String.format( "[%d][%d] component cannot be modified (always zero)", r, c)); } }
/** * Sets the specified Fourier mode of the transformed data. The data array * results from a call to {@link FloatFFT_2D#realForward(float[])}. * * @param val * the new value of the <code>[r][c]</code> Fourier mode * @param r * the row index * @param c * the column index * @param packed * the transformed data * @param pos * index of the first element in array <code>packed</code> */ public void pack(final float val, final int r, final int c, final float[] packed, final int pos) { final int index = getIndex(r, c); if (index >= 0) { packed[pos + index] = val; } else if (index > Integer.MIN_VALUE) { packed[pos - index] = -val; } else { throw new IllegalArgumentException( String.format( "[%d][%d] component cannot be modified (always zero)", r, c)); } }
/** * Sets the specified Fourier mode of the transformed data. The data array * results from a call to {@link DoubleFFT_2D#realForward(double[][])}. * * @param val * the new value of the <code>[r][c]</code> Fourier mode * @param r * the row index * @param c * the column index * @param packed * the transformed data */ public void pack(final double val, final int r, final int c, final double[][] packed) { final int index = getIndex(r, c); if (index >= 0) { packed[index / columns][index % columns] = val; } else if (index > Integer.MIN_VALUE) { packed[(-index) / columns][(-index) % columns] = -val; } else { throw new IllegalArgumentException( String.format( "[%d][%d] component cannot be modified (always zero)", r, c)); } }
/** * Sets the specified Fourier mode of the transformed data. The data array * results from a call to {@link DoubleFFT_2D#realForward(DoubleLargeArray)}. * * @param val * the new value of the <code>[r][c]</code> Fourier mode * @param r * the row index * @param c * the column index * @param packed * the transformed data * @param pos * index of the first element in array <code>packed</code> */ public void pack(final double val, final long r, final long c, final DoubleLargeArray packed, final long pos) { final long index = getIndex(r, c); if (index >= 0) { packed.setDouble(pos + index, val); } else if (index > Long.MIN_VALUE) { packed.setDouble(pos - index, -val); } else { throw new IllegalArgumentException( String.format( "[%d][%d] component cannot be modified (always zero)", r, c)); } }
/** * Sets the specified Fourier mode of the transformed data. The data array * results from a call to {@link FloatFFT_2D#realForward(FloatLargeArray)}. * * @param val * the new value of the <code>[r][c]</code> Fourier mode * @param r * the row index * @param c * the column index * @param packed * the transformed data * @param pos * index of the first element in array <code>packed</code> */ public void pack(final float val, final long r, final long c, final FloatLargeArray packed, final long pos) { final long index = getIndex(r, c); if (index >= 0) { packed.setFloat(pos + index, val); } else if (index > Long.MIN_VALUE) { packed.setFloat(pos - index, -val); } else { throw new IllegalArgumentException( String.format( "[%d][%d] component cannot be modified (always zero)", r, c)); } }
/** * Sets the specified Fourier mode of the transformed data. The data array * results from a call to {@link FloatFFT_2D#realForward(FloatLargeArray)}. * * @param val * the new value of the <code>[r][c]</code> Fourier mode * @param r * the row index * @param c * the column index * @param packed * the transformed data * @param pos * index of the first element in array <code>packed</code> */ public void pack(final float val, final long r, final long c, final FloatLargeArray packed, final long pos) { final long index = getIndex(r, c); if (index >= 0) { packed.setFloat(pos + index, val); } else if (index > Long.MIN_VALUE) { packed.setFloat(pos - index, -val); } else { throw new IllegalArgumentException( String.format( "[%d][%d] component cannot be modified (always zero)", r, c)); } }
/** * Sets the specified Fourier mode of the transformed data. The data array * results from a call to {@link DoubleFFT_2D#realForward(DoubleLargeArray)}. * * @param val * the new value of the <code>[r][c]</code> Fourier mode * @param r * the row index * @param c * the column index * @param packed * the transformed data * @param pos * index of the first element in array <code>packed</code> */ public void pack(final double val, final long r, final long c, final DoubleLargeArray packed, final long pos) { final long index = getIndex(r, c); if (index >= 0) { packed.setDouble(pos + index, val); } else if (index > Long.MIN_VALUE) { packed.setDouble(pos - index, -val); } else { throw new IllegalArgumentException( String.format( "[%d][%d] component cannot be modified (always zero)", r, c)); } }