Updating the GraphLab API to match the changes made to the Pregel API.

This commit is contained in:
Joseph E. Gonzalez 2013-10-26 15:44:19 -07:00
parent 08024c938c
commit 6a0fbc0374

View file

@ -33,14 +33,14 @@ object GraphLab {
* @tparam A The type accumulated during the gather phase * @tparam A The type accumulated during the gather phase
* @return the resulting graph after the algorithm converges * @return the resulting graph after the algorithm converges
*/ */
def iterate[VD: ClassManifest, ED: ClassManifest, A: ClassManifest](graph: Graph[VD, ED])( def apply[VD: ClassManifest, ED: ClassManifest, A: ClassManifest]
gatherFunc: (Vid, EdgeTriplet[VD, ED]) => A, (graph: Graph[VD, ED], numIter: Int,
gatherDirection: EdgeDirection = EdgeDirection.In,
scatterDirection: EdgeDirection = EdgeDirection.Out)
(gatherFunc: (Vid, EdgeTriplet[VD, ED]) => A,
mergeFunc: (A, A) => A, mergeFunc: (A, A) => A,
applyFunc: (Vid, VD, Option[A]) => VD, applyFunc: (Vid, VD, Option[A]) => VD,
scatterFunc: (Vid, EdgeTriplet[VD, ED]) => Boolean, scatterFunc: (Vid, EdgeTriplet[VD, ED]) => Boolean): Graph[VD, ED] = {
numIter: Int = Integer.MAX_VALUE,
gatherDirection: EdgeDirection = EdgeDirection.In,
scatterDirection: EdgeDirection = EdgeDirection.Out): Graph[VD, ED] = {
// Add an active attribute to all vertices to track convergence. // Add an active attribute to all vertices to track convergence.