-
- Downloads
Merge pull request #185 from mkolod/random-number-generator
XORShift RNG with unit tests and benchmark This patch was introduced to address SPARK-950 - the discussion below the ticket explains not only the rationale, but also the design and testing decisions: https://spark-project.atlassian.net/browse/SPARK-950 To run unit test, start SBT console and type: compile test-only org.apache.spark.util.XORShiftRandomSuite To run benchmark, type: project core console Once the Scala console starts, type: org.apache.spark.util.XORShiftRandom.benchmark(100000000) XORShiftRandom is also an object with a main method taking the number of iterations as an argument, so you can also run it from the command line.
No related branches found
No related tags found
Showing
- core/src/main/scala/org/apache/spark/util/Utils.scala 24 additions, 0 deletionscore/src/main/scala/org/apache/spark/util/Utils.scala
- core/src/main/scala/org/apache/spark/util/XORShiftRandom.scala 94 additions, 0 deletions...src/main/scala/org/apache/spark/util/XORShiftRandom.scala
- core/src/test/scala/org/apache/spark/util/XORShiftRandomSuite.scala 76 additions, 0 deletions...est/scala/org/apache/spark/util/XORShiftRandomSuite.scala
- mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeans.scala 6 additions, 5 deletions...main/scala/org/apache/spark/mllib/clustering/KMeans.scala
Please register or sign in to comment