if (a_star[i] < 1)
{
- if (os->k[i].c_p1 >= 1 )
+ if (os->k[i].c_p1 >= 1)
{
hinge[i] = (1 - a_star[i]) * os->k[i].y
+ a_star[i] * os->k[i].y_p1;
destroy (struct statistic *s)
{
struct tukey_hinges *th = UP_CAST (s, struct tukey_hinges, parent.parent);
- struct order_stats *os = &th->parent;
-
- free (os->k);
- free (s);
+ free (th);
};
struct tukey_hinges *
tukey_hinges_create (double W, double c_min)
{
double d;
- struct tukey_hinges *th = xzalloc (sizeof (*th));
+ struct tukey_hinges *th = XZALLOC (struct tukey_hinges);
struct order_stats *os = &th->parent;
struct statistic *stat = &os->parent;
assert (c_min >= 0);
os->n_k = 3;
- os->k = xcalloc (sizeof (*os->k), 3);
+ os->k = th->k;
- if ( c_min >= 1.0)
+ if (c_min >= 1.0)
{
d = floor ((W + 3) / 2.0) / 2.0;