class RandBasis extends Serializable

Provides standard combinators and such to use to compose new Rands.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RandBasis
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new RandBasis(generator: RandomGenerator)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def always[T](t: T): Rand[T]

    The trivial random generator: always returns the argument

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def choose[T](c: Seq[T]): Rand[T]
  7. def choose[T](c: Iterable[T]): Rand[T]

    Chooses an element from a collection.

  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. def fromBody[T](f: => T): Rand[T]

    Simply reevaluate the body every time get is called

  12. def gaussian(m: Double, s: Double): Rand[Double]

    Samples a gaussian with m mean and s std

  13. val gaussian: Rand[Double]

    Samples a gaussian with 0 mean and 1 std

  14. val generator: RandomGenerator
  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  21. def permutation(n: Int): Rand[IndexedSeq[Int]]

    Implements the Knuth shuffle of numbers from 0 to n.

  22. def promote[T1, T2, T3, T4](t: (Rand[T1], Rand[T2], Rand[T3], Rand[T4])): Rand[(T1, T2, T3, T4)]
  23. def promote[T1, T2, T3](t: (Rand[T1], Rand[T2], Rand[T3])): Rand[(T1, T2, T3)]
  24. def promote[T1, T2](t: (Rand[T1], Rand[T2])): Rand[(T1, T2)]
  25. def promote[U](col: Seq[Rand[U]]): Rand[Seq[U]]

    Convert an Seq of Rand[T] into a Rand[Seq[T]]

  26. def randInt(n: Int, m: Int): Rand[Int]

    Uniformly samples an integer in [n,m)

  27. def randInt(n: Int): Rand[Int]

    Uniformly samples an integer in [0,n)

  28. val randInt: Rand[Int]

    Uniformly samples an integer in [0,MAX_INT]

  29. def randLong(n: Long, m: Long): Rand[Long]

    Uniformly samples a long integer in [n,m)

  30. def randLong(n: Long): Rand[Long]

    Uniformly samples a long integer in [0,n)

  31. val randLong: Rand[Long]

    Uniformly samples a long integer in [0,MAX_LONG]

  32. def subsetsOfSize[T](set: IndexedSeq[T], n: Int): Rand[IndexedSeq[T]]

    Knuth shuffle of a subset of size n from a set

  33. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  34. def toString(): String
    Definition Classes
    AnyRef → Any
  35. val uniform: Rand[Double]

    Uniformly samples in [0,1)

  36. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  38. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped