#include "algorithm.h"
#include "alloc.h"
#include "moments.h"
+#include "percentiles.h"
#include <stdlib.h>
#include <math.h>
(hsh_hash_func *) hash_value,
(hsh_free_func *) weighted_value_free,
(void *) 0);
-
-
-
}
gsl_histogram_accumulate(m->histogram, wv[i]->v.f, wv[i]->w);
}
-
/* Trimmed mean calculation */
if ( m->n_data <= 1 )
{
if ( cc < tc )
k1 = i;
-
}
+
+
k2 = m->n_data;
for ( i = m->n_data -1 ; i >= 0; --i )
{
k2 = i;
}
+
+ /* Calculate the percentiles */
+ ptiles(m->ptile_hash, m->wvp, m->n_data, m->n, m->ptile_alg);
+
+ tukey_hinges(m->wvp, m->n_data, m->n, m->hinges);
+
/* Special case here */
if ( k1 + 1 == k2 )
{