8 #define _MATH_DEFINES_DEFINED 28 char *ptr = (
char*)input;
45 double mean_d(
double *input,
int size,
int byteIncrement)
49 char *ptr = (
char*)input;
56 for (i = 0; i < size; i++)
59 sum += *((
double*)ptr);
71 char *ptr = (
char*)input;
78 for (i = 0; i < size; i++)
81 sum += *((int32_t*)ptr);
89 double mean_int64(int64_t *input,
int size,
int byteIncrement)
93 char *ptr = (
char*)input;
100 for (i = 0; i < size; i++)
103 sum += *((int64_t*)ptr);
104 ptr += byteIncrement;
117 char *ptr = (
char*)input;
123 ave =
mean(input, size, byteIncrement);
125 for(i=0; i<size; i++)
127 dev = (*((
f_t*)ptr)) - ave;
129 ptr += byteIncrement;
136 double variance_d(
double *input,
int size,
int byteIncrement)
142 char *ptr = (
char*)input;
148 ave =
mean_d(input, size, byteIncrement);
150 for (i = 0; i < size; i++)
152 dev = (*((
double*)ptr)) - ave;
154 ptr += byteIncrement;
167 char *ptr = (
char*)input;
175 for (i = 0; i < size; i++)
177 dev = ((
f_t)(*((int32_t*)ptr))) - ave;
179 ptr += byteIncrement;
192 char *ptr = (
char*)input;
200 for (i = 0; i < size; i++)
202 dev = ((double)(*((int64_t*)ptr))) - ave;
204 ptr += byteIncrement;
216 char *ptr = (
char*)input;
224 *ave =
mean(input, size, byteIncrement);
226 for(i=0; i<size; i++)
228 dev = (*((
f_t*)ptr)) - *ave;
230 ptr += byteIncrement;
254 return sqrt(
variance_d(input, size, byteIncrement));
302 result[0] =
_SQRT(
variance( &input[0], size, byteIncrement ) );
303 result[1] =
_SQRT(
variance( &input[1], size, byteIncrement ) );
304 result[2] =
_SQRT(
variance( &input[2], size, byteIncrement ) );
324 ave[0] =
mean(&input[0], size, byteIncrement);
325 ave[1] =
mean(&input[1], size, byteIncrement);
326 ave[2] =
mean(&input[2], size, byteIncrement);
380 char *ptr = (
char*)input;
386 for (i = 0; i < size; i++)
388 dev = (*((
f_t*)ptr)) - ave;
390 ptr += byteIncrement;
f_t variance_int32(int32_t *input, int size, int byteIncrement)
void mul_Vec3_Vec3(ixVector3 result, const ixVector3 v1, const ixVector3 v2)
f_t standard_deviation_mean(f_t *input, f_t *mean, int size, int byteIncrement)
double variance_d(double *input, int size, int byteIncrement)
f_t standard_deviation(f_t *input, int size, int byteIncrement)
void standard_deviation_Vec3(ixVector3 result, ixVector3 input, int size, int byteIncrement)
void mean_Vec3(ixVector3 ave, ixVector3 input, int size, int byteIncrement)
static __inline void lpf_alpha_beta(float dt, float cornerFreq, float *alpha, float *beta)
Find alpha and beta parameters for single pole Low-Pass filter.
f_t mean_int32(int32_t *input, int size, int byteIncrement)
double standard_deviation_int64(int64_t *input, int size, int byteIncrement)
void sqrt_Vec3(ixVector3 result, const ixVector3 v)
void sub_Vec3_Vec3(ixVector3 result, const ixVector3 v1, const ixVector3 v2)
double mean_d(double *input, int size, int byteIncrement)
double mean_int64(int64_t *input, int size, int byteIncrement)
void init_realtime_std_dev_Vec3(sRTSDVec3 *s, float dt, float aveCornerFreqHz, float varCornerFreqHz, ixVector3 initVal)
double standard_deviation_d(double *input, int size, int byteIncrement)
f_t root_mean_squared(f_t *input, int size, int byteIncrement, float ave)
void realtime_std_dev_Vec3(f_t *input, sRTSDVec3 *s)
static __inline void O0_LPF_Vec3(ixVector3 result, const ixVector3 input, f_t alph, f_t beta)
f_t variance_mean(f_t *input, f_t *ave, int size, int byteIncrement)
f_t mean(f_t *input, int size, int byteIncrement)
double variance_int64(int64_t *input, int size, int byteIncrement)
void stardard_deviation_mean_Vec3(ixVector3 result, ixVector3 input, ixVector3 mean, int size, int byteIncrement)
f_t delta_mean(f_t *input, int size, int byteIncrement, float ave)
f_t standard_deviation_int32(int32_t *input, int size, int byteIncrement)
f_t variance(f_t *input, int size, int byteIncrement)
static __inline void cpy_Vec3_Vec3(ixVector3 result, const ixVector3 v)