2 public int M, N; //M = height, N = width
3 public double[][] dataRe;
4 public double[][] dataIm;
6 public Matrix(int M, int N) {
9 dataRe = global new double[M][N];
10 dataIm = global new double[M][N];
13 public void setValues(double[] inputRe, double[] inputIm) {
14 for (int i = 0; i<M; i++) {
15 double dataRei[] = dataRe[i];
16 double dataImi[] = dataIm[i];
17 for(int j = 0; j<N; j++) {
18 dataRei[j] = inputRe[i * N +j];
19 dataImi[j] = inputIm[i * N +j];
24 //Transpose matrix input.
25 private float[][] transpose(float[][] input) {
26 float[][] output = new float[N][M];
28 for (int j = 0; j < N; j++)
29 for (int i = 0; i < M; i++)
30 output[j][i] = input[i][j];
33 } // End of function transpose().