From: yeom Date: Sat, 31 Jul 2010 21:25:55 +0000 (+0000) Subject: changes. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9aa94aedb25d71e9b96a7e3d458e5b2fcaa10e2d;p=IRC.git changes. --- diff --git a/Robust/src/Benchmarks/oooJava/kmeans/Normal.java b/Robust/src/Benchmarks/oooJava/kmeans/Normal.java index e7914aac..29925c78 100644 --- a/Robust/src/Benchmarks/oooJava/kmeans/Normal.java +++ b/Robust/src/Benchmarks/oooJava/kmeans/Normal.java @@ -143,19 +143,22 @@ public class Normal { int sidx=0; for (int i = start; i < stop; i++) { - + int newIndex=indexArray[sidx]; if (membership[i] != newIndex) { delta += 1.0f; } - membership[i] = newIndex; - + membership[i] = newIndex; new_centers_len[newIndex] = new_centers_len[newIndex] + 1; - for (int j = 0; j < nfeatures; j++) { - new_centers[newIndex][j] = new_centers[newIndex][j] + feature[i][j]; - } + float[] tmpnew_centers=new_centers[newIndex]; + float[] tmpfeature=feature[i]; + + for (int j = 0; j < nfeatures; j++) { + tmpnew_centers[j] = tmpnew_centers[j] + tmpfeature[j]; + } + sidx++; } diff --git a/Robust/src/Benchmarks/oooJava/power/Power.java b/Robust/src/Benchmarks/oooJava/power/Power.java index cae29026..2628ffeb 100644 --- a/Robust/src/Benchmarks/oooJava/power/Power.java +++ b/Robust/src/Benchmarks/oooJava/power/Power.java @@ -42,7 +42,8 @@ public class Power { // initial pass long start0 = System.currentTimeMillis(); - Root r = new Root(10, 20, 5, 10); +// Root r = new Root(10, 20, 5, 10); + Root r = new Root(20, 20, 5, 10); long end0 = System.currentTimeMillis(); long start1 = System.currentTimeMillis();