绑定两个线性阵列,生成2D阵列。
/* 时代Java公众号 - N o w J a v a . c o m 提 供 */ public class Main{ /** * Binds two linear arrays, producing a 2D array. * * @param axis The first component array. * @param seriesData The second component array. * @return Binded rows. * @throws DTWException If error occures. */ public static double[][] rBind(double[] axis, double[] seriesData) throws DTWException { if (axis.length == seriesData.length) { int len = axis.length; double[][] res = new double[len][2]; for (int i = 0; i < len; i++) { res[i][0] = axis[i]; res[i][1] = seriesData[i]; }/* 来自 n o w j a v a . c o m - 时 代 Java*/