static void
ssq_type1 (struct covariance *cov, gsl_vector *ssq, const struct glm_spec *cmd)
{
- gsl_matrix *cm = covariance_calculate_unnormalized (cov);
+ const gsl_matrix *cm = covariance_calculate_unnormalized (cov);
size_t i;
size_t k;
bool *model_dropped = xcalloc (covariance_dim (cov), sizeof (*model_dropped));
free (model_dropped);
free (submodel_dropped);
- gsl_matrix_free (cm);
}
/*
static void
ssq_type2 (struct covariance *cov, gsl_vector *ssq, const struct glm_spec *cmd)
{
- gsl_matrix *cm = covariance_calculate_unnormalized (cov);
+ const gsl_matrix *cm = covariance_calculate_unnormalized (cov);
size_t i;
size_t k;
bool *model_dropped = xcalloc (covariance_dim (cov), sizeof (*model_dropped));
free (model_dropped);
free (submodel_dropped);
- gsl_matrix_free (cm);
}
/*
static void
ssq_type3 (struct covariance *cov, gsl_vector *ssq, const struct glm_spec *cmd)
{
- gsl_matrix *cm = covariance_calculate_unnormalized (cov);
+ const gsl_matrix *cm = covariance_calculate_unnormalized (cov);
size_t i;
size_t k;
bool *model_dropped = xcalloc (covariance_dim (cov), sizeof (*model_dropped));
gsl_matrix_free (model_cov);
}
free (model_dropped);
-
- gsl_matrix_free (cm);
}
}
{
- gsl_matrix *cm = covariance_calculate_unnormalized (cov);
+ const gsl_matrix *ucm = covariance_calculate_unnormalized (cov);
+ gsl_matrix *cm = gsl_matrix_alloc (ucm->size1, ucm->size2);
+ gsl_matrix_memcpy (cm, ucm);
// dump_matrix (cm);
break;
}
// dump_matrix (cm);
-
gsl_matrix_free (cm);
}