org.saddle

util

package util

Additional utilities that need a home

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. util
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
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.

    Create a random InputStream of bytes from a PRNG. Useful for testing, e.g., for feeding into dieharder battery of tests via stdin.

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.

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

    Key method is Concat.append(array1, array2)

  2. object LFib

    Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 15 Total CPU time: 00:00:19.03 The following tests gave p-values outside [0.001, 0.9990]: (eps means a value < 1.0e-300): (eps1 means a value < 1.0e-15):

    Summary results of SmallCrush

    Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 15 Total CPU time: 00:00:19.03 The following tests gave p-values outside [0.001, 0.9990]: (eps means a value < 1.0e-300): (eps1 means a value < 1.0e-15):

    Test p-value ---------------------------------------------- 10 RandomWalk1 J 0.9997 ---------------------------------------------- All other tests were passed

    Summary results of Crush

    Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 144 Total CPU time: 01:00:08.48

    All tests were passed

    Summary results of BigCrush

    Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 160 Total CPU time: 08:38:24.56

    All tests were passed

  3. object LFib4

    Marsaglia Lagged Fibonacci PRNG

  4. object Random

  5. object Xor64

    Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 15 Total CPU time: 00:00:19.71 The following tests gave p-values outside [0.001, 0.9990]: (eps means a value < 1.0e-300): (eps1 means a value < 1.0e-15):

    Summary results of SmallCrush

    Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 15 Total CPU time: 00:00:19.71 The following tests gave p-values outside [0.001, 0.9990]: (eps means a value < 1.0e-300): (eps1 means a value < 1.0e-15):

    Test p-value ---------------------------------------------- 8 MatrixRank eps ---------------------------------------------- All other tests were passed

    Summary results of Crush

    Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 144 Total CPU time: 00:57:39.11 The following tests gave p-values outside [0.001, 0.9990]: (eps means a value < 1.0e-300): (eps1 means a value < 1.0e-15):

    Test p-value ---------------------------------------------- 3 CollisionOver, t = 2 1.4e-10 6 CollisionOver, t = 4 eps 10 CollisionOver, t = 20 1.3e-62 11 BirthdaySpacings, t = 2 5.2e-5 16 BirthdaySpacings, t = 8 1.7e-12 17 BirthdaySpacings, t = 8 3.3e-73 34 Gap, r = 22 eps 56 MatrixRank, 60 x 60 eps 57 MatrixRank, 60 x 60 eps 58 MatrixRank, 300 x 300 eps 59 MatrixRank, 300 x 300 eps 60 MatrixRank, 1200 x 1200 eps 61 MatrixRank, 1200 x 1200 eps 65 RandomWalk1 H (L = 90) eps 65 RandomWalk1 M (L = 90) eps 66 RandomWalk1 H (L = 90) eps 66 RandomWalk1 M (L = 90) eps 66 RandomWalk1 J (L = 90) eps 67 RandomWalk1 H (L = 1000) eps 67 RandomWalk1 M (L = 1000) 2.0e-9 67 RandomWalk1 C (L = 1000) 1.0e-4 68 RandomWalk1 H (L = 1000) 2.0e-12 68 RandomWalk1 M (L = 1000) eps 68 RandomWalk1 J (L = 1000) eps 69 RandomWalk1 C (L = 10000) 9.7e-4 71 LinearComp, r = 0 1 - eps1 72 LinearComp, r = 29 1 - eps1 85 HammingIndep, L = 30 eps 86 HammingIndep, L = 30 eps 87 HammingIndep, L = 300 eps 88 HammingIndep, L = 300 eps ---------------------------------------------- All other tests were passed

    Summary results of BigCrush

    Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 160 Total CPU time: 08:31:19.41 The following tests gave p-values outside [0.001, 0.9990]: (eps means a value < 1.0e-300): (eps1 means a value < 1.0e-15):

    Test p-value ---------------------------------------------- 2 SerialOver, r = 22 eps 3 CollisionOver, t = 2 6.8e-22 6 CollisionOver, t = 3 eps 12 CollisionOver, t = 21 eps 13 BirthdaySpacings, t = 2 1.7e-18 15 BirthdaySpacings, t = 4 eps 18 BirthdaySpacings, t = 8 7.2e-289 19 BirthdaySpacings, t = 8 eps 21 BirthdaySpacings, t = 16 3.8e-66 37 Gap, r = 20 eps 68 MatrixRank, L=1000, r=0 eps 69 MatrixRank, L=1000, r=26 eps 70 MatrixRank, L=5000 eps 71 MatrixRank, L=5000 eps 77 RandomWalk1 H (L=1000, r=20) eps 77 RandomWalk1 M (L=1000, r=20) eps 77 RandomWalk1 J (L=1000, r=20) eps 80 LinearComp, r = 0 1 - eps1 81 LinearComp, r = 29 1 - eps1 ---------------------------------------------- All other tests were passed

  6. object XorShift

    Marsaglia XorShift PRNG

    Marsaglia XorShift PRNG

    See Marsaglia

  7. object Ziff

    Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 15 Total CPU time: 00:00:18.85

    Summary results of SmallCrush

    Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 15 Total CPU time: 00:00:18.85

    All tests were passed

    Summary results of Crush

    Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 144 Total CPU time: 01:00:08.48

    All tests were passed

    Summary results of BigCrush

    Version: TestU01 1.2.3 Generator: STDIN Number of statistics: 160 Total CPU time: 08:57:21.49 The following tests gave p-values outside [0.001, 0.9990]: (eps means a value < 1.0e-300): (eps1 means a value < 1.0e-15):

    Test p-value ---------------------------------------------- 80 LinearComp, r = 0 1 - eps1 81 LinearComp, r = 29 1 - eps1 ---------------------------------------------- All other tests were passed

  8. object Ziff98

    Ziff 4-tap shift-register-sequence

    Ziff 4-tap shift-register-sequence

    http://arxiv.org/pdf/cond-mat/9710104v1.pdf http://www.aip.org/cip/pdf/vol_12/iss_4/385_1.pdf

  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

  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

Inherited from AnyRef

Inherited from Any

Ungrouped