This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gsl_histogram_sum proposal


Achim Gaedke wrote:
> 
> Hmmm.... Gerald, you are right. But I don't like two things:
> 1) A lot of functions doing almost the same
> 2) One function doing everything with a lot of parameters

I agree.

> For 1d it is acceptable to do only this, but what about 2d?
> 
> gsl_histogram2d_sum(gsl_histogram2d * h, size_t m_begin, size_t m_end,
>                                      size_t n_begin, size_t n_end)
> 
> Due to five parameters, I liked to implement my simple proposal, too. I think,
> this is maximum satifying. What is best depends on your fancy...

I think in 1d it is natural and fine to specify the end points;
that is sufficient to specify any 1d "region". But in 2d there
is no good way to specify a general region, and as you point
out, even specifying a rectilinear region is tedious.

Therefore, I think it is reasonable leave the 2d case without
region specification but unreasonable to leave it out for
the 1d case.


> Another question is, why are gsl_histogram2d_mean and gsl_histogram2d_sigma not
> implemented? Is it possible to do that by assuming a bivariate normal
> distribution?

There is no need to assume bivariate normal, any more than there
is a need to assume a normal distribution to define the standard
deviation of a 1d distribution. But any...

> That are 2 results for mean (1st moment) and 4 (?!) results for sigma (2nd
> moment), but here my ad hoc knowledge ends...
>

That's right, although there are only 3 independent
second moments, due to symmetry.


-- 
G. Jungman


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]