MityDSP Documentation Index

MityDSP::tcSigProcNoise Class Reference

#include <SigProc/SigProcNoise.h>

List of all members.

Static Public Member Functions

static float Gaussian (void)
static float Uniform (void)
static void Seed (int seed)
static void zigNorInit (void)
static double DRanNormalZig (void)

Static Protected Member Functions

static double DRanNormalTail (double dMin, int iNegative)

Static Protected Attributes

static bool mbSeeded = false
 when true, srand() has been called
static double m_adZigX [ZIGNOR_C+1]
static double m_adZigR [ZIGNOR_C]

Detailed Description

The tcSigProcNoise class provides utility methods for generating noise functions.

See also:
tcSigProcNoise Page

Member Function Documentation

float tcSigProcNoise::Gaussian ( void   )  [static]

This routine will generate a gaussian distributed number with standard deviation equal to 1.0 and mean of zero using the Box-Muller method.

Warning:
this method is not thread safe.
Return values:
a Gaussian random number with mean 0 and std=1.0
Note:
this function taken from Numerical Recipes in C, chapter 7.2
float tcSigProcNoise::Uniform ( void   )  [static]

This routine will generate a uniform distributed number from 0.0-1.0 exclusive of the endpoints (0.0 and 1.0 will not be returned).

Return values:
a uniform number between 0.0 and 1.0 (exclusive)
void tcSigProcNoise::Seed ( int  seed = -1  )  [static]

This routine will seed the base random number generater provided by the BIOS.

Parameters:
seed if less than zero, the system local tick timer is used.
void tcSigProcNoise::zigNorInit ( void   )  [static]

This method must be called prior to calling DRanNormalZig()

double tcSigProcNoise::DRanNormalZig ( void   )  [static]

Compute a gaussian random number for std = 1.0 and mean = 0.0 using the Ziggurat algorithm. Note: zigNorInit() must be called prior to using this routine the first time.

Returns:
gaussian randome number
double tcSigProcNoise::DRanNormalTail ( double  dMin,
int  iNegative 
) [static, protected]

This method is used exclusively by DRanNormalZig.

Parameters:
dMin minimum point on curve
iNegative 0 if positive side of curve, non-zero otherwise
Returns:
gaussian number on the tail of the PDF curve

Member Data Documentation

bool tcSigProcNoise::mbSeeded = false [static, protected]

when true, srand() has been called

double tcSigProcNoise::m_adZigX [static, protected]

m_adZigX holds coordinates, such that each rectangle has same area; m_adZigR holds m_adZigX[i + 1] / m_adZigX[i]

double tcSigProcNoise::m_adZigR [static, protected]

  
Generated on Wed Mar 28 15:14:03 2012 for MityDSP Signal Processing by  Doxygen Version 1.6.1
Copyright © 2009, Critical Link LLC, All rights reserved.