comparison windowfunctions.cpp @ 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 fc19d45615d1
children 977f541d6683
comparison
equal deleted inserted replaced
4:92ee28024c05 5:5f3c32dc6e17
3 #include <string.h> 3 #include <string.h>
4 #include "windowfunctions.h" 4 #include "windowfunctions.h"
5 #include "align8.h" 5 #include "align8.h"
6 //--------------------------------------------------------------------------- 6 //---------------------------------------------------------------------------
7 7
8 /* 8 /**
9 function I0: Bessel function of order zero 9 function I0: Bessel function of order zero
10 10
11 Returns the Bessel function of x. 11 Returns the Bessel function of x.
12 */ 12 */
13 double I0(double x) 13 double I0(double x)
24 S+=D; 24 S+=D;
25 } 25 }
26 return S; 26 return S;
27 }//I0 27 }//I0
28 28
29 /* 29 /**
30 function FillWindow: fills a buffer $Result with a window function. 30 function FillWindow: fills a buffer $Result with a window function.
31 31
32 In: wt:window type 32 In: wt:window type
33 Count: window size 33 Count: window size
34 ips & ups: extra window specificatin parameters 34 ips & ups: extra window specificatin parameters
101 break; 101 break;
102 } 102 }
103 } 103 }
104 }//FillWindow 104 }//FillWindow
105 105
106 /* 106 /**
107 function NewWindow: creates a window function. 107 function NewWindow: creates a window function.
108 108
109 In: wt: window type 109 In: wt: window type
110 Count: window size 110 Count: window size
111 ips & ups: extra window specificatin parameters 111 ips & ups: extra window specificatin parameters
118 double* Result=newwindow; if (!Result) Result=new double[Count+1]; 118 double* Result=newwindow; if (!Result) Result=new double[Count+1];
119 FillWindow(Result, wt, Count, ips, dps); 119 FillWindow(Result, wt, Count, ips, dps);
120 return Result; 120 return Result;
121 }//NewWindow 121 }//NewWindow
122 122
123 /* 123 /**
124 function NewWindow8: 8-byte aligned version of NewWindow. 124 function NewWindow8: 8-byte aligned version of NewWindow.
125 125
126 In: wt: window type 126 In: wt: window type
127 Count: window size 127 Count: window size
128 ips & ups: extra window specificatin parameters 128 ips & ups: extra window specificatin parameters
137 double* Result=newwindow; if (!Result) Result=(double*)malloc8(sizeof(double)*(Count+1)); 137 double* Result=newwindow; if (!Result) Result=(double*)malloc8(sizeof(double)*(Count+1));
138 FillWindow(Result, wt, Count, ips, dps); 138 FillWindow(Result, wt, Count, ips, dps);
139 return Result; 139 return Result;
140 }//NewWindow8 140 }//NewWindow8
141 141
142 /* 142 /**
143 function NewdWindow: computes the derivative of a window function. 143 function NewdWindow: computes the derivative of a window function.
144 144
145 In: wt: window type 145 In: wt: window type
146 Count: window size 146 Count: window size
147 ips & ups: extra window specificatin parameters 147 ips & ups: extra window specificatin parameters
203 } 203 }
204 } 204 }
205 return Result; 205 return Result;
206 }//NewdWindow 206 }//NewdWindow
207 207
208 /* 208 /**
209 function NewddWindow: computes the 2nd-order derivative of a window function. 209 function NewddWindow: computes the 2nd-order derivative of a window function.
210 210
211 In: wt: window type 211 In: wt: window type
212 Count: window size 212 Count: window size
213 ips & ups: extra window specificatin parameters 213 ips & ups: extra window specificatin parameters
271 } 271 }
272 } 272 }
273 return Result; 273 return Result;
274 }//NewddWindow 274 }//NewddWindow
275 275
276 /* 276 /**
277 function NewdddWindow: computes the 3rd-order derivative of a window function. 277 function NewdddWindow: computes the 3rd-order derivative of a window function.
278 In: wt: window type 278 In: wt: window type
279 Count: window size 279 Count: window size
280 ips & ups: extra window specificatin parameters 280 ips & ups: extra window specificatin parameters
281 Out: newdddwindow[Count+1]: the 3rd-order derivative window function. 281 Out: newdddwindow[Count+1]: the 3rd-order derivative window function.
334 } 334 }
335 return Result; 335 return Result;
336 }//NewdddWindow 336 }//NewdddWindow
337 337
338 //--------------------------------------------------------------------------- 338 //---------------------------------------------------------------------------
339 /* 339 /**
340 function windowspec: computes a few descriptors of a cosine family window. A window function in the 340 function windowspec: computes a few descriptors of a cosine family window. A window function in the
341 cosine window family is the linear combination of a few cosine functions, therefore has a cosine 341 cosine window family is the linear combination of a few cosine functions, therefore has a cosine
342 decomposition. 342 decomposition.
343 343
344 In: wt: window type 344 In: wt: window type