Discrete Distribution<T>.Get Random Sequence Method
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
Overload List
| Get | Returns a sequence of random samples from the distribution. |
| Get | Returns a sequence of random samples from the distribution. |
| Get | Returns a sequence of random samples from the distribution. |
| Get | Returns a sequence of random samples of the specified length from the distribution. |
| Get | Returns a sequence of random samples of the specified length from the distribution. |
| Get | Returns a sequence of random samples from the distribution. |
| Get | Returns a sequence of random samples of the specified length from the distribution. |
GetRandomSequence
Remarks
This method uses the default random number generator specified by RandomSource to generate an enumerable sequence of random samples from the distribution.
GetRandomSequence(IRandomSource)
public IEnumerable<T> GetRandomSequence(
IRandomSource random
)Parameters
- random IRandomSource
- A Random object that specifies the uniform random number generator that is to be used to generate the samples.
Return Value
IEnumerable<T>An IEnumerable<T>.
Remarks
This method uses the random number generator specified by random to generate an enumerable sequence of random samples from the distribution.
Exceptions
| Argument | random is null. |
GetRandomSequence<TGenerator>(IRandomSource<TGenerator>)
public IEnumerable<T> GetRandomSequence<TGenerator>(
IRandomSource<TGenerator> random
)
where TGenerator : struct, new(), IRandomGenerator
Parameters
- random IRandomSource<TGenerator>
- A Random object that specifies the uniform random number generator that is to be used to generate the samples.
Type Parameters
- TGenerator
Return Value
IEnumerable<T>An IEnumerable<T>.
Remarks
This method uses the random number generator specified by random to generate an enumerable sequence of random samples from the distribution.
Exceptions
| Argument | random is null. |
GetRandomSequence(Random)
public IEnumerable<T> GetRandomSequence(
Random random
)Parameters
- random Random
- A Random object that specifies the uniform random number generator that is to be used to generate the samples.
Return Value
IEnumerable<T>An IEnumerable<T>.
Remarks
This method uses the random number generator specified by random to generate an enumerable sequence of random samples from the distribution.
Exceptions
| Argument | random is null. |
GetRandomSequence(IRandomSource, Int32)
public IEnumerable<T> GetRandomSequence(
IRandomSource random,
int length
)Parameters
- random IRandomSource
- A Random object that specifies the uniform random number generator that is to be used to generate the samples.
- length Int32
- The length of the sequence.
Return Value
IEnumerable<T>An IEnumerable<Double>.
Remarks
This method uses random to generate an enumerable sequence of random samples from the distribution.
If length is less than zero then an empty sequence is returned.
Exceptions
| Argument | random is null. |
GetRandomSequence<TGenerator>(IRandomSource<TGenerator>, Int32)
public IEnumerable<T> GetRandomSequence<TGenerator>(
IRandomSource<TGenerator> random,
int length
)
where TGenerator : struct, new(), IRandomGenerator
Parameters
- random IRandomSource<TGenerator>
- A Random object that specifies the uniform random number generator that is to be used to generate the samples.
- length Int32
- The length of the sequence.
Type Parameters
- TGenerator
Return Value
IEnumerable<T>An IEnumerable<Double>.
Remarks
This method uses random to generate an enumerable sequence of random samples from the distribution.
If length is less than zero then an empty sequence is returned.
Exceptions
| Argument | random is null. |
GetRandomSequence(Random, Int32)
public IEnumerable<T> GetRandomSequence(
Random random,
int length
)Parameters
- random Random
- A Random object that specifies the uniform random number generator that is to be used to generate the samples.
- length Int32
- The length of the sequence.
Return Value
IEnumerable<T>An IEnumerable<Double>.
Remarks
This method uses random to generate an enumerable sequence of random samples from the distribution.
If length is less than zero then an empty sequence is returned.
Exceptions
| Argument | random is null. |