From: Patrick Alken <patrick.alken@colorado.edu>
To: gsl-discuss@sourceware.org
Subject: Finding a bin in gsl_histogram
Date: Fri, 08 Aug 2008 10:52:00 -0000 [thread overview]
Message-ID: <20080807220844.GA3562@hippogriff.homeunix.org> (raw)
Hi,
I was suprised to see there is no function in the gsl histogram
module to find the bin corresponding to a given x value. There is
an internal function called find() to accomplish this, but I
think it would be useful to make an API for this routine.
For example I have an application in which I need to bin data
and compute the mean of the data in each bin. This can be done
with a running mean (keeping the current value of the mean as
the bin value) but each time I store a new data point in the
histogram, I need to find which bin it will be stored in so
I can update the bin value appropriately.
I propose to make a new function gsl_histogram_getbin() which
simply calls the internal find() function to determine the bin
number for a given x. This should probably also be done for the
2d case.
Patrick Alken
reply other threads:[~2008-08-08 10:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080807220844.GA3562@hippogriff.homeunix.org \
--to=patrick.alken@colorado.edu \
--cc=gsl-discuss@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).