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 tex2html_wrap_inline75 with probabilities tex2html_wrap_inline77 according to the multinomial distribution

displaymath79

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 tex2html_wrap_inline83 requested.
NSUM
(INTEGER) tex2html_wrap_inline85 , specified by the user.
PCUM
(REAL) One-dimensional array of length tex2html_wrap_inline87 . Must contains, on entry, the (normalized) cumulative channel probabilities tex2html_wrap_inline89 in tex2html_wrap_inline91 . In particular, tex2html_wrap_inline93 .
NVEC
(INTEGER) One-dimensional array of length tex2html_wrap_inline95 . On exit, NVEC(i),(i = 1,...,N) contains the generated random integers.
IERR
Error flag.
tex2html_wrap_inline97 Normal case,
tex2html_wrap_inline99 tex2html_wrap_inline101 for one i al least,
tex2html_wrap_inline103 tex2html_wrap_inline105 .

Notes:

For N=2, use RNBNML (V137).
tex2html_wrap_inline109


Michel Goossens Wed Jun 5 08:53:03 METDST 1996