Java Array Two Dimension to One Dimension array2dTo1d(float[][] in)

Here you can find the source of array2dTo1d(float[][] in)

Description

arrayd Tod

License

Open Source License

Declaration

public static float[] array2dTo1d(float[][] in) 

Method Source Code

//package com.java2s;
/** Ben F Rayfield offers this software opensource MIT license */

public class Main {
    public static float[] array2dTo1d(float[][] in) {
        int b = in.length, c = in[0].length;
        float[] out = new float[b * c];
        for (int i = 0; i < b; i++) {
            System.arraycopy(in[i], 0, out, i * c, c);
        }/*from w  w w. j  a  v a  2  s  .c o  m*/
        return out;
    }
}

Related

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