annotate maths/nan-inf.h @ 321:f1e6be2de9a5

A threshold (delta) is added in the peak picking parameters structure (PPickParams). It is used as an offset when computing the smoothed detection function. A constructor for the structure PPickParams is also added to set the parameters to 0 when a structure instance is created. Hence programmes using the peak picking parameter structure and which do not set the delta parameter (e.g. QM Vamp note onset detector) won't be affected by the modifications. Functions modified: - dsp/onsets/PeakPicking.cpp - dsp/onsets/PeakPicking.h - dsp/signalconditioning/DFProcess.cpp - dsp/signalconditioning/DFProcess.h
author mathieub <mathieu.barthet@eecs.qmul.ac.uk>
date Mon, 20 Jun 2011 19:01:48 +0100
parents f51af910550f
children 701233f8ed41
rev   line source
c@304 1
c@304 2 #ifndef NAN_INF_H
c@304 3 #define NAN_INF_H
c@304 4
c@317 5 #define ISNAN(x) (sizeof(x) == sizeof(double) ? ISNANd(x) : ISNANf(x))
c@317 6 static inline int ISNANf(float x) { return x != x; }
c@317 7 static inline int ISNANd(double x) { return x != x; }
c@317 8
c@317 9 #define ISINF(x) (sizeof(x) == sizeof(double) ? ISINFd(x) : ISINFf(x))
c@317 10 static inline int ISINFf(float x) { return !ISNANf(x) && ISNANf(x - x); }
c@317 11 static inline int ISINFd(double x) { return !ISNANd(x) && ISNANd(x - x); }
c@304 12
c@304 13 #endif