Here you can find the source of bitrv2conj(int n, int[] ip, double[] a, int offa)
public static void bitrv2conj(int n, int[] ip, double[] a, int offa)
//package com.java2s; /* ***** BEGIN LICENSE BLOCK ***** * JTransforms/*from w w w.j a va 2s . c o m*/ * Copyright (c) 2007 onward, Piotr Wendykier * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * ***** END LICENSE BLOCK ***** */ public class Main { public static void bitrv2conj(int n, int[] ip, double[] a, int offa) { int j1, k1, l, m, nh, nm; double xr, xi, yr, yi; int idx0, idx1, idx2; m = 1; for (l = n >> 2; l > 8; l >>= 2) { m <<= 1; } nh = n >> 1; nm = 4 * m; if (l == 8) { for (int k = 0; k < m; k++) { idx0 = 4 * k; for (int j = 0; j < k; j++) { j1 = 4 * j + 2 * ip[m + k]; k1 = idx0 + 2 * ip[m + j]; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nm; k1 += 2 * nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nm; k1 -= nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nm; k1 += 2 * nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nh; k1 += 2; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nm; k1 -= 2 * nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nm; k1 += nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nm; k1 -= 2 * nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += 2; k1 += nh; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nm; k1 += 2 * nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nm; k1 -= nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nm; k1 += 2 * nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nh; k1 -= 2; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nm; k1 -= 2 * nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nm; k1 += nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nm; k1 -= 2 * nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; } k1 = idx0 + 2 * ip[m + k]; j1 = k1 + 2; k1 += nh; idx1 = offa + j1; idx2 = offa + k1; a[idx1 - 1] = -a[idx1 - 1]; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; a[idx2 + 3] = -a[idx2 + 3]; j1 += nm; k1 += 2 * nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nm; k1 -= nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= 2; k1 -= nh; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nh + 2; k1 += nh + 2; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nh - nm; k1 += 2 * nm - 2; idx1 = offa + j1; idx2 = offa + k1; a[idx1 - 1] = -a[idx1 - 1]; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; a[idx2 + 3] = -a[idx2 + 3]; } } else { for (int k = 0; k < m; k++) { idx0 = 4 * k; for (int j = 0; j < k; j++) { j1 = 4 * j + ip[m + k]; k1 = idx0 + ip[m + j]; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nm; k1 += nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nh; k1 += 2; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nm; k1 -= nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += 2; k1 += nh; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nm; k1 += nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nh; k1 -= 2; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nm; k1 -= nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; } k1 = idx0 + ip[m + k]; j1 = k1 + 2; k1 += nh; idx1 = offa + j1; idx2 = offa + k1; a[idx1 - 1] = -a[idx1 - 1]; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; a[idx2 + 3] = -a[idx2 + 3]; j1 += nm; k1 += nm; idx1 = offa + j1; idx2 = offa + k1; a[idx1 - 1] = -a[idx1 - 1]; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; a[idx2 + 3] = -a[idx2 + 3]; } } } public static void bitrv2conj(int n, int[] ip, float[] a, int offa) { int j1, k1, l, m, nh, nm; float xr, xi, yr, yi; int idx0, idx1, idx2; m = 1; for (l = n >> 2; l > 8; l >>= 2) { m <<= 1; } nh = n >> 1; nm = 4 * m; if (l == 8) { for (int k = 0; k < m; k++) { idx0 = 4 * k; for (int j = 0; j < k; j++) { j1 = 4 * j + 2 * ip[m + k]; k1 = idx0 + 2 * ip[m + j]; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nm; k1 += 2 * nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nm; k1 -= nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nm; k1 += 2 * nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nh; k1 += 2; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nm; k1 -= 2 * nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nm; k1 += nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nm; k1 -= 2 * nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += 2; k1 += nh; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nm; k1 += 2 * nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nm; k1 -= nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nm; k1 += 2 * nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nh; k1 -= 2; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nm; k1 -= 2 * nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nm; k1 += nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nm; k1 -= 2 * nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; } k1 = idx0 + 2 * ip[m + k]; j1 = k1 + 2; k1 += nh; idx1 = offa + j1; idx2 = offa + k1; a[idx1 - 1] = -a[idx1 - 1]; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; a[idx2 + 3] = -a[idx2 + 3]; j1 += nm; k1 += 2 * nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nm; k1 -= nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= 2; k1 -= nh; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nh + 2; k1 += nh + 2; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nh - nm; k1 += 2 * nm - 2; idx1 = offa + j1; idx2 = offa + k1; a[idx1 - 1] = -a[idx1 - 1]; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; a[idx2 + 3] = -a[idx2 + 3]; } } else { for (int k = 0; k < m; k++) { idx0 = 4 * k; for (int j = 0; j < k; j++) { j1 = 4 * j + ip[m + k]; k1 = idx0 + ip[m + j]; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nm; k1 += nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nh; k1 += 2; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nm; k1 -= nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += 2; k1 += nh; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 += nm; k1 += nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nh; k1 -= 2; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; j1 -= nm; k1 -= nm; idx1 = offa + j1; idx2 = offa + k1; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; } k1 = idx0 + ip[m + k]; j1 = k1 + 2; k1 += nh; idx1 = offa + j1; idx2 = offa + k1; a[idx1 - 1] = -a[idx1 - 1]; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; a[idx2 + 3] = -a[idx2 + 3]; j1 += nm; k1 += nm; idx1 = offa + j1; idx2 = offa + k1; a[idx1 - 1] = -a[idx1 - 1]; xr = a[idx1]; xi = -a[idx1 + 1]; yr = a[idx2]; yi = -a[idx2 + 1]; a[idx1] = yr; a[idx1 + 1] = yi; a[idx2] = xr; a[idx2 + 1] = xi; a[idx2 + 3] = -a[idx2 + 3]; } } } }