Mir 1.0
Mir application programming interface
 
Loading...
Searching...
No Matches

Data Structures

struct  mirml_nr_spqntl_t_
 Structure for single-pass estimation of arbitrary quantiles. More...
 

Typedefs

typedef struct mirml_nr_spqntl_t_ mirml_nr_spqntl_t
 Structure for single-pass estimation of arbitrary quantiles.
 

Functions

void mirml_nr_spqntl_init_default (mirml_nr_spqntl_t *spqntl)
 Initialize parameters for single-pass algorithm to default values.
 
mirkl_error_tmirml_nr_spqntl_alloc (mirml_nr_spqntl_t *spqntl)
 Allocate required buffers.
 
void mirml_nr_spqntl_free (mirml_nr_spqntl_t *spqntl)
 Free allocated buffers.
 
mirkl_error_tmirml_nr_spqntl_add (mirml_nr_spqntl_t *spqntl, double datum)
 Feed single-pass algorithm with a data point.
 
mirkl_error_tmirml_nr_spqntl_report (mirml_nr_spqntl_t *spqntl, double p, double *q)
 Calculate estimated p-quantile for the data seen so far.
 

Detailed Description

Function Documentation

◆ mirml_nr_spqntl_report()

mirkl_error_t * mirml_nr_spqntl_report ( mirml_nr_spqntl_t spqntl,
double  p,
double *  q 
)

Calculate estimated p-quantile for the data seen so far.

Parameters
[in]pp-value, for example 0.5 for median.
[out]qEstimated p-quantile