Java Array One Dimension to Two Dimension array1Dto2D(int m, int n, double[] b)

Here you can find the source of array1Dto2D(int m, int n, double[] b)

Description

array Dto D

License

Open Source License

Declaration

public static double[][] array1Dto2D(int m, int n, double[] b) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static double[][] array1Dto2D(int m, int n, double[] b) {
        int i, j;
        double a[][];

        a = new double[m][n];
        for (i = 0; i < m; i++)
            for (j = 0; j < n; j++)
                a[i][j] = b[i * n + j];/*w  w  w.j av  a2s .  c o m*/

        return a;
    }
}

Related

  1. array1DTo2D(double[] In, int H)
  2. array1DTo2D(final Object data, final int bitpix, final int width, final int height)
  3. array1dTo2d(float[] in, int firstDim)
  4. array1DTo2D(int[] array1D)
  5. array1Dto2D(int[] d1, int imageWidth, int imageHeight)
  6. array2multidim(float[] arr, int width, int height)
  7. ArrayOutOfMultiDimArray(String _sMultiDimArray[][], int _index)