Statistics for MySQL  1.1
 All Classes Files Functions Variables Typedefs Macros Pages
Classes | Functions
skewness_pop.c File Reference

Population moment coefficient of skewness. More...

#include "sqlstat.h"
Include dependency graph for skewness_pop.c:

Go to the source code of this file.

Classes

struct  skewness_pop_storage
 Storage for population moment coefficient of skewness. More...
 

Functions

my_bool skewness_pop_init (UDF_INIT *initid, UDF_ARGS *args, char *message)
 Called before first usage of function. More...
 
void skewness_pop_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 skewness_pop_clear (UDF_INIT *initid, char *is_null, char *error)
 Called at start of group. More...
 
void skewness_pop_add (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
 Add a member of the group. More...
 
double skewness_pop (UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
 Retrieve population moment coefficient of skewness. Called at end of group. More...
 
void skewness_pop_deinit (UDF_INIT *initid)
 Called after last access to function. More...
 

Detailed Description

Population moment coefficient of skewness.

CREATE AGGREGATE FUNCTION skewness_pop RETURNS REAL SONAME 'libsqlstat.so';
SELECT skewness_pop(x) FROM mytab;
DROP FUNCTION skewness_pop;

Definition in file skewness_pop.c.

Function Documentation

double skewness_pop ( UDF_INIT *  initid,
UDF_ARGS *  args,
char *  is_null,
char *  error 
)

Retrieve population moment coefficient of skewness. Called at end of group.

Parameters
initidfunction description
argsargument values
is_nullresult is NULL
errorerror message
Returns
population moment coefficient of skewness

Definition at line 163 of file skewness_pop.c.

void skewness_pop_add ( UDF_INIT *  initid,
UDF_ARGS *  args,
char *  is_null,
char *  error 
)

Add a member of the group.

The counter and sums are updated

Parameters
initidfunction description
argsargument values
is_null
errorerror message

Definition at line 129 of file skewness_pop.c.

Here is the caller graph for this function:

void skewness_pop_clear ( UDF_INIT *  initid,
char *  is_null,
char *  error 
)

Called at start of group.

void skewness_pop_clear(UDF_INIT *initid, char *is_null, char *error) The counter and sums are cleared.

Parameters
initidfunction description
is_null
errorerror message

Definition at line 110 of file skewness_pop.c.

Here is the caller graph for this function:

void skewness_pop_deinit ( UDF_INIT *  initid)

Called after last access to function.

Deallocate memory for counter and sums.

Parameters
initid

Definition at line 200 of file skewness_pop.c.

my_bool skewness_pop_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.

Parameters
initidfunction description
argsparameters
messageerror message
Returns
success = 0

Definition at line 57 of file skewness_pop.c.

void skewness_pop_reset ( UDF_INIT *  initid,
UDF_ARGS *  args,
char *  is_null,
char *  error 
)

Reset function and add first group member Calls clear and add.

Parameters
initidfunction description
argsargument values
is_null
errorerror message
Deprecated:
Reset is only called by MySQL 4.0 and below. It is implemented for backwards compatibility.

Definition at line 96 of file skewness_pop.c.

Here is the call graph for this function: