spire.random

Generator

abstract class Generator extends AnyRef

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Generator
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Generator()

Abstract Value Members

  1. abstract def copyInit: Generator

    Attributes
    protected[this]
  2. abstract def getSeedBytes(): Array[Byte]

  3. abstract def nextInt(): Int

    Generate an equally-distributed random Int.

  4. abstract def nextLong(): Long

    Generates a random long.

    Generates a random long. All 64-bit long values are equally likely.

  5. abstract def setSeedBytes(bytes: Array[Byte]): Unit

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def chooseFromArray[A](arr: Array[A])(implicit gen: Generator): A

  8. def chooseFromIterable[A](as: Iterable[A])(implicit gen: Generator): A

  9. def chooseFromSeq[A](seq: Seq[A])(implicit gen: Generator): A

  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def copy: Generator

  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. var extra: Boolean

    Attributes
    protected
  15. def fillArray[A](arr: Array[A])(implicit arg0: Dist[A]): Unit

    Fill an Array[A] using the given Dist[A] instance.

  16. def fillBytes(arr: Array[Byte]): Unit

    Fill an array with random Bytes.

  17. def fillGaussians(arr: Array[Double], mean: Double, stddev: Double): Unit

  18. def fillGaussians(arr: Array[Double]): Unit

  19. def fillInts(arr: Array[Int]): Unit

    Fill an array with random Ints.

  20. def fillLongs(arr: Array[Long]): Unit

    Fill an array with random Longs.

  21. def fillShorts(arr: Array[Short]): Unit

    Fill an array with random Shorts.

  22. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. def generateArray[A](n: Int)(implicit arg0: Dist[A], arg1: ClassTag[A]): Array[A]

    Generate an Array[A] using the given Dist[A] instance.

  24. def generateBytes(n: Int): Array[Byte]

    Generate an array of n random Bytes.

  25. def generateGaussians(n: Int, mean: Double, stddev: Double): Array[Double]

  26. def generateGaussians(n: Int): Array[Double]

  27. def generateInts(n: Int): Array[Int]

    Generate an array of n random Ints.

  28. def generateLongs(n: Int): Array[Long]

    Generate an array of n random Longs.

  29. def generateShorts(n: Int): Array[Short]

    Generate an array of n random Shorts.

  30. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  31. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  32. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  33. def iterator[A](implicit next: Dist[A]): Iterator[A]

    Generate an infinite iterator of random values using Dist[A].

  34. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  35. def next[A](implicit next: Dist[A]): A

    Generate a random value using a Dist[A] type class instance.

    Generate a random value using a Dist[A] type class instance.

    Implicit Dist[A] instances are provided for the AnyVal types as well as UByte through ULong. More complex Dist instances can be created from these.

  36. def nextBits(n: Int): Int

    Generates a random integer using n bits of state (0 <= n <= 32).

  37. def nextBoolean(): Boolean

    Generates a random Boolean.

  38. def nextDouble(from: Double, until: Double): Double

    Generates a random double in [from, until).

  39. def nextDouble(n: Double): Double

    Generates a random double in [0.

    Generates a random double in [0.0, n).

  40. def nextDouble(): Double

    Generates a random double in [0.

    Generates a random double in [0.0, 1.0).

  41. def nextFloat(from: Float, until: Float): Float

    Generates a random float in [from, until).

  42. def nextFloat(n: Float): Float

    Generates a random float in [0.

    Generates a random float in [0.0, n).

  43. def nextFloat(): Float

    Generates a random float in [0.

    Generates a random float in [0.0, 1.0).

  44. def nextGaussian(mean: Double, stddev: Double): Double

  45. def nextGaussian(): Double

  46. def nextInt(from: Int, to: Int): Int

    Return an Int in [from, to].

  47. def nextInt(n: Int): Int

    Generates a random int between 0 (inclusive) and n (exclusive).

  48. def nextLong(from: Long, to: Long): Long

    Return an Long in [from, to].

  49. def nextLong(n: Long): Long

    Generates a random int between 0 (inclusive) and n (exclusive).

  50. final def notify(): Unit

    Definition Classes
    AnyRef
  51. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  52. def oneOf[A](as: A*): A

  53. def sampleFromArray[A](as: Array[A], size: Int)(implicit arg0: ClassTag[A], gen: Generator): Array[A]

  54. def sampleFromTraversable[A](as: Traversable[A], size: Int)(implicit arg0: ClassTag[A], gen: Generator): Array[A]

  55. def shuffle[A](as: Array[A])(implicit gen: Generator): Unit

  56. def sync: SyncGenerator

  57. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  58. def toString(): String

    Definition Classes
    AnyRef → Any
  59. var value: Double

    Attributes
    protected
  60. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  61. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  62. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped