FastRandom

tinyscalautils.util.FastRandom
See theFastRandom companion object
class FastRandom extends Random

Fast (but not thread-safe) random number generator.

The implementation relies on SplittableRandom. Java's fancier generators are not used.

The generator is always seeded. If an unseeded generator is needed, use the FastGenerator object directly; it can be shared harmlessly throughout an application (including across threads).

Attributes

Note

The generator returned by self is ''not'' thread-safe, even though it subclasses java.util.Random.

Companion
object
Source
FastRandom.scala
Graph
Supertypes
class Random
trait Serializable
class Object
trait Matchable
class Any
Known subtypes
object FastRandom

Members list

Value members

Constructors

def this(seed: Long)

Attributes

Source
FastRandom.scala
def this(seed: Int)

Attributes

Source
FastRandom.scala

Inherited methods

Attributes

Inherited from:
Random

Attributes

Inherited from:
Random

Attributes

Inherited from:
Random

Attributes

Inherited from:
Random

Attributes

Inherited from:
Random

Attributes

Inherited from:
Random

Attributes

Inherited from:
Random

Attributes

Inherited from:
Random

Attributes

Inherited from:
Random
def nextFloat(): Float

Attributes

Inherited from:
Random

Attributes

Inherited from:
Random
def nextInt(n: Int): Int

Attributes

Inherited from:
Random
def nextInt(): Int

Attributes

Inherited from:
Random
def nextLong(n: Long): Long

Attributes

Inherited from:
Random
def nextLong(): Long

Attributes

Inherited from:
Random

Attributes

Inherited from:
Random

Attributes

Inherited from:
Random

Attributes

Inherited from:
Random
def shuffle[T, C](xs: IterableOnce[T])(implicit bf: BuildFrom[xs.type, T, C]): C

Attributes

Inherited from:
Random