Skip to content

Commit b5bdccb

Browse files
committed
Added text on UniformStream
1 parent fed63a0 commit b5bdccb

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

docs/manual.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,3 +402,20 @@ The error() method returns a chi-square error measure on the uniform distributio
402402
By abstract method getNumber must be provided by derived classes, and is used to obtain a uniform means of accessing random numbers.
403403

404404
The RandomStream class returns a large sequence of random numbers, whose period is 2^24. However, unless the seeds are modified when each random distribution class is created, the starting position in this sequence will always be the same, i.e., the same sequence of numbers will be obtained. To prevent this, each class derived from RandomStream has an additional parameter for one of its constructors which indicates the offset in this sequence from which to begin sampling.
405+
406+
=== UniformStream
407+
408+
The UniformStream class inherits from RandomStream and returns random numbers uniformly distributed over a range specified when the instance is created.
409+
410+
----
411+
public class UniformStream extends RandomStream
412+
{
413+
public UniformStream (double lo, double hi);
414+
public UniformStream (double lo, double hi, int StreamSelect);
415+
public UniformStream (double lo, double hi, int StreamSelect, long MGSeed, long LCGSeed);
416+
417+
public double getNumber () throws IOException, ArithmeticException;
418+
};
419+
----
420+
421+
The range covers the interval specified by lo and hi. StreamSelect indicates the offset in the random number sequence to begin sampling, and MGSeed and LCGSeed can be used to modify the seed values used by the RandomStream class.

0 commit comments

Comments
 (0)