org.saddle

util

package util

Additional utilities that need a home

Visibility
  1. Public
  2. All

Type Members

  1. class Random extends AnyRef

    The Random class provides methods to generate pseudo-random numbers via a plug-in PRNG, which is simply any function that generates a Long primitive.

  2. case class RandomStream(rng: () ⇒ Long) extends InputStream with Product with Serializable

    Create a random InputStream of bytes from a PRNG.

Value Members

  1. object Concat extends LowPriorityConcatImplicits

    Provides a way to append two arrays of possibly different types together by intelligently promoting primitive types where possible.

  2. object LFib extends AnyRef

    Version: TestU01 1.

  3. object LFib4 extends AnyRef

    Marsaglia Lagged Fibonacci PRNG

  4. object Random extends AnyRef

  5. object Xor64 extends AnyRef

    Version: TestU01 1.

  6. object XorShift extends AnyRef

    Marsaglia XorShift PRNG

  7. object Ziff extends AnyRef

    Version: TestU01 1.

  8. object Ziff98 extends AnyRef

    Ziff 4-tap shift-register-sequence

  9. def buildStr(count: Int, total: Int, callback: (Int) ⇒ String, break: ⇒ String = " ... "): String

    Creates a string out of count number of elements extracted from total elements between offsets [0 .

    Creates a string out of count number of elements extracted from total elements between offsets [0 ... count / 2) and (total - count / 2 ... total), using a callback that generates a string at each offset, and inserting a break string if count > total.

    count

    Number of elements to print

    total

    Total number of elements in sequence

    callback

    Generates a string at each offset

    break

    Produces a string to insert as a break

    Definition Classes
    package
  10. def grab[T](arr: Seq[T], n: Int): Seq[T]

    Takes n elements from the front and from the back of array

    Takes n elements from the front and from the back of array

    arr

    Array

    n

    Number of elements to take

    Definition Classes
    package