Java Array Two Dimension to One Dimension array2Dto1D(int m, int n, double[][] a)

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

Description

array Dto D

License

Open Source License

Declaration

public static double[] array2Dto1D(int m, int n, double[][] a) 

Method Source Code

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

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

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

        return b;
    }
}

Related

  1. array2dcopy(final String[][] src, final String[][] target)
  2. array2dCopy(Object[][] src, Object[][] dest)
  3. array2DTo1D(double[][] In)
  4. array2dTo1d(float[][] in)
  5. array2DTo1D(int[][] array2D)
  6. array2Dto1D(int[][] d2)
  7. array2Square(short[] ar, int rows, int cols)