Mercurial > hg > x
comparison procedures.h @ 5:5f3c32dc6e17
* Adjust comment syntax to permit Doxygen to generate HTML documentation; add Doxyfile
author | Chris Cannam |
---|---|
date | Wed, 06 Oct 2010 15:19:49 +0100 |
parents | 6422640a802f |
children | 977f541d6683 |
comparison
equal
deleted
inserted
replaced
4:92ee28024c05 | 5:5f3c32dc6e17 |
---|---|
1 #ifndef proceduresH | 1 #ifndef proceduresH |
2 #define proceduresH | 2 #define proceduresH |
3 | 3 |
4 /* | 4 /** |
5 procedures.cpp - this file collects miscellaneous structures and functions. Not all of these are | 5 \file procedures.h - this file collects miscellaneous structures and functions. Not all of these are |
6 referenced somewhere else. | 6 referenced somewhere else. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 //--------------------------------------------------------------------------- | 10 //--------------------------------------------------------------------------- |
12 #include <stdlib.h> | 12 #include <stdlib.h> |
13 #include <values.h> | 13 #include <values.h> |
14 #include "fft.h" | 14 #include "fft.h" |
15 #include "windowfunctions.h" | 15 #include "windowfunctions.h" |
16 | 16 |
17 /* | 17 /** |
18 macro testnn: non-negative test. This macro throws out an exception if the value of x is negative. | 18 macro testnn: non-negative test. This macro throws out an exception if the value of x is negative. |
19 */ | 19 */ |
20 #ifndef testnn | 20 #ifndef testnn |
21 #define testnn(x) {try{if (x<0) throw("testnn");}catch(...){x=0;}} | 21 #define testnn(x) {try{if (x<0) throw("testnn");}catch(...){x=0;}} |
22 #endif | 22 #endif |
32 #define ReleaseGMM(_P, _M, _DEV) \ | 32 #define ReleaseGMM(_P, _M, _DEV) \ |
33 delete[] _P; if (_M) {delete[] _M[0]; delete[] _M;} if (_DEV) {delete[] _DEV[0]; delete[] _DEV;} | 33 delete[] _P; if (_M) {delete[] _M[0]; delete[] _M;} if (_DEV) {delete[] _DEV[0]; delete[] _DEV;} |
34 | 34 |
35 | 35 |
36 //--------------------------------------------------------------------------- | 36 //--------------------------------------------------------------------------- |
37 /* | 37 /** |
38 Tick count tool (stop watch) is made up of a TickClock struct and three macros that uses this | 38 Tick count tool (stop watch) is made up of a TickClock struct and three macros that uses this |
39 structure as augument. | 39 structure as augument. |
40 | 40 |
41 Use of TickClock: declare the instance directly. Use StartClock() and StopClock() to start and stop | 41 Use of TickClock: declare the instance directly. Use StartClock() and StopClock() to start and stop |
42 tick counting. Each time the clock is stopped the interval between last start and stop operations is | 42 tick counting. Each time the clock is stopped the interval between last start and stop operations is |
93 double df; //derivative of f | 93 double df; //derivative of f |
94 double am; //amplitude | 94 double am; //amplitude |
95 double ph; //phase angle | 95 double ph; //phase angle |
96 }; | 96 }; |
97 | 97 |
98 /* | 98 /** |
99 TSpecTrack is a class that maintains a list of TSpecPeak objects that form a spectral track. It models | 99 TSpecTrack is a class that maintains a list of TSpecPeak objects that form a spectral track. It models |
100 a sinusid track in sinusoid modeling. | 100 a sinusid track in sinusoid modeling. |
101 */ | 101 */ |
102 class TSpecTrack | 102 class TSpecTrack |
103 { | 103 { |
118 void InsertPeak(TSpecPeak& APeak, int index); | 118 void InsertPeak(TSpecPeak& APeak, int index); |
119 int LocatePeak(TSpecPeak& APeak); | 119 int LocatePeak(TSpecPeak& APeak); |
120 int Add(TSpecPeak& APeak); | 120 int Add(TSpecPeak& APeak); |
121 }; | 121 }; |
122 | 122 |
123 /* | 123 /** |
124 TTFSpans is a class that maintains a list of TFSpans. This is used to mark selected areas in the time- | 124 TTFSpans is a class that maintains a list of TFSpans. This is used to mark selected areas in the time- |
125 frequency plane for further processing. | 125 frequency plane for further processing. |
126 */ | 126 */ |
127 class TTFSpans | 127 class TTFSpans |
128 { | 128 { |