Fyi, Pagerank bug fixed.
Sent from my iPhone Begin forwarded message: > From: "Edward J. Yoon" <[email protected]> > Date: 2011년 6월 24일 오후 1시 37분 33초 KST > To: [email protected] > Subject: Fwd: svn commit: r1139151 - > /incubator/hama/trunk/src/examples/org/apache/hama/examples/graph/PageRank.java > > Oh, my mistake. committed. > > Please open the issue. I'd like to add your contribution to CHANGES.txt > > ---------- Forwarded message ---------- > From: <[email protected]> > Date: Fri, Jun 24, 2011 at 1:13 PM > Subject: svn commit: r1139151 - > /incubator/hama/trunk/src/examples/org/apache/hama/examples/graph/PageRank.java > To: [email protected] > > > Author: edwardyoon > Date: Fri Jun 24 04:13:16 2011 > New Revision: 1139151 > > URL: http://svn.apache.org/viewvc?rev=1139151&view=rev > Log: > Fix typo. > > Modified: > > incubator/hama/trunk/src/examples/org/apache/hama/examples/graph/PageRank.java > > Modified: > incubator/hama/trunk/src/examples/org/apache/hama/examples/graph/PageRank.java > URL: > http://svn.apache.org/viewvc/incubator/hama/trunk/src/examples/org/apache/hama/examples/graph/PageRank.java?rev=1139151&r1=1139150&r2=1139151&view=diff > ============================================================================== > --- > incubator/hama/trunk/src/examples/org/apache/hama/examples/graph/PageRank.java > (original) > +++ > incubator/hama/trunk/src/examples/org/apache/hama/examples/graph/PageRank.java > Fri Jun 24 04:13:16 2011 > @@ -153,7 +153,7 @@ public class PageRank extends PageRankBa > List<PageRankVertex> outgoingEdges = adjacencyList.get(v); > for (PageRankVertex adjacent : outgoingEdges) { > int mod = Math.abs(adjacent.getId() % peerNames.length); > - // send a message of the tentative pagerank devided by the size of > + // send a message of the tentative pagerank divided by the size of > // the outgoing edges to all adjacents > peer.send(peerNames[mod], new DoubleMessage(adjacent.getUrl(), > tentativePagerank.get(v) / outgoingEdges.size())); > @@ -164,8 +164,8 @@ public class PageRank extends PageRankBa > public void setConf(Configuration conf) { > this.conf = conf; > numOfVertices = Integer.parseInt(conf.get("num.vertices")); > - ALPHA = 0.15 / (double) numOfVertices; > DAMPING_FACTOR = Double.parseDouble(conf.get("damping.factor")); > + ALPHA = (1 - DAMPING_FACTOR) / (double) numOfVertices; > EPSILON = Double.parseDouble(conf.get("epsilon.error")); > MAX_ITERATIONS = Integer.parseInt(conf.get("max.iterations")); > peerNames = conf.get(ShortestPaths.BSP_PEERS).split(";"); > > > > > > -- > Best Regards, Edward J. Yoon > @eddieyoon
