Skip to content

Commit

Permalink
Fix scala style.
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Feb 19, 2016
1 parent dbd42b8 commit bf8cb36
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -237,7 +237,9 @@ object PowerIterationClustering extends Logging {
Graph(vD, gA.edges)
.mapTriplets(
e => e.attr / math.max(e.srcAttr, MLUtils.EPSILON),
new TripletFields(/* useSrc */ true, /* useDst */ false, /* useEdge */ true))
new TripletFields(/* useSrc */ true,
/* useDst */ false,
/* useEdge */ true))
}

/**
Expand Down Expand Up @@ -298,7 +300,9 @@ object PowerIterationClustering extends Logging {
val v = curG.aggregateMessages[Double](
sendMsg = ctx => ctx.sendToSrc(ctx.attr * ctx.dstAttr),
mergeMsg = _ + _,
new TripletFields(/* useSrc */ false, /* useDst */ true, /* useEdge */ true)).cache()
new TripletFields(/* useSrc */ false,
/* useDst */ true,
/* useEdge */ true)).cache()
// normalize v
val norm = v.values.map(math.abs).sum()
logInfo(s"$msgPrefix: norm(v) = $norm.")
Expand Down

0 comments on commit bf8cb36

Please sign in to comment.