You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hama.apache.org by "Edward J. Yoon" <ed...@apache.org> on 2011/06/24 14:52:08 UTC
Fwd: svn commit: r1139151 - /incubator/hama/trunk/src/examples/org/apache/hama/examples/graph/PageRank.java
Fyi,
Pagerank bug fixed.
Sent from my iPhone
Begin forwarded message:
> From: "Edward J. Yoon" <ed...@apache.org>
> Date: 2011년 6월 24일 오후 1시 37분 33초 KST
> To: bennyzyk@gmail.com
> 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: <ed...@apache.org>
> 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: hama-commits@incubator.apache.org
>
>
> 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