Next: V113 Fast Uniform
Up: CERNLIB
Previous: V111 Binomial Random
Routine ID: V112
| Author(s): D. Drijard | Library: MATHLIB
|
Submitter: | Submitted: 15.09.1978
|
Language: Fortran | Revised:
|
OBSOLETE
Please note that this routine has been obsoleted in CNL 218. Users are
advised not to use it any longer and to replace it in older programs.
No maintenance for it will take place and it will eventually disappear.
Suggested replacement: RNMNML (V138)
MUNOMI generates a vector of random integers
with probabilities
according to a multinomial law:
Structure:
SUBROUTINE subprogram
User Entry Names: MUNOMI
External References: RNDM (V104), UZERO (V300)
Usage:
CALL MUNOMI(NCH,NTOT,P,N,IERR)
- NCH
- ( INTEGER) Number N of random integers
requested.
- NTOT
- ( INTEGER) Equals
,
specified by the user.
- P
- ( REAL) One-dimensional array of length NCH at least.
On entry, it contains in P(i) the probability of channel i.
On return, it contains the cumulative channel probabilities so that
. If
on entry, it is assumed that
P(i) contains the cumulative probabilities rather than the
individual probabilites, which saves some time.
- N
- ( INTEGER) One-dimensional array of length NCH at
least. On return, N(i) contains the generated random integers.
- IERR
- Error flag.
Normal case,
At least one
,
.
V113
Janne Saarela
Mon Apr 3 15:06:23 METDST 1995