summaryrefslogtreecommitdiff
path: root/lib/yule_walker.c
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-26 01:21:56 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-26 01:21:56 -0400
commitde8c6398f269c9fa14842c170b5b21651e817f9b (patch)
tree09b1fab1bf6e9993becceba305f8a858c1069615 /lib/yule_walker.c
parent94f7d887981f0626f166f5645fa98115d4f9a478 (diff)
downloadc++-de8c6398f269c9fa14842c170b5b21651e817f9b.tar.gz
c++-de8c6398f269c9fa14842c170b5b21651e817f9b.tar.bz2
c++-de8c6398f269c9fa14842c170b5b21651e817f9b.zip
removed some files that are now unused
Diffstat (limited to 'lib/yule_walker.c')
-rw-r--r--lib/yule_walker.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/lib/yule_walker.c b/lib/yule_walker.c
deleted file mode 100644
index 77b3e96..0000000
--- a/lib/yule_walker.c
+++ /dev/null
@@ -1,41 +0,0 @@
-
-#include "yule_walker.h"
-
-double yule_walker(const autocorr_t *a) {
- gsl_vector *rhos = gsl_vector_alloc(a->W);
- gsl_matrix *mat = gsl_matrix_alloc(a->W, a->W);
- gsl_vector *phis = gsl_vector_alloc(a->W);
-
- for (count_t i = 0; i < a->W; i++) {
- gsl_vector_set(rhos, i, rho(a, i));
- }
-
- for (count_t i = 0; i < a->W; i++) {
- gsl_matrix_set(mat, i, i, 1.0);
-
- for (count_t j = 0; j < i; j++) {
- gsl_matrix_set(mat, i, j, gsl_vector_get(rhos, i - 1 - j));
- }
-
- for (count_t j = 0; j < a->W - 1 - i; j++) {
- gsl_matrix_set(mat, i, i + 1 + j, gsl_vector_get(rhos, j));
- }
- }
-
- int out = gsl_linalg_cholesky_solve(mat, rhos, phis);
-
- double rhophi = 0;
- double onephi = 0;
-
- for (count_t i = 0; i < a->W; i++) {
- rhophi += gsl_vector_get(rhos, i) * gsl_vector_get(phis, i);
- onephi += gsl_vector_get(phis, i);
- }
-
- gsl_vector_free(rhos);
- gsl_matrix_free(mat);
- gsl_vector_free(phis);
-
- return (1 - rhophi) / pow(1 - onephi, 2);
-}
-