pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch #6650] one pass covariance algorithm


From: John Darrington
Subject: [patch #6650] one pass covariance algorithm
Date: Tue, 21 Oct 2008 00:50:16 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.15) Gecko/20080612 Iceweasel/2.0.0.15 (Debian-2.0.0.15-0etch1)

Follow-up Comment #10, patch #6650 (project pspp):

It looks a lot simpler.

Some things that occurred to me:

1. I'm confused that covariance_matrix.h now has a _init and a _create
function. Aren't they the same thing?  Similarly there is both a _destroy and
a _free function.

2. The non-static functions in covariance_matrix.c could all do with
comments.

3. You can simplify covariance_accumulator_to_matrix by having it take a
(struct covariance_matrix *) in place of the existing first 4 variables.  This
should also avoid a compiler warning.

4. In struct covariance_matrix, the member n_data is allocated and values are
assigned to it.  But so far as I can tell, these values are never used.  Is
this variable necessary?

5. In glm.q (run_glm) I think it would be easier to understand if some of the
variables' scope was reduced.  Eg: move cov, n_data, model etc into the stack
frame beginning  "if (n_indep > 0) {"

6. Again in run_glm, the first reference to n_data is n_data++, but n_data
has never been initialised.

7. What should I pass to argument 2 of covariance_matrix_compute when
computing a simple covariance matrix with no categorical variables involved? 
Is zero appropriate?

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?6650>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]