[Top][All Lists]

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

Re: src/math organization

From: Ben Pfaff
Subject: Re: src/math organization
Date: Sun, 21 Jan 2007 11:43:35 -0800
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Jason Stover <address@hidden> writes:

> To write a GLM procedure (which, unlike a time series procedure, would
> be useful to a lot of people), I need to create another data structure
> I'll call an "interaction". The interaction, like the code in 
> design-matrix.[ch]
> and coefficient.[ch], is just a place for "support" data structures 
> for the model-fitting code in directories like math/linreg.
> Right now, there is a circular dependency in src/math because the code
> in src/math/linreg relies on src/math/design-matrix.[ch] and 
> src/math/coefficient.[ch],
> but src/math/libpspp_math.a relies on src/math/linreg/libpspp_linreg.a.
> Before adding interaction code, I'd like remove this circular dependence.
> coefficient.[ch], design-matrix.[ch] and interaction.[ch] don't need to
> know about linreg, time series, or any other model-fitting code in a 
> subdirectory
> of src/math.
> So to fix this, should I create a new directory, say, src/math/model_data,
> or place that directory elsewhere? 

Well, I'm not sure.  How are you planning to remove the circular
dependency, first?  Are you going to move code into linreg?  If,
for example, although design-matrix.[ch] doesn't need to know
about linreg, it's not useful without it, then it could
reasonably be moved into linreg.  I don't have a good enough
understanding of this code to make a call.

Oh, perhaps I see your point now: you want to move those files
into a new directory, and you want to figure out whether it
should be under src/math or separate.  I'd figure that it should
be under src/math because it seems more closely related to what's
in src/math than it is to any other directory.

> Also, I'm not sure what this directory should be called. It will
> contain data structures that make pspp able to use the model-fitting
> code by matching the output from the model-fitting to the names that
> users use for things (like variables, values, data sets) to
> model-fitting equivalents, like design matrices. Given that, what
> would be a good name for this directory?

I don't have a better name than model-data.

I prefer hyphens to underscores in file names, by the way.
"Long noun chains don't automatically imply security."
--Bruce Schneier

reply via email to

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