package lib
- Alphabetic
- By Inheritance
- lib
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
-    object ConnectedComponentsConnected components algorithm. 
-    object LabelPropagationLabel Propagation algorithm. 
-    object PageRank extends LoggingPageRank algorithm implementation. PageRank algorithm implementation. There are two implementations of PageRank implemented. The first implementation uses the standalone Graphinterface and runs PageRank for a fixed number of iterations:var PR = Array.fill(n)( 1.0 ) val oldPR = Array.fill(n)( 1.0 ) 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 } } The second implementation uses the Pregelinterface and runs PageRank until convergence:var PR = Array.fill(n)( 1.0 ) val oldPR = Array.fill(n)( 0.0 ) while( max(abs(PR - oldPr)) > tol ) { swap(oldPR, PR) for( i <- 0 until n if abs(PR[i] - oldPR[i]) > tol ) { PR[i] = alpha + (1 - \alpha) * inNbrs[i].map(j => oldPR[j] / outDeg[j]).sum } } alphais the random reset probability (typically 0.15),inNbrs[i]is the set of neighbors which link toiandoutDeg[j]is the out degree of vertexj.- Note
- This is not the "normalized" PageRank and as a consequence pages that have no inlinks will have a PageRank of alpha. 
 
-    object SVDPlusPlusImplementation of SVD++ algorithm. 
-    object ShortestPaths extends SerializableComputes shortest paths to the given set of landmark vertices, returning a graph where each vertex attribute is a map containing the shortest-path distance to each reachable landmark. 
-    object StronglyConnectedComponentsStrongly connected components algorithm implementation. 
-    object TriangleCountCompute the number of triangles passing through each vertex. Compute the number of triangles passing through each vertex. The algorithm is relatively straightforward and can be computed in three steps: - Compute the set of neighbors for each vertex
- For each edge compute the intersection of the sets and send the count to both vertices.
- Compute the sum at each vertex and divide by two since each triangle is counted twice.
 There are two implementations. The default TriangleCount.runimplementation first removes self cycles and canonicalizes the graph to ensure that the following conditions hold:- There are no self edges
- All edges are oriented (src is greater than dst)
- There are no duplicate edges
 However, the canonicalization procedure is costly as it requires repartitioning the graph. If the input data is already in "canonical form" with self cycles removed then the TriangleCount.runPreCanonicalizedshould be used instead.val canonicalGraph = graph.mapEdges(e => 1).removeSelfEdges().canonicalizeEdges() val counts = TriangleCount.runPreCanonicalized(canonicalGraph).vertices