Go to the documentation of this file.
36 for (
i = 0;
i < 100;
i++) {
40 var[0] = (
av_lfg_get(&lfg) / (double) UINT_MAX - 0.5) * 2;
41 var[1] = var[0] +
av_lfg_get(&lfg) / (double) UINT_MAX - 0.5;
42 var[2] = var[1] +
av_lfg_get(&lfg) / (double) UINT_MAX - 0.5;
43 var[3] = var[2] +
av_lfg_get(&lfg) / (double) UINT_MAX - 0.5;
46 for (order = 0; order < 3; order++) {
48 printf(
"real:%9f order:%d pred:%9f var:%f coeffs:%f %9f %9f\n",
49 var[0], order, eval, sqrt(m.
variance[order] / (
i + 1)),
Linear least squares model.
av_cold void av_lfg_init(AVLFG *c, unsigned int seed)
double variance[MAX_VARS]
#define LOCAL_ALIGNED(a, t, v,...)
static unsigned int av_lfg_get(AVLFG *c)
Get the next random unsigned 32-bit number using an ALFG.
av_cold void avpriv_init_lls(LLSModel *m, int indep_count)
void(* update_lls)(struct LLSModel *m, const double *var)
Take the outer-product of var[] with itself, and add to the covariance matrix.
Context structure for the Lagged Fibonacci PRNG.
printf("static const uint8_t my_array[100] = {\n")
double(* evaluate_lls)(struct LLSModel *m, const double *var, int order)
Inner product of var[] and the LPC coefs.
#define i(width, name, range_min, range_max)
double coeff[32][MAX_VARS]
void avpriv_solve_lls(LLSModel *m, double threshold, unsigned short min_order)