Back: Promise-initializing
Up: Class reference
Forward: Random class-instance creation
 
Top: GNU Smalltalk User's Guide
Contents: Table of Contents
Index: Class index
About: About this document

6.117 Random

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

6.117.1 Random class: instance creation  (class)
6.117.2 Random: basic  (instance)
6.117.3 Random: testing  (instance)


6.117.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: aFloat
Create a new random number generator whose seed is aFloat


6.117.2 Random: basic

atEnd
This stream never ends. Always answer false

next
Return the next random number in the sequence

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


6.117.3 Random: testing

chiSquare
returns under Pentium II, NT 4.0, 93.0

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




This document was generated on May, 12 2002 using texi2html