@Test public void auto_test17(){ double[] v1 = new double[]{821, 270, 208, -913, 514, 798, -904, -485, -231, -103}; double[] v2 = new double[]{-343, -540, -555, -315, -861, 126, 796, -63, 808, -626}; double res = Ruzicka.distance(v1, v2); double ref = 1.0*4533/1867; Asserts.assertDistance(ref); Asserts.assertEquals(res, ref); }
public static double distance(double[] v1,double[] v2){ Asserts.assertEqualLength(v1, v2); double sumMin = 0; double sumMax = 0; for(int i=0;i<v1.length;i++){ sumMin += CommonStats.min(v1[i], v2[i]); sumMax += CommonStats.max(v1[i], v2[i]); } return 1 - (sumMin/sumMax); }
Ruzicka { public static double distance(double[] v1,double[] v2){ Asserts.assertEqualLength(v1, v2); double sumMin = 0; double sumMax = 0; for(int i=0;i<v1.length;i++){ sumMin += CommonStats.min(v1[i], v2[i]); sumMax += CommonStats.max(v1[i], v2[i]); } return 1 - (sumMin/sumMax); } }
Ruzicka { public static double distance(double[] v1,double[] v2){ Asserts.assertEqualLength(v1, v2); double sumMin = 0; double sumMax = 0; for(int i=0;i<v1.length;i++){ sumMin += CommonStats.min(v1[i], v2[i]); sumMax += CommonStats.max(v1[i], v2[i]); } return 1 - (sumMin/sumMax); }  }
Ruzicka { public static double distance(double[] v1,double[] v2){ Asserts.assertEqualLength(v1, v2); double sumMin = 0; double sumMax = 0; for(int i=0;i<v1.length;i++){ sumMin += CommonStats.min(v1[i], v2[i]); sumMax += CommonStats.max(v1[i], v2[i]); } return 1 - (sumMin/sumMax); }  static double distance(double[] v1,double[] v2); }
Ruzicka { public static double distance(double[] v1,double[] v2){ Asserts.assertEqualLength(v1, v2); double sumMin = 0; double sumMax = 0; for(int i=0;i<v1.length;i++){ sumMin += CommonStats.min(v1[i], v2[i]); sumMax += CommonStats.max(v1[i], v2[i]); } return 1 - (sumMin/sumMax); }  static double distance(double[] v1,double[] v2);  }