Ran |
public class Ran001 : RandomGenerator
The Ran001 type exposes the following members.
Name | Description | |
---|---|---|
Ran001 | Initializes a new instance of the Ran001 class | |
Ran001(UInt32) | Initializes a new instance of the Ran001 class |
Name | Description | |
---|---|---|
Maximum | The maximum value of the random number which can be returned. (Inherited from RandomGenerator) | |
Seed | The seed value. (Inherited from RandomGenerator) |
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
GetHashCode | Serves as the default hash function. (Inherited from Object) | |
GetType | Gets the Type of the current instance. (Inherited from Object) | |
Long | (Overrides RandomGeneratorLong) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
ToString | Returns a string that represents the current object. (Inherited from Object) |
Name | Description | |
---|---|---|
max_val | Uniform long int values within [0...max_val]. (Inherited from RandomGenerator) | |
seed | The seed of the random generator. (Inherited from RandomGenerator) |
Notes: - Minimal random number generator of Park and Miller with Bays-Durham shuffle and added safeguards. - The period is 2^31-2 = 2.1*10^9. If your application needs more numbers in sequence than 1% of the random generators period, i.e. 10^7, then use a more elaborate random generator. There are no statistical tests known that it fails to pass, execpt when the number of calls starts to become on the order of the period. When you need longer random sequences you should use another random generator, for example Ran002 or Ran013. - Reference: Algorithm "ran1" published in "Portable Random Number Generators", William H. Press and Saul A. Teukolsky Computers in Phyics, Vol. 6, No. 5, Sep/Oct 1992 - At least 32 bit long int is required, but works with any larger word lengths