V138: Multinomial Random Numbers
Author(s): D. Drijard, K.S. Kölbig | Library: MATHLIB
|
Submitter: | Submitted: 15.10.1994
|
Language: Fortran | Revised:
|
Subroutine subprogram RNMNML generates a vector of random integers
with probabilities
according to the multinomial distribution
Structure:
SUBROUTINE subprogram
User Entry Names: RNMNML
External References: RANLUX
Usage:
CALL RNMNML(N,NSUM,PCUM,NVEC,IERR)
- N
- (INTEGER) Number N of random integers
requested.
- NSUM
- (INTEGER) , specified by the user.
- PCUM
- (REAL) One-dimensional array of length
. Must contains, on entry, the (normalized)
cumulative channel probabilities
in . In particular,
.
- NVEC
- (INTEGER) One-dimensional array of length
. On exit, NVEC(i),(i = 1,...,N)
contains the generated random integers.
- IERR
- Error flag.
Normal case,
for one i al least,
.
Notes:
For N=2, use RNBNML (V137).
Michel Goossens
Wed Jun 5 08:53:03 METDST 1996