Returns a single random sample from a transformed gamma distribution
with the specified parameters.
Namespace: Extreme.Statistics.DistributionsAssembly: Extreme.Numerics.Net40 (in Extreme.Numerics.Net40.dll) Version: 6.0.16073.0 (6.0.16312.0)
public static double Sample(
Random random,
double shape1,
double shape2,
double scale
)
Public Shared Function Sample (
random As Random,
shape1 As Double,
shape2 As Double,
scale As Double
) As Double
public:
static double Sample(
Random^ random,
double shape1,
double shape2,
double scale
)
static member Sample :
random : Random *
shape1 : float *
shape2 : float *
scale : float -> float
Parameters
- random
- Type: SystemRandom
The Random
derived random number generator used to generate
the sample. - shape1
- Type: SystemDouble
The first shape parameter of the distribution. Must be
strictly greater than zero. - shape2
- Type: SystemDouble
The second shape parameter of the distribution. Must be
strictly greater than zero. - scale
- Type: SystemDouble
The scale parameter. Must be
strictly greater than zero.
Return Value
Type:
DoubleA double-precision floating-point number that
is a sample from the transformed gamma distribution with the
specified parameters.
scale must be strictly greater than zero.
This method is useful when only a single random sample
is required, or if the parameters of the distribution
change often. To obtain a large number of samples from a
distribution with identical parameters, create an
instance of the class and call the Sample(Random, Double, Double, Double)
method repeatedly.
Numerical Libraries
Supported in: 6.0, 5.x, 4.x
Reference