ref: 32082e50851a80e8ee950a77e00642a8d52cb349
parent: fd46d1e0e0c2d11191c3ef80247791a696383e96
author: Paul Brossier <piem@piem.org>
date: Sat Dec 7 09:35:58 EST 2013
src/utils/hist.{c,h}: flow/fhig, now ilow/ihig
--- a/src/utils/hist.c
+++ b/src/utils/hist.c
@@ -38,9 +38,9 @@
/**
* Object creation/deletion calls
*/
-aubio_hist_t * new_aubio_hist (smpl_t ilow, smpl_t ihig, uint_t nelems){
+aubio_hist_t * new_aubio_hist (smpl_t flow, smpl_t fhig, uint_t nelems){
aubio_hist_t * s = AUBIO_NEW(aubio_hist_t);
- smpl_t step = (ihig-ilow)/(smpl_t)(nelems);
+ smpl_t step = (fhig-flow)/(smpl_t)(nelems);
smpl_t accum = step;
uint_t i;
s->nelems = nelems;
@@ -47,10 +47,10 @@
s->hist = new_fvec(nelems);
s->cent = new_fvec(nelems);
- /* use scale to map ilow/ihig -> 0/nelems */
- s->scaler = new_aubio_scale(ilow,ihig,0,nelems);
+ /* use scale to map flow/fhig -> 0/nelems */
+ s->scaler = new_aubio_scale(flow,fhig,0,nelems);
/* calculate centers now once */
- s->cent->data[0] = ilow + 0.5 * step;
+ s->cent->data[0] = flow + 0.5 * step;
for (i=1; i < s->nelems; i++, accum+=step )
s->cent->data[i] = s->cent->data[0] + accum;
--- a/src/utils/hist.h
+++ b/src/utils/hist.h
@@ -36,10 +36,12 @@
typedef struct _aubio_hist_t aubio_hist_t;
/** histogram creation
- * \param flow minimum input
- * \param fhig maximum input
- * \param nelems number of histogram columns
- */
+
+ \param flow minimum input
+ \param fhig maximum input
+ \param nelems number of histogram columns
+
+*/
aubio_hist_t * new_aubio_hist(smpl_t flow, smpl_t fhig, uint_t nelems);
/** histogram deletion */
void del_aubio_hist(aubio_hist_t *s);
--
⑨