HOME
LIBRARY
PRODUCTS
FORUMS
CART
Tel:
+44 (0) 20 7193 9303
Email Us
Join CodeCogs
Login
Email or Screen Name
Password
Login
I have forgotten
my Password
Or login with:
http://facebook.com/
https://www.google.com/accounts/o8/id
https://me.yahoo.com
COMPUTING
MATHS
STATISTICS
DISTRIBUTIONS
CONTINUOUS
DISCRETE
BINOMIAL
DISCRETE
Randomfast
Random Sample
HYPERGEOMETRIC
NEGATIVEBINOMIAL
POISSON
MOMENTS
RANDOM
Countif
Operators
Sumif
ENGINEERING
FINANCE
UNITS
STRINGS
PHYSICS
New Modules
Updated Modules
Statistics
›
Distributions
›
Discrete
›
Discrete
Random Sample
Generates random numbers following a discrete distribution.
int
sample
(int N, double* p, bool normalise=true, double seed=0.1234)
Randomfast
Generates random numbers for a discrete distribution in constant time.
template<class T> void
RandomFast<T>::init
(int n, T *p, bool normalise)
int
sampleFast
(int N, double* p, bool normalise=true, double seed=0.1234)