* @param scale
     *            if true then scaling is performed
     */
    public void realInverseFull(final float[] a, final int offa, boolean scale) {
        final int twon = 2 * n;
        switch (plan) {
        case SPLIT_RADIX:
            realInverse2(a, offa, scale);
            int nthreads = ConcurrencyUtils.getNumberOfThreads();
            if ((nthreads > 1) && (n / 2 > ConcurrencyUtils.getThreadsBeginN_1D_FFT_2Threads())) {
                Future<?>[] futures = new Future[nthreads];
                int k = n / 2 / nthreads;
                for (int i = 0; i < nthreads; i++) {
                    final int firstIdx = i * k;
                    final int lastIdx = (i == (nthreads - 1)) ? n / 2 : firstIdx + k;
                    futures[i] = ConcurrencyUtils.submit(new Runnable() {
                        public void run() {
                            int idx1, idx2;
                            for (int k = firstIdx; k < lastIdx; k++) {
                                idx1 = 2 * k;
                                idx2 = offa + ((twon - idx1) % twon);
                                a[idx2] = a[offa + idx1];
                                a[idx2 + 1] = -a[offa + idx1 + 1];
                            }
                        }
                    });
                }
                ConcurrencyUtils.waitForCompletion(futures);
            } else {
                int idx1, idx2;
                for (int k = 0; k < n / 2; k++) {
                    idx1 = 2 * k;
                    idx2 = offa + ((twon - idx1) % twon);
                    a[idx2] = a[offa + idx1];
                    a[idx2 + 1] = -a[offa + idx1 + 1];
                }
            }
            a[offa + n] = -a[offa + 1];
            a[offa + 1] = 0;
            break;
        case MIXED_RADIX:
            rfftf(a, offa);
            if (scale) {
                scale(n, a, offa, false);
            }
            int m;
            if (n % 2 == 0) {
                m = n / 2;
            } else {
                m = (n + 1) / 2;
            }
            for (int k = 1; k < m; k++) {
                int idx1 = offa + 2 * k;
                int idx2 = offa + twon - 2 * k;
                a[idx1] = -a[idx1];
                a[idx2 + 1] = -a[idx1];
                a[idx2] = a[idx1 - 1];
            }
            for (int k = 1; k < n; k++) {
                int idx = offa + n - k;
                float tmp = a[idx + 1];
                a[idx + 1] = a[idx];
                a[idx] = tmp;
            }
            a[offa + 1] = 0;
            break;
        case BLUESTEIN:
            bluestein_real_full(a, offa, 1);
            if (scale) {
                scale(n, a, offa, true);
            }
            break;
        }
    }