CREATE_RANDOM_LAPLACE_MATRIX
This procedure creates a new matrix filled with Laplace distributed pseudo-random variables using the parameters shift and Beta. The formula is as follows: x = -Beta*ln(u1) + shift, u2 <= 1/2 Beta*ln(u1) + shift, u2 > 1/2 Where u1, u2 is a pair of successive random numbers of a uniform distribution over the interval (0, 1).
Usage
The CREATE_RANDOM_LAPLACE_MATRIX stored procedure has the following syntax:
- CREATE_RANDOM_LAPLACE_MATRIX(matrixOut,numberOfRows,numberOfCols,shift,beta)
- Paramters
- matrixOut
- The name of the matrix to be generated.
- numberOfRows
- The number of matrix rows.
- numberOfCols
- The number of matrix columns.
- shift
- The value used for shift.
- beta
- The value used for Beta.
Details
This procedure uses the MKL library.
Examples
CALL nzm..CREATE_RANDOM_LAPLACE_MATRIX('A', 5, 10, 1.0, 0.1);
CALL nzm..GET_NUM_COLS('A');
CALL nzm..GET_NUM_ROWS('A');
CALL nzm..ANY_NONZERO('A');
CALL nzm..DELETE_MATRIX ('A' );
CREATE_RANDOM_LAPLACE_MATRIX
------------------------------
t
(1 row)
GET_NUM_COLS
--------------
10
(1 row)
GET_NUM_ROWS
--------------
5
(1 row)
ANY_NONZERO
-------------
1
(1 row)
DELETE_MATRIX
---------------
t
(1 row)