CWO++library  0.32
 All Classes Functions Variables Groups
Functions
Random

Functions

virtual void CWO::SetRandSeed (long long int s)
 set the seed of random sequence to generate other
long long int CWO::GetRandSeed ()
float CWO::GetRandVal ()
 get random value
cwoComplex CWO::GetRandComplex ()
virtual void CWO::__RandPhase (cwoComplex *a, float max, float min)
virtual void CWO::__MulRandPhase (cwoComplex *a, float max, float min)
virtual void CWO::RandReal (float max=1.0f, float min=0.0f)
void CWO::RandPhase (float max=CWO_PI, float min=-CWO_PI)
void CWO::SetRandPhase (float max=CWO_PI, float min=-CWO_PI)
void CWO::MulRandPhase (float max=CWO_PI, float min=-CWO_PI)

Detailed Description


Function Documentation

virtual void CWO::SetRandSeed ( long long int  s)
virtual

set the seed of random sequence to generate other

   @param s seed
#include <time.h>
CWO a(1024,1024);
a.SetRandSeed((unsigned)time(NULL)); //set current time as seed
float CWO::GetRandVal ( )

get random value

Returns:
uniform random value from 0.0 to 1.0
Note:
this random value is generated by Mersenne twister