object TinyMT32 extends Serializable
TinyMT is a pseudo random number generator.
To get an instance, call TinyMT32.getDefault
This class supports jump function. User can get an array of pseudo random
number generators by calling TinyMT32#getDefaultArray
- Source
- TinyMT32.scala
- See also
- Alphabetic
- By Inheritance
- TinyMT32
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
getDefault(): TinyMT32
Factory method which returns the TinyMT with the first generated parameter of TinyMTDC.
Factory method which returns the TinyMT with the first generated parameter of TinyMTDC.
System#nanoTime
andThread#getId()
are used for seed.- returns
TinyMT with the first parameter.
-
def
getDefault(seeds: Array[Int]): TinyMT32
get default TinyMT32 with seeding by array.
get default TinyMT32 with seeding by array.
- seeds
seeds for initialization.
- returns
random number generator TinyMT32
-
def
getDefault(seed: Long): TinyMT32
Factory method which returns the TinyMT with the first generated parameter of TinyMTDC.
Factory method which returns the TinyMT with the first generated parameter of TinyMTDC.
- seed
seed of pseudo random numbers.
- returns
TinyMT with the first parameter.
-
def
getDefault(seed: String): TinyMT32
Factory method which returns the TinyMT with the first generated parameter of TinyMTDC.
Factory method which returns the TinyMT with the first generated parameter of TinyMTDC.
- seed
seed of pseudo random numbers.
- returns
TinyMT with the first parameter.
-
def
getDefaultArray(count: Int, seed: String, jump: Long): Array[TinyMT32]
Make and return an array of TinyMT.
Make and return an array of TinyMT. Each element has the same characteristic polynomial with TinyMT gotten by getDefaultMT. Especially, the first element is just same as default TinyMT. The second element has the state of jump * 264 steps after the first element. In other word, the first element will generate the same sequence with the second element, after jump * 264 pseudo random number generation.
This is equals to TinyMT32.getDefault(seed).getJumpedArray(count, jump);
- count
number of TinyMT to be created.
- seed
seed of first element
- jump
step is jump * 264
- returns
array of TinyMT
-
def
getDefaultArray(count: Int, seed: Long, jump: Long): Array[TinyMT32]
make and return an array of TinyMT.
make and return an array of TinyMT. Each element has the same characteristic polynomial with TinyMT gotten by getDefaultMT. Especially, the first element is just same as default TinyMT. The second element has the state of jump * 264 steps after the first element. In other word, the first element will generate the same sequence with the second element, after jump * 264 pseudo random number generation.
- count
number of TinyMT to be created.
- seed
seed of first element
- jump
step is jump * 264
- returns
array of TinyMT
-
def
getThreadLocal(threadId: Long): TinyMT32
return TinyMT32 instance whose parameter has ID = 1.
return TinyMT32 instance whose parameter has ID = 1.
- threadId
thread ID
- returns
TinyMT32 instance
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
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( ... )