randDiscrete#
- swordfish.function.randDiscrete()#
Generate a sample of size count with random values sampling from v based on the specified probability distribution p.
- Parameters:
v (Constant) – A vector/tuple indicating the sample data.
p (Constant) – A vector of floating point type of the same length as v. Each element in p must be a positive number, indicating the probability distribution of v.
count (Constant) – A positive integer indicating the length of the output vector.