covariance: Fix const-ness of covariance_calculate[_unnormalized] retval.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 12 Dec 2010 05:29:55 +0000 (21:29 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 12 Dec 2010 06:10:45 +0000 (22:10 -0800)
commit3c5fcaa67efcee56981c16b543fb9f679787a486
treeab882f1323014483f40a8c0a1ce72d6357e4cf46
parent44a9abb173e2b0f33b011a853ae1603fda0ce29b
covariance: Fix const-ness of covariance_calculate[_unnormalized] retval.

The covariance_calculate() and covariance_calculate_unnormalized()
functions documented that their return values were owned by the covariance
object itself and thus should not be freed by the caller.  However, this
documentation was incorrect, because in fact the covariance object did not
retain the pointer at all.  This commit fixes the comments, updates
the return values to be non-"const", and changes the callers to free the
returned "gsl_matrix" objects.
src/language/stats/correlations.c
src/language/stats/factor.c
src/language/stats/glm.c
src/language/stats/oneway.c
src/language/stats/regression.q
src/math/covariance.c
src/math/covariance.h