Java tutorial
//package com.java2s; public class Main { public static void flatten_2D_vector(float[][] src_vec, float[] target_vec) { int height = src_vec.length; int width = src_vec[0].length; for (int i = 0; i < height; i++) { System.arraycopy(src_vec[i], 0, target_vec, i * width, width); } } }