Github user thunterdb commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16483#discussion_r106746316
  
    --- Diff: graphx/src/main/scala/org/apache/spark/graphx/lib/PageRank.scala 
---
    @@ -322,13 +335,12 @@ object PageRank extends Logging {
         def personalizedVertexProgram(id: VertexId, attr: (Double, Double),
           msgSum: Double): (Double, Double) = {
           val (oldPR, lastDelta) = attr
    -      var teleport = oldPR
    -      val delta = if (src==id) resetProb else 0.0
    -      teleport = oldPR*delta
    -
    -      val newPR = teleport + (1.0 - resetProb) * msgSum
    -      val newDelta = if (lastDelta == Double.NegativeInfinity) newPR else 
newPR - oldPR
    -      (newPR, newDelta)
    +      val newPR = if (lastDelta == Double.NegativeInfinity) {
    --- End diff --
    
    I agree that the new code is easier to follow in that respect.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to