TwiceAsNice  2019-02-18
Functions
libdspau-stats.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
#include "libdspau.h"
Include dependency graph for libdspau-stats.c:

Functions

double dspau_minmidmax (double *in, int len, double *min, double *max)
 Gets minimum, mid, and maximum values of the input stream. More...
 
double dspau_mean (double *in, int len)
 A mean calculator. More...
 

Function Documentation

◆ dspau_mean()

double dspau_mean ( double *  in,
int  len 
)

A mean calculator.

Parameters
inthe input stream. (input)
lenthe length of the input stream.
Returns
the mean value of the stream. Return mean if success.

◆ dspau_minmidmax()

double dspau_minmidmax ( double *  in,
int  len,
double *  min,
double *  max 
)

Gets minimum, mid, and maximum values of the input stream.

Parameters
inthe input stream. (input)
lenthe length of the input stream.
minthe minimum value (output).
maxthe maximum value (output).
Returns
the mid value (max - min) / 2 + min. Return mid if success.