class XORShiftRandom extends Random
XORShiftRandom
copy from spark framework
This class implements a XORShift random number generator algorithm Source: Marsaglia, G. (2003). Xorshift RNGs. Journal of Statistical Software, Vol. 8, Issue 14. http://www.jstatsoft.org/v08/i14/paper This implementation is approximately 3.5 times faster than java.util.Random, partly because of the algorithm, but also due to renouncing thread safety. JDK's implementation uses an AtomicLong seed, this class uses a regular Long. We can forgo thread safety since we use a new instance of the RNG for each thread.
- Source
- XORShiftRandom.scala
- Version
1.0 23/01/2018 20:08
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- XORShiftRandom
- Random
- Serializable
- AnyRef
- Any
Implicitly
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
Visibility
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from XORShiftRandom to any2stringadd[XORShiftRandom] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (XORShiftRandom, B)
- Implicit
- This member is added by an implicit conversion from XORShiftRandom to ArrowAssoc[XORShiftRandom] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
doubles(arg0: Double, arg1: Double): DoubleStream
- Definition Classes
- Random
-
def
doubles(arg0: Long, arg1: Double, arg2: Double): DoubleStream
- Definition Classes
- Random
-
def
doubles(): DoubleStream
- Definition Classes
- Random
-
def
doubles(arg0: Long): DoubleStream
- Definition Classes
- Random
-
def
ensuring(cond: (XORShiftRandom) ⇒ Boolean, msg: ⇒ Any): XORShiftRandom
- Implicit
- This member is added by an implicit conversion from XORShiftRandom to Ensuring[XORShiftRandom] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (XORShiftRandom) ⇒ Boolean): XORShiftRandom
- Implicit
- This member is added by an implicit conversion from XORShiftRandom to Ensuring[XORShiftRandom] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): XORShiftRandom
- Implicit
- This member is added by an implicit conversion from XORShiftRandom to Ensuring[XORShiftRandom] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): XORShiftRandom
- Implicit
- This member is added by an implicit conversion from XORShiftRandom to Ensuring[XORShiftRandom] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from XORShiftRandom to StringFormat[XORShiftRandom] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
ints(arg0: Int, arg1: Int): IntStream
- Definition Classes
- Random
-
def
ints(arg0: Long, arg1: Int, arg2: Int): IntStream
- Definition Classes
- Random
-
def
ints(): IntStream
- Definition Classes
- Random
-
def
ints(arg0: Long): IntStream
- Definition Classes
- Random
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
longs(arg0: Long, arg1: Long): LongStream
- Definition Classes
- Random
-
def
longs(arg0: Long, arg1: Long, arg2: Long): LongStream
- Definition Classes
- Random
-
def
longs(): LongStream
- Definition Classes
- Random
-
def
longs(arg0: Long): LongStream
- Definition Classes
- Random
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
next(bits: Int): Int
- Attributes
- protected
- Definition Classes
- XORShiftRandom → Random
-
def
nextBoolean(): Boolean
- Definition Classes
- Random
-
def
nextBytes(arg0: Array[Byte]): Unit
- Definition Classes
- Random
-
def
nextDouble(): Double
- Definition Classes
- Random
-
def
nextFloat(): Float
- Definition Classes
- Random
-
def
nextGaussian(): Double
- Definition Classes
- Random
-
def
nextInt(arg0: Int): Int
- Definition Classes
- Random
-
def
nextInt(): Int
- Definition Classes
- Random
-
def
nextLong(): Long
- Definition Classes
- Random
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
setSeed(s: Long): Unit
- Definition Classes
- XORShiftRandom → Random
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
→[B](y: B): (XORShiftRandom, B)
- Implicit
- This member is added by an implicit conversion from XORShiftRandom to ArrowAssoc[XORShiftRandom] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc