def pregel(self): """ Get the :class:`graphframes.lib.Pregel` object for running pregel. See :class:`graphframes.lib.Pregel` for more details. """ return Pregel(self)
def agg(): return F.min(Pregel.msg())
def sendSrc(): return F.when((Pregel.src("short") == F.lit(100)), Pregel.dst("id")+Pregel.edge("weight")).otherwise(F.lit(None))
def updatedValue(): return F.when(Pregel.msg().isNull(), F.col("short")).otherwise(Pregel.msg())
def agg(): return F.sum(Pregel.msg())
def sendSrc(): return Pregel.dst("rank") / Pregel.edge("dist")
def sendDst(): return Pregel.src("rank") / Pregel.edge("dist")
def updatedValue(): return F.coalesce(Pregel.msg(), F.lit(0.0)) * F.lit(1.0 - alpha) + F.lit( alpha / numVertices)
def sendSrc(): return Pregel.dst("connect")
def sendDst(): return Pregel.src("connect")
def updatedValue(): return F.when(Pregel.msg() >= F.col("connect"), F.col("connect")).otherwise(Pregel.msg())