Returns a vector of random samples from the distribution.
Namespace:
Extreme.Statistics.Distributions
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public virtual Vector<double> Sample(
int size,
Random random
)
Public Overridable Function Sample (
size As Integer,
random As Random
) As Vector(Of Double)
public:
virtual Vector<double>^ Sample(
int size,
Random^ random
)
abstract Sample :
size : int *
random : Random -> Vector<float>
override Sample :
size : int *
random : Random -> Vector<float>
Parameters
- size
- Type: SystemInt32
The number of samples to return. - random
- Type: SystemRandom
A Random object that specifies the
uniform random number generator that is to be used to generate the samples.
Return Value
Type:
VectorDoubleA vector of
size samples
from the distribution.
This method uses the random number generator
specified by random to
generate a random sample from the distribution.
The return values of successive calls to this method
follow the distribution represented by this
Distribution.
Reference