Back: Promise-still unclassified Up: Base classes Forward: Random class-instance creation   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.135 Random

Defined in namespace Smalltalk
Superclass: Stream
Category: Streams
My instances are generator streams that produce random numbers, which are floating point values between 0 and 1.

1.135.1 Random class: instance creation  (class)
1.135.2 Random class: shortcuts  (class)
1.135.3 Random class: still unclassified  (class)
1.135.4 Random: basic  (instance)
1.135.5 Random: still unclassified  (instance)
1.135.6 Random: testing  (instance)


1.135.1 Random class: instance creation

new
Create a new random number generator whose seed is given by the current time on the millisecond clock

seed: anInteger
Create a new random number generator whose seed is anInteger.


1.135.2 Random class: shortcuts

between: low and: high
Return a random integer between the given extrema

next
Return a random number between 0 and 1 (excluded)

source
Return a standard source of random numbers.


1.135.3 Random class: still unclassified

mtSize
MT19937 have a size of 624


1.135.4 Random: basic

atEnd
This stream never ends. Always answer false.

between: low and: high
Return a random integer between low and high.

next
Return a random SmallInteger of maximum 32-bits precision.

nextLimit: anInteger
Return a random SmallInteger, uniformly distributed between 0 and anInteger.

nextPut: value
This method should not be called for instances of this class.


1.135.5 Random: still unclassified

setSeed: anInteger
Private - Set the random number seed to anInteger.


1.135.6 Random: testing

chiSquare
Compute the chi-square of the random that this class generates.

chiSquare: n range: r
Return the chi-square deduced from calculating n random numbers in the 0..r range.



Back: Random-still unclassified Up: Random Forward: ReadStream   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on February, 22 2012 using texi2html