@Test public void auto_test12(){ double[] v1 = new double[]{2, 2, 2, 8, 6, -1, 3, -9, -7, 3}; double[] v2 = new double[]{0, -2, 3, 0, 8, -8, -1, 3, -7, 7}; double res = L1.distance(v1, v2); double ref = 44; Asserts.assertDistance(ref); Asserts.assertEquals(res, ref); }
public static double distance(double[] v1, double[] v2){ Asserts.assertEqualLength(v1, v2); double res = 0; int i = 0; while(i < v1.length){ double t = CommonStats.abs(v1[i] - v2[i]); res += t; i++; } Asserts.assertDistance(res); return res; }
L1 { public static double distance(double[] v1, double[] v2){ Asserts.assertEqualLength(v1, v2); double res = 0; int i = 0; while(i < v1.length){ double t = CommonStats.abs(v1[i] - v2[i]); res += t; i++; } Asserts.assertDistance(res); return res; } }
L1 { public static double distance(double[] v1, double[] v2){ Asserts.assertEqualLength(v1, v2); double res = 0; int i = 0; while(i < v1.length){ double t = CommonStats.abs(v1[i] - v2[i]); res += t; i++; } Asserts.assertDistance(res); return res; }  }
L1 { public static double distance(double[] v1, double[] v2){ Asserts.assertEqualLength(v1, v2); double res = 0; int i = 0; while(i < v1.length){ double t = CommonStats.abs(v1[i] - v2[i]); res += t; i++; } Asserts.assertDistance(res); return res; }  static double distance(double[] v1, double[] v2); }
L1 { public static double distance(double[] v1, double[] v2){ Asserts.assertEqualLength(v1, v2); double res = 0; int i = 0; while(i < v1.length){ double t = CommonStats.abs(v1[i] - v2[i]); res += t; i++; } Asserts.assertDistance(res); return res; }  static double distance(double[] v1, double[] v2);  }