windowfunctions.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  WindowType {
  wtRectangle, wtTriangular, wtHamming, wtBlackman,
  wtGaussian, wtKaiser, wtHalfCosine, wtHann,
  wtHannSqr, wtHann3sqrt
}
 

Functions

void FillWindow (double *newwindow, WindowType wt, int Count, int *ips=0, double *dps=0)
 
double * NewWindow (WindowType wt, int Count, int *ips=0, double *dps=0, double *newwindow=0)
 
double * NewWindow8 (WindowType wt, int Count, int *ips=0, double *dps=0, double *newwindow=0)
 
double * NewdWindow (WindowType wt, int Count, int *ips=0, double *dps=0, double *newdwindow=0)
 
double * NewddWindow (WindowType wt, int Count, int *ips=0, double *dps=0, double *newddwindow=0)
 
double * NewdddWindow (WindowType wt, int Count, int *ips=0, double *dps=0, double *newdddwindow=0)
 
void windowspec (WindowType wt, int N, int *M, double *c, double *iH2, double *d=0)
 

Detailed Description

  • implements a few common window functions.

Function Documentation

void FillWindow ( double *  Result,
WindowType  wt,
int  Count,
int *  ips,
double *  dps 
)

function FillWindow: fills a buffer $Result with a window function.

In: wt:window type Count: window size ips & ups: extra window specificatin parameters Out: newwindow[Count+1]: the window function.

No return value. This function is designed assuming Count being even, and Count/2 is the symmetry centre of newwindow. newwindow has physical size Count+1 for compatibility purpose. For all vanishing windows (e.g. Hann) newwindow[0]=newwindow[Count]=0.

double* NewdddWindow ( WindowType  wt,
int  Count,
int *  ips,
double *  dps,
double *  newdddwindow 
)

function NewdddWindow: computes the 3rd-order derivative of a window function. In: wt: window type Count: window size ips & ups: extra window specificatin parameters Out: newdddwindow[Count+1]: the 3rd-order derivative window function.

Returns pointer to newdddwindow. newdddwindow is created anew if newdddwindow=0 is specified on start.

double* NewddWindow ( WindowType  wt,
int  Count,
int *  ips,
double *  dps,
double *  newddwindow 
)

function NewddWindow: computes the 2nd-order derivative of a window function.

In: wt: window type Count: window size ips & ups: extra window specificatin parameters Out: newddwindow[Count+1]: the 2nd-order derivative window function.

Returns pointer to newddwindow. newddwindow is created anew if newddwindow=0 is specified on start.

double* NewdWindow ( WindowType  wt,
int  Count,
int *  ips,
double *  dps,
double *  newdwindow 
)

function NewdWindow: computes the derivative of a window function.

In: wt: window type Count: window size ips & ups: extra window specificatin parameters Out: newdwindow[Count+1]: the derivative window function.

Returns pointer to newdwindow. newdwindow is created anew if newdwindow=0 is specified on start.

double* NewWindow ( WindowType  wt,
int  Count,
int *  ips,
double *  dps,
double *  newwindow 
)

function NewWindow: creates a window function.

In: wt: window type Count: window size ips & ups: extra window specificatin parameters Out: newwindow[Count+1]: the window function.

Returns pointer to newwindow. newwindow is created anew if newwindow=0 is specified on start.

double* NewWindow8 ( WindowType  wt,
int  Count,
int *  ips,
double *  dps,
double *  newwindow 
)

function NewWindow8: 8-byte aligned version of NewWindow.

In: wt: window type Count: window size ips & ups: extra window specificatin parameters Out: newwindow[Count+1]: the window function.

Returns pointer to newwindow. newwindow is created anew and 8-byte aligned if newwindow=0 is specified on start. However, if newwindow is not 8-byte aligned on start, the unaligned buffer is returned.

void windowspec ( WindowType  wt,
int  N,
int *  M,
double *  c,
double *  iH2,
double *  d 
)

function windowspec: computes a few descriptors of a cosine family window. A window function in the cosine window family is the linear combination of a few cosine functions, therefore has a cosine decomposition.

In: wt: window type N: window size Out: c[M+1], coefficients of cosine decomposition iH2: reciprocal of square of L2 norm, d[2M+1]: self-convolution of c[], optional

No return value.