CONT_TABLE Procedure (PV-WAVE Advantage)
Sets up table to generate pseudorandom numbers from a general continuous distribution.
Usage
CONT_TABLE, f, iopt, ndata, table
Input Parameters
f—A scalar string specifying a user-supplied function to compute the cumulative distribution function. The argument to the function is the point at which the distribution function is to be evaluated.
iopt—Indicator of the extent to which table is initialized prior to calling CONT_TABLE.
0
—CONT_TABLE fills the last four columns of table. The user inputs the points at which the CDF is to be evaluated in the first column of table. These must be in ascending order.
1
—CONT_TABLE fills the last three columns of table. The user supplied function
f is not used and may be a dummy function; instead, the cumulative distribution function is specified in the first two columns of table. The abscissas (in the first column) must be in ascending order and the function must be strictly monotonically increasing.
ndata—Number of points at which the CDF is evaluated for interpolation. ndata must be greater than or equal to 4.
Input/Output Parameters
table—ndata by 5 table to be used for interpolation of the cumulative distribution function. The first column of table contains abscissas of the cumulative distribution function in ascending order, the second column contains the values of the CDF (which must be strictly increasing), and the remaining columns contain values used in interpolation. The first row of table corresponds to the left limit of the support of the distribution and the last row corresponds to the right limit of the support; that is, table (0, 1) = 0.0 and table(ndata – 1, 1) = 1.0.
Input Keywords
Double—If present and nonzero, double precision is used.
Discussion
CONT_TABLE sets up a table that
RAND_GEN_CONT Function (PV-WAVE Advantage) can use to generate pseudorandom deviates from a continuous distribution. The distribution is specified by its cumulative distribution function, which can be supplied either in tabular form in
table or by a function
f. See the documentation for the routine RAND_GEN_CONT for a description of the method.
Example
For an example of using CONT_TABLE see the example for RAND_GEN_CONT.
Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.