* Function interface for Least-Squares Fitting
@ 2004-10-20 22:07 Jari Häkkinen
2004-10-21 15:00 ` Brian Gough
0 siblings, 1 reply; 4+ messages in thread
From: Jari Häkkinen @ 2004-10-20 22:07 UTC (permalink / raw)
To: gsl-discuss
Hi,
I noticed that the function interface for the fitting algorithms do not
support gsl_vectors. What is the reason for this? Would it be possible
to add inline functions such as
inline int
gsl_fit_linear_vector (const vector * x, const vector * y
double * c0, double * c1,
double * cov00, double * cov01, double * cov11,
double * sumsq)
{
return gsl_fit_linear(x->data, x->stride, y->data, y->stride, x->size,
c0,c1,cov00,c0v01,cov11,sumsq);
}
to GSL?
Jari
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Function interface for Least-Squares Fitting
2004-10-20 22:07 Function interface for Least-Squares Fitting Jari Häkkinen
@ 2004-10-21 15:00 ` Brian Gough
2004-10-23 7:57 ` Jari Häkkinen
0 siblings, 1 reply; 4+ messages in thread
From: Brian Gough @ 2004-10-21 15:00 UTC (permalink / raw)
To: Jari Häkkinen; +Cc: gsl-discuss
Jari Häkkinen writes:
> I noticed that the function interface for the fitting algorithms do not
> support gsl_vectors. What is the reason for this?
Basically to avoid duplication, when possible.
The recommended way to call these functions is with v->data,
v->stride, v->size as in your example.
You can put an inline function definition in your application's own
header files if you like.
--
Brian Gough
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Function interface for Least-Squares Fitting
2004-10-21 15:00 ` Brian Gough
@ 2004-10-23 7:57 ` Jari Häkkinen
2004-10-25 13:00 ` Brian Gough
0 siblings, 1 reply; 4+ messages in thread
From: Jari Häkkinen @ 2004-10-23 7:57 UTC (permalink / raw)
To: gsl-discuss
Brian Gough wrote:
> Jari Häkkinen writes:
> > I noticed that the function interface for the fitting algorithms do not
> > support gsl_vectors. What is the reason for this?
>
> Basically to avoid duplication, when possible.
>
> The recommended way to call these functions is with v->data,
> v->stride, v->size as in your example.
>
> You can put an inline function definition in your application's own
> header files if you like.
Yes, of course, I am doing it my copy of the gsl CVS (in cvs_fit.h) but
would like to see it the official release. Why was it decided against
having gsl_vectors in the interface. (I am maintaing a C++ interface to
GSL, and in this interface there is no access to internals of gsl_vector.)
Jari
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Function interface for Least-Squares Fitting
2004-10-23 7:57 ` Jari Häkkinen
@ 2004-10-25 13:00 ` Brian Gough
0 siblings, 0 replies; 4+ messages in thread
From: Brian Gough @ 2004-10-25 13:00 UTC (permalink / raw)
To: Jari Häkkinen; +Cc: gsl-discuss
Jari Häkkinen writes:
> Yes, of course, I am doing it my copy of the gsl CVS (in cvs_fit.h) but
> would like to see it the official release. Why was it decided against
> having gsl_vectors in the interface.
This is to avoid having additional dependencies or two versions of
every function---where possible, the plain C interface is preferred.
See the GSL Design document for more explanation.
--
best regards
Brian Gough
Network Theory Ltd,
Commercial support for GSL --- http://www.network-theory.co.uk/gsl/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-10-25 13:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-20 22:07 Function interface for Least-Squares Fitting Jari Häkkinen
2004-10-21 15:00 ` Brian Gough
2004-10-23 7:57 ` Jari Häkkinen
2004-10-25 13:00 ` Brian Gough
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).