Random Extensions Class
Provides additional extension methods for Random.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
C#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
public static class RandomExtensions- Inheritance
- Object → RandomExtensions
Remarks
This class extends the standard .NET Random type with extra functionality that may not be available on all target frameworks, such as additional overloads and span-based methods.
These extensions are intended for convenience when working with existing APIs that use Random.
Methods
| Fill( | Fills a Double array with random numbers. |
| Fill( | Fills an Int32 array with random numbers. |
| Fill( | Fills a Double array with random numbers. |
| Fill( | Fills an Int32 array with random numbers. |
| Fill | Fills a list with normal random numbers with zero mean and unit standard deviation. |
| Fill | Fills a list with normal random numbers with zero mean and unit standard deviation. |
| Fill | Populates the specified span with numbers chosen at random between 0 and the provided count without replacement. |
| Get | Creates an array populated with items chosen at random from the provided set of choices without replacement. |
| Get | Creates an array populated with items chosen at random from the provided set of choices without replacement. |
| Get | Populates the specified span with items chosen at random from the provided set of choices without replacement. |
| Next | Returns a random 64-bit integer. |
| Next | Returns a random unsigned integer less than the specified value. |
| Next | Returns a random 64-bit integer. |
| Next | Returns a non-negative random integer that is less than the specified maximum. |