Weighted standard deviation of sample. More...
#include "sqlstat.h"
Go to the source code of this file.
Classes | |
struct | stddevw_samp_storage |
Storage for weighted standard deviation of sample. More... | |
Functions | |
my_bool | stddevw_samp_init (UDF_INIT *initid, UDF_ARGS *args, char *message) |
Called before first usage of function. More... | |
void | stddevw_samp_reset (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) |
Reset function and add first group member Calls clear and add. More... | |
void | stddevw_samp_clear (UDF_INIT *initid, char *is_null, char *error) |
Called at start of group. More... | |
void | stddevw_samp_add (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) |
Add a member of the group. More... | |
double | stddevw_samp (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) |
Retrieve weighted standard deviation of sample. Called at end of group. More... | |
void | stddevw_samp_deinit (UDF_INIT *initid) |
Called after last access to function. More... | |
Weighted standard deviation of sample.
CREATE AGGREGATE FUNCTION stddevw_samp RETURNS REAL SONAME 'libsqlstat.so'; SELECT stddevw_samp(x) FROM mytab; DROP FUNCTION stddevw_samp;
Definition in file stddevw_samp.c.
double stddevw_samp | ( | UDF_INIT * | initid, |
UDF_ARGS * | args, | ||
char * | is_null, | ||
char * | error | ||
) |
Retrieve weighted standard deviation of sample. Called at end of group.
initid | function description |
args | argument values |
is_null | result is NULL |
error | error message |
Definition at line 161 of file stddevw_samp.c.
void stddevw_samp_add | ( | UDF_INIT * | initid, |
UDF_ARGS * | args, | ||
char * | is_null, | ||
char * | error | ||
) |
Add a member of the group.
The counter and sums are updated
initid | function description |
args | argument values |
is_null | |
error | error message |
Definition at line 128 of file stddevw_samp.c.
void stddevw_samp_clear | ( | UDF_INIT * | initid, |
char * | is_null, | ||
char * | error | ||
) |
Called at start of group.
void stddevw_samp_clear(UDF_INIT *initid, char *is_null, char *error) The counter and sums are cleared.
initid | function description |
is_null | |
error | error message |
Definition at line 110 of file stddevw_samp.c.
void stddevw_samp_deinit | ( | UDF_INIT * | initid | ) |
Called after last access to function.
Deallocate memory for counter and sums.
initid |
Definition at line 191 of file stddevw_samp.c.
my_bool stddevw_samp_init | ( | UDF_INIT * | initid, |
UDF_ARGS * | args, | ||
char * | message | ||
) |
Called before first usage of function.
Check parameters.
Indicate type of return value.
Allocate memory for counter and sums.
initid | function description |
args | parameters |
message | error message |
Definition at line 57 of file stddevw_samp.c.
void stddevw_samp_reset | ( | UDF_INIT * | initid, |
UDF_ARGS * | args, | ||
char * | is_null, | ||
char * | error | ||
) |
Reset function and add first group member Calls clear and add.
initid | function description |
args | argument values |
is_null | |
error | error message |
Definition at line 96 of file stddevw_samp.c.