MityDSP Documentation Index
Static Public Member Functions | Static Protected Member Functions | Static Protected Attributes
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:
aGaussian 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:
auniform 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:
seedif 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 
)
staticprotected

This method is used exclusively by DRanNormalZig.

Parameters:
dMinminimum point on curve
iNegative0 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
staticprotected

when true, srand() has been called

double tcSigProcNoise::m_adZigX
staticprotected

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
staticprotected

  
Generated on Mon Apr 22 2013 11:33:40 for MityDSP Signal Processing by  Doxygen Version 1.8.1.1
Copyright © 2009, Critical Link LLC, All rights reserved.