hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r1021985 - /incubator/hama/trunk/src/examples/org/apache/hama/examples/PiEstimator.java
Date Wed, 13 Oct 2010 03:34:15 GMT
Author: edwardyoon
Date: Wed Oct 13 03:34:14 2010
New Revision: 1021985

URL: http://svn.apache.org/viewvc?rev=1021985&view=rev
Log: (empty)

Modified:
    incubator/hama/trunk/src/examples/org/apache/hama/examples/PiEstimator.java

Modified: incubator/hama/trunk/src/examples/org/apache/hama/examples/PiEstimator.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/examples/org/apache/hama/examples/PiEstimator.java?rev=1021985&r1=1021984&r2=1021985&view=diff
==============================================================================
--- incubator/hama/trunk/src/examples/org/apache/hama/examples/PiEstimator.java (original)
+++ incubator/hama/trunk/src/examples/org/apache/hama/examples/PiEstimator.java Wed Oct 13
03:34:14 2010
@@ -65,7 +65,7 @@ public class PiEstimator {
       BSPMessage received;
       while ((received = bspPeer.getCurrentMessage()) != null) {
         LOG.info("Receives messages:" + Bytes.toDouble(received.getData()));
-        pi = (pi + Bytes.toDouble(received.getData())) / bspPeer.getAllPeers().size();
+        pi = (pi + Bytes.toDouble(received.getData())) / 2;
       }
 
       if (pi != 0.0) {



Mime
View raw message