Generate random number from standard normal distribution. More...
Go to the source code of this file.
Functions | |
my_bool | rand_norm_init (UDF_INIT *initid, UDF_ARGS *args, char *message) |
Called before first usage of function. More... | |
double | rand_norm (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) |
Retrieve a variate of the normal distribution. More... | |
void | rand_norm_deinit (UDF_INIT *initid) |
Called after last access to function. More... | |
Generate random number from standard normal distribution.
CREATE FUNCTION rand_norm RETURNS REAL SONAME 'libsqlstat.so'; SELECT rand_norm() FROM mytab; DROP FUNCTION rand_norm;
Definition in file rand_norm.cc.
double rand_norm | ( | UDF_INIT * | initid, |
UDF_ARGS * | args, | ||
char * | is_null, | ||
char * | error | ||
) |
Retrieve a variate of the normal distribution.
The default value for the mean is 0, the default value of the standard deviation is 1.
initid | function description |
args | argument values |
is_null | result is NULL |
error | error message |
Definition at line 84 of file rand_norm.cc.
rand_norm_deinit | ( | UDF_INIT * | initid | ) |
Called after last access to function.
initid |
Definition at line 111 of file rand_norm.cc.
my_bool rand_norm_init | ( | UDF_INIT * | initid, |
UDF_ARGS * | args, | ||
char * | message | ||
) |
Called before first usage of function.
Checksparameters.
Indicate type of return value.
initid | function description |
args | parameters |
message | error message |
Definition at line 46 of file rand_norm.cc.