From 942de9843348a845f94b0654d6deafb948cf7e93 Mon Sep 17 00:00:00 2001 From: "Joseph E. Gonzalez" <joseph.e.gonzalez@gmail.com> Date: Tue, 29 Oct 2013 10:19:49 -0700 Subject: [PATCH] Making suggested changes. --- .../scala/org/apache/spark/graph/Analytics.scala | 14 +------------- .../main/scala/org/apache/spark/graph/Pregel.scala | 2 +- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/graph/src/main/scala/org/apache/spark/graph/Analytics.scala b/graph/src/main/scala/org/apache/spark/graph/Analytics.scala index acb9e3753f..ddbd5becce 100644 --- a/graph/src/main/scala/org/apache/spark/graph/Analytics.scala +++ b/graph/src/main/scala/org/apache/spark/graph/Analytics.scala @@ -26,7 +26,7 @@ object Analytics extends Logging { * for( iter <- 0 until numIter ) { * swap(oldPR, PR) * for( i <- 0 until n ) { - * PR[i] = alpha + (1 - \alpha) * inNbrs[i].map(j => oldPR[j] / outDeg[j]).sum + * PR[i] = alpha + (1 - alpha) * inNbrs[i].map(j => oldPR[j] / outDeg[j]).sum * } * } * }}} @@ -193,18 +193,6 @@ object Analytics extends Logging { sendMessage, (a,b) => math.min(a,b) ) - - /** - * Originally this was implemented using the GraphLab abstraction but with - * support for message computation along all edge directions the pregel - * abstraction is sufficient - */ - // GraphLab(ccGraph, gatherDirection = EdgeDirection.Both, scatterDirection = EdgeDirection.Both)( - // (me_id, edge) => edge.otherVertexAttr(me_id), // gather - // (a: Vid, b: Vid) => math.min(a, b), // merge - // (id, data, a: Option[Vid]) => math.min(data, a.getOrElse(Long.MaxValue)), // apply - // (me_id, edge) => (edge.vertexAttr(me_id) < edge.otherVertexAttr(me_id)) - // ) } // end of connectedComponents diff --git a/graph/src/main/scala/org/apache/spark/graph/Pregel.scala b/graph/src/main/scala/org/apache/spark/graph/Pregel.scala index d45e351d6a..729eaa7eae 100644 --- a/graph/src/main/scala/org/apache/spark/graph/Pregel.scala +++ b/graph/src/main/scala/org/apache/spark/graph/Pregel.scala @@ -8,7 +8,7 @@ import org.apache.spark.rdd.RDD * message-passing API. However, unlike the original Pregel API * the GraphX pregel API factors the sendMessage computation over * edges, enables the message sending computation to read both - * vertex attributes, and finally contrains messages to the graph + * vertex attributes, and finally constrains messages to the graph * structure. These changes allow for substantially more efficient * distributed execution while also exposing greater flexibility * for graph based computation. -- GitLab