Pcg 32 Class
Represents a pseudo-random number generator based on the PCG class.
Definition
Namespace: Numerics.NET.Random
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0
C#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0
[SerializableAttribute]
public sealed class Pcg32 : Random32
- Inheritance
- Object → Random → ExtendedRandom → Random32 → Pcg32
Remarks
Use the Pcg32 class to represent a pseudo-random number generator that uses the Permuted linear Congruential Generator algorithm of Melissa O'Neill.
This generator has a period of 264. The algorithm is very fast and produces very good random sequences. Moreover, it is possible to run several sequences in parallel.
Pcg32 can be used in place of the Random class to obtain pseudo-random numbers of a higher quality.
Constructors
Pcg32() | Constructs a new PCG random number generator. |
Pcg32( | Constructs a new PCG random number generator. |
Methods
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
Get | Serves as the default hash function. (Inherited from Object) |
Get | Creates an array populated with items chosen at random from the provided set of choices. (Inherited from Random) |
Get | Creates an array populated with items chosen at random from the provided set of choices. (Inherited from Random) |
Get | Fills the elements of a specified span with items chosen at random from the provided set of choices. (Inherited from Random) |
Get |
Creates an array populated with items chosen at random
from the provided set of choices without replacement.
(Inherited from ExtendedRandom) |
Get |
Creates an array populated with items chosen at random
from the provided set of choices without replacement.
(Inherited from ExtendedRandom) |
Get |
Populates the specified span with items chosen at random
from the provided set of choices without replacement.
(Inherited from ExtendedRandom) |
Get | Gets the Type of the current instance. (Inherited from Object) |
Next() | Returns a non-negative random integer. (Inherited from Random32) |
Next( | Returns a non-negative random integer that is less than the specified maximum. (Inherited from Random32) |
Next( | Returns a random integer that is within a specified range. (Inherited from Random32) |
Next | Returns a random unsigned integer less than the specified value. |
Next | Fills the elements of a specified array of bytes with random numbers. (Inherited from ExtendedRandom) |
Next | Fills the elements of a specified span of bytes with random numbers. (Inherited from Random32) |
Next |
Fills the elements of a specified span of bytes with random numbers.
(Inherited from Random32) |
Next |
Fills the elements of a specified span of bytes with random numbers.
(Inherited from Random32) |
Next |
Returns a random number between 0 and 1.
(Inherited from Random32) |
Next |
Returns a random number between 0 and 1.
(Inherited from Random32) |
Next | Returns a non-negative random integer. (Inherited from Random32) |
Next | Returns a non-negative random integer that is less than the specified maximum. (Inherited from Random32) |
Next | Returns a random integer that is within a specified range. (Inherited from Random32) |
Next | Returns a random floating-point number that is greater than or equal to 0.0, and less than 1.0. (Inherited from Random32) |
Next |
Returns an 32-bit unsigned random integer.
(Overrides Random32.NextUInt32()) |
Restart() |
Restarts the random number generator using the original seed.
(Overrides ExtendedRandom.Restart()) |
Restart( |
Restarts the random number generator using the specified seed.
(Overrides ExtendedRandom.Restart(Int32)) |
Shuffle<T>(T[]) | Performs an in-place shuffle of an array. (Inherited from Random) |
Shuffle<T>(Span<T>) | Performs an in-place shuffle of a span. (Inherited from Random) |
Skip | Skips ahead by the specified number of steps. |
ToString | Returns a string that represents the current object. (Inherited from Object) |
Extension Methods
AsParallel |
Returns a thread-safe version of this random number generator.
(Defined by RandomExtensions) |
Correlated |
Generates a series of random variables with the specified correlation matrix.
(Defined by RandomExtensions) |
Fill |
Fills a Double array with random numbers.
(Defined by RandomExtensions) |
Fill |
Fills an Int32 array with random numbers.
(Defined by RandomExtensions) |
Fill |
Fills a Double array with random samples from the specified distribution.
(Defined by RandomExtensions) |
Fill |
Fills an Int32 array with random samples from the specified distribution.
(Defined by RandomExtensions) |
Fill |
Fills a vector with random samples from the specified distribution.
(Defined by RandomExtensions) |
Fill |
Fills a vector with random samples from the specified distribution.
(Defined by RandomExtensions) |
Fill |
Fills a Double array with random samples from the specified distribution.
(Defined by RandomExtensions) |
Fill |
Fills a Double array with random numbers.
(Defined by RandomExtensions) |
Fill |
Fills an Int32 array with random numbers.
(Defined by RandomExtensions) |
Fill |
Fills an Int32 array with random samples from the specified distribution.
(Defined by RandomExtensions) |
Fill |
Fills a Double array with random samples from the specified distribution.
(Defined by RandomExtensions) |
Fill |
Fills an Int32 array with random samples from the specified distribution.
(Defined by RandomExtensions) |
Fill |
Fills a list with normal random numbers with zero mean and unit
standard deviation.
(Defined by RandomExtensions) |
Fill |
Fills a list with normal random numbers with zero mean and unit
standard deviation.
(Defined by RandomExtensions) |
Next |
Returns a sample from the specified distribution.
(Defined by RandomExtensions) |
Next |
Returns a sample from the specified distribution.
(Defined by RandomExtensions) |