RandomSamplingExtensions.NextDouble Method

Generates a random sample from the specified continuous distribution.

Definition

Namespace: Numerics.NET.Statistics.Distributions
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
C#
public static double NextDouble(
	this Random random,
	ContinuousDistribution distribution
)

Parameters

random  Random
 
distribution  ContinuousDistribution
The probability distribution to sample from.

Return Value

Double
A random sample from the distribution.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also