Skip to content

Commit c460191

Browse files
committed
Completed old section 4 on streams.
Still needs an example.
1 parent c729799 commit c460191

1 file changed

Lines changed: 55 additions & 1 deletion

File tree

docs/manual.adoc

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,5 +452,59 @@ public class ErlangStream extends RandomStream
452452
};
453453
----
454454

455+
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.
456+
457+
=== HyperExponentialStream
458+
459+
The HyperExponential class returns a hyper-exponential distribution of random numbers, with mean mean and standard deviation sd.
460+
461+
----
462+
public class HyperExponentialStream extends RandomStream
463+
{
464+
public HyperExponentialStream (double mean, double sd);
465+
public HyperExponentialStream (double mean, double sd, int StreamSelect);
466+
public HyperExponentialStream (double mean, double sd, int StreamSelect, long MGSeed, long LCGSeed);
467+
468+
public double getNumber () throws IOException, ArithmeticException;
469+
};
470+
----
471+
472+
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.
473+
474+
=== NormalStream
475+
476+
NormalStream returns a normal distribution of random numbers, with mean mean and standard deviation sd. operator() uses the polar method due to link:http://www.amazon.com/Art-Computer-Programming-Volume-Seminumerical/dp/0201896842[Box, Muller, and Marsaglia.]
477+
478+
----
479+
public class NormalStream extends RandomStream
480+
{
481+
public NormalStream (double mean, double sd);
482+
public NormalStream (double mean, double sd, int StreamSelect);
483+
public NormalStream (double mean, double sd, int StreamSelect, long MGSeed, long LCGSeed);
484+
485+
public double getNumber () throws IOException, ArithmeticException;
486+
};
487+
----
488+
489+
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.
490+
491+
=== Draw
492+
493+
The Draw class is the exception to the inheritance rule, instead using RandomStream through delegation (for historical reasons). This returns true with the probability prob, and false otherwise.
494+
495+
----
496+
public class Draw
497+
{
498+
public Draw (double p);
499+
public Draw (double p, int StreamSelect);
500+
public Draw (double p, int StreamSelect, long MGSeed, long LCGSeed);
501+
502+
public boolean getBoolean () throws IOException;
503+
};
504+
----
505+
506+
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.
507+
508+
=== Example
455509

456-
===
510+
TODO

0 commit comments

Comments
 (0)