Skip to content

Commit 1638598

Browse files
committed
Round down in sampleLogNormal to guarantee upper bound
1 parent 7fc3bb7 commit 1638598

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphx/src/main/scala/org/apache/spark/graphx/util/GraphGenerators.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ object GraphGenerators {
118118
val Z = rand.nextGaussian()
119119
X = math.exp(mu + sigma*Z)
120120
}
121-
math.round(X.toFloat)
121+
math.floor(X).toInt
122122
}
123123

124124
/**

0 commit comments

Comments
 (0)