abstract class Generator extends AnyRef
- Alphabetic
- By Inheritance
- Generator
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Generator()
Abstract Value Members
- abstract def copyInit: Generator
- Attributes
- protected[random]
- abstract def getSeedBytes(): Array[Byte]
- abstract def nextInt(): Int
Generate an equally-distributed random Int.
- abstract def nextLong(): Long
Generates a random long.
Generates a random long. All 64-bit long values are equally likely.
- abstract def setSeedBytes(bytes: Array[Byte]): Unit
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def chooseFromArray[A](arr: Array[A])(implicit gen: Generator): A
- def chooseFromIterable[A](as: Iterable[A])(implicit gen: Generator): A
- def chooseFromSeq[A](seq: Seq[A])(implicit gen: Generator): A
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def copy: Generator
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- var extra: Boolean
- Attributes
- protected
- def fillBytes(arr: Array[Byte]): Unit
Fill an array with random Bytes.
- def fillGaussians(arr: Array[Double], mean: Double, stddev: Double): Unit
- def fillGaussians(arr: Array[Double]): Unit
- def fillInts(arr: Array[Int]): Unit
Fill an array with random Ints.
- def fillLongs(arr: Array[Long]): Unit
Fill an array with random Longs.
- def fillShorts(arr: Array[Short]): Unit
Fill an array with random Shorts.
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def generateBytes(n: Int): Array[Byte]
Generate an array of n random Bytes.
- def generateGaussians(n: Int, mean: Double, stddev: Double): Array[Double]
- def generateGaussians(n: Int): Array[Double]
- def generateInts(n: Int): Array[Int]
Generate an array of n random Ints.
- def generateLongs(n: Int): Array[Long]
Generate an array of n random Longs.
- def generateShorts(n: Int): Array[Short]
Generate an array of n random Shorts.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nextBits(n: Int): Int
Generates a random integer using n bits of state (0 <= n <= 32).
- def nextBoolean(): Boolean
Generates a random Boolean.
- def nextDouble(from: Double, until: Double): Double
Generates a random double in [from, until).
- def nextDouble(n: Double): Double
Generates a random double in [0.0, n).
- def nextDouble(): Double
Generates a random double in [0.0, 1.0).
- def nextFloat(from: Float, until: Float): Float
Generates a random float in [from, until).
- def nextFloat(n: Float): Float
Generates a random float in [0.0, n).
- def nextFloat(): Float
Generates a random float in [0.0, 1.0).
- def nextGaussian(mean: Double, stddev: Double): Double
- def nextGaussian(): Double
- def nextInt(from: Int, to: Int): Int
Return an Int in [from, to].
- def nextInt(n: Int): Int
Generates a random int between 0 (inclusive) and n (exclusive).
- def nextLong(from: Long, to: Long): Long
Return an Long in [from, to].
- def nextLong(n: Long): Long
Generates a random int between 0 (inclusive) and n (exclusive).
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def oneOf[A](as: A*): A
Fill an Array[A] using the given Dist[A] instance.
- def sampleFromArray[A](as: Array[A], size: Int)(implicit arg0: ClassTag[A], gen: Generator): Array[A]
- def sampleFromTraversable[A](as: Iterable[A], size: Int)(implicit arg0: ClassTag[A], gen: Generator): Array[A]
- def shuffle[A](as: Array[A])(implicit gen: Generator): Unit
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- var value: Double
- Attributes
- protected
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()