We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5900c22 commit f6655e5Copy full SHA for f6655e5
graphx/src/main/scala/org/apache/spark/graphx/util/GraphGenerators.scala
@@ -114,15 +114,13 @@ object GraphGenerators {
114
// Z ~ N(0, 1)
115
var X: Double = maxVal
116
117
- while (round(X) >= maxVal) {
+ while (X >= maxVal) {
118
val Z = rand.nextGaussian()
119
X = math.exp(mu + sigma*Z)
120
}
121
- round(X)
+ math.floor(X).toInt
122
123
124
- private def round(x: Double): Int = math.round(x.toFloat)
125
-
126
/**
127
* A random graph generator using the R-MAT model, proposed in
128
* "R-MAT: A Recursive Model for Graph Mining" by Chakrabarti et al.
0 commit comments