Skip to content

Commit

Permalink
Go back to math.floor
Browse files Browse the repository at this point in the history
This reverts commit 5900c22.
  • Loading branch information
ankurdave committed Sep 22, 2014
1 parent 5900c22 commit f6655e5
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,13 @@ object GraphGenerators {
// Z ~ N(0, 1)
var X: Double = maxVal

while (round(X) >= maxVal) {
while (X >= maxVal) {
val Z = rand.nextGaussian()
X = math.exp(mu + sigma*Z)
}
round(X)
math.floor(X).toInt
}

private def round(x: Double): Int = math.round(x.toFloat)

/**
* A random graph generator using the R-MAT model, proposed in
* "R-MAT: A Recursive Model for Graph Mining" by Chakrabarti et al.
Expand Down

0 comments on commit f6655e5

Please sign in to comment.