This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
gsl_histogram_sum proposal
- From: Achim Gaedke <Achim dot Gaedke at uni-koeln dot de>
- To: gsl discussion list <gsl-discuss at sources dot redhat dot com>
- Date: Sun, 13 Jan 2002 00:59:54 +0100
- Subject: gsl_histogram_sum proposal
Here is a proposal for an additional function in histogram/stat.c:
double
gsl_histogram_sum(gsl_histogram * h)
{
double sum=0;
size_t i;
for (i = 0; i < h->n; i++)
{
sum+=h->bin[i];
}
return sum;
}
Using gsl_histogram_increment() it gives you the number of samples, you have
added to the histogram. Maybe someone is missing it, too.
Yours, Achim