@Test public void auto_test33(){ double[] v1 = new double[]{-583.6528153667402, 654.160661736122, -795.067976795603, 868.0351943259689, 876.4048506304795, -741.9932073340555, 99.36182841946794, -981.1344838116098, -839.2146304650907, -949.296937678108}; double[] v2 = new double[]{852.3261288115648, -217.82590522238365, -588.6591730728256, 348.0956061128896, -544.9263019345276, -6.628416139133786, 610.7716839053119, 682.4712875081226, 947.6050372424996, 464.6765791266068}; double res = L1.distance(v1, v2); double ref = 10566.818658150478; 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);  }