@Test public void auto_test26(){ double[] v1 = new double[]{785.7073853869566, 221.54155661478057, 399.388533483349, 805.551660140414, 550.5878020847279, 937.7769911468026, 931.3049162399053, 440.1541962270397, 778.3925898720677, 734.1274916053591}; double[] v2 = new double[]{163.63231325107407, 984.4087806890046, 753.3829952246509, 623.1519565173312, 90.19465989765519, 379.87213673483257, 903.9378893140356, 939.1339350972131, 145.93120675587002, 857.2373876319771}; double res = Ruzicka.distance(v1, v2); double ref = 1.0*0.5071857263338964; 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);  }