Random Stream Source<TRandom> Class
Provides a base implementation for hierarchical random stream sources.
Definition
Namespace: Numerics.NET.Random
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
C#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
public abstract class RandomStreamSource<TRandom> : IRandomStreamSource<TRandom>
where TRandom : Object, IRandomSourceFactory<TRandom>
- Inheritance
- Object → RandomStreamSource<TRandom>
- Derived
- Implements
- IRandomStreamSource<TRandom>
Type Parameters
- TRandom
- The type of random number generator produced by this source.
Remarks
RandomStreamSource<TRandom> implements the common mechanics for managing hierarchical stream sources, including:
- Path storage and management
- Next index tracking
- Base options storage
- Branching logic
Derived classes must implement the stream generation logic specific to their model (mixing-based or jump-based).
Constructors
| Random | Initializes a new instance of the RandomStreamSource<TRandom> class. |
Properties
| Next | Gets the index of the next stream to be consumed at this scope. |
| Path | Gets the hierarchical path identifying the current scope. |
| Prefix | Gets the hierarchical prefix path from root to this scope. |
Methods
| Advance | Advances the next index by the specified count without generating streams. |
| Branch | Creates a child stream source at the specified index without advancing this source. |
| Branch | Creates a child stream source at the current next index and advances this source. |
| Create | Creates a child stream source with the specified index. |
| 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) |
| Get | Serves as the default hash function. (Inherited from Object) |
| Get | Gets the Type of the current instance. (Inherited from Object) |
| Memberwise | Creates a shallow copy of the current Object. (Inherited from Object) |
| Next | Returns an RNG for the next child stream and advances the index. |
| Next | Returns an array of RNGs for the next N child streams and advances the index. |
| Next | Fills the specified span with the next child streams and advances the index. |
| Prefix | Returns an RNG corresponding to the current path prefix only. |
| Seek | Sets the next stream index to the specified value. |
| ToString | Returns a string that represents the current object. (Inherited from Object) |
Fields
| _base | The base initialization options used as a template for derived streams. |