projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
string-array: Drop unused parameter from STRING_ARRAY_INITIALIZER.
[pspp]
/
src
/
math
/
linreg.c
diff --git
a/src/math/linreg.c
b/src/math/linreg.c
index d1e0dae980e1e12c03e312b0fcbf7fd6139b6fb7..f60672e2ca8ae736940ca7b19a1f9693ede3d2de 100644
(file)
--- a/
src/math/linreg.c
+++ b/
src/math/linreg.c
@@
-275,11
+275,11
@@
linreg_predict (const struct linreg *c, const double *vals, size_t n_vals)
size_t j;
double result;
size_t j;
double result;
- assert (n_vals == c->n_coeffs);
if (vals == NULL || c == NULL)
{
return GSL_NAN;
}
if (vals == NULL || c == NULL)
{
return GSL_NAN;
}
+ assert (n_vals == c->n_coeffs);
if (c->coeff == NULL)
{
/* The stupid model: just guess the mean. */
if (c->coeff == NULL)
{
/* The stupid model: just guess the mean. */
@@
-445,7
+445,7
@@
linreg_fit (const gsl_matrix *cov, struct linreg *l)
linreg_fit_qr (cov, l);
}
else
linreg_fit_qr (cov, l);
}
else
-#endif
+#endif
{
gsl_matrix *params = gsl_matrix_calloc (cov->size1, cov->size2);
gsl_matrix_memcpy (params, cov);
{
gsl_matrix *params = gsl_matrix_calloc (cov->size1, cov->size2);
gsl_matrix_memcpy (params, cov);