Here you can find the source of array2dTo1d(float[][] in)
public static float[] array2dTo1d(float[][] in)
//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; } }