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 1b91141b172660c68efba1bdec2ae80a034d8959..e45d7748d97c852ed35085ffdf7af7fc63dd825a 100644 --- a/graph/src/main/scala/org/apache/spark/graph/Analytics.scala +++ b/graph/src/main/scala/org/apache/spark/graph/Analytics.scala @@ -27,7 +27,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 * } * } * }}} @@ -199,18 +199,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 47ce2ddb330768626d274e43d649480783f804e9..1750b7f8dcabc9a7d1b99bb4686df27a8624287e 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 structure. + * 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.