Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

zigrandom.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define LIT_UINT64(c)   (c##ull)
#define LIT_INT64(c)   (c##ll)
#define M_RAN_INVM30   9.31322574615478515625e-010
#define M_RAN_INVM32   2.32830643653869628906e-010
#define M_RAN_INVM48   3.55271367880050092936e-015
#define M_RAN_INVM52   2.22044604925031308085e-016
#define M_RAN_INVM64   5.42101086242752217004e-020
#define RANDBL_32old(iRan1)   ((unsigned int)(iRan1) * M_RAN_INVM32)
#define RANDBL_48old(iRan1, iRan2)
#define RANDBL_52old(iRan1, iRan2)
#define RANDBL_32new(iRan1)   ((int)(iRan1) * M_RAN_INVM32 + (0.5 + M_RAN_INVM32 / 2))
#define RANDBL_48new(iRan1, iRan2)
#define RANDBL_52new(iRan1, iRan2)

Typedefs

typedef unsigned long long UINT64
typedef long long INT64
typedef double(* DRANFUN )(void)
typedef unsigned int(* IRANFUN )(void)
typedef void(* IVECRANFUN )(unsigned int *, int)
typedef void(* DVECRANFUN )(double *, int)
typedef void(* RANSETSEEDFUN )(int *, int)

Functions

void GetInitialSeeds (unsigned int auiSeed[], int cSeed, unsigned int uiSeed, unsigned int uiMin)
void RanSetSeed_MWC8222 (int *piSeed, int cSeed)
unsigned int IRan_MWC8222 (void)
double DRan_MWC8222 (void)
void VecIRan_MWC8222 (unsigned int *auiRan, int cRan)
void VecDRan_MWC8222 (double *adRan, int cRan)
void RanSetRan (const char *sRan)
void RanSetRanExt (DRANFUN DRanFun, IRANFUN IRanFun, IVECRANFUN IVecRanFun, DVECRANFUN DVecRanFun, RANSETSEEDFUN RanSetSeedFun)
double DRanU (void)
unsigned int IRanU (void)
void RanVecIntU (unsigned int *auiRan, int cRan)
void RanVecU (double *adRan, int cRan)
void RanSetSeed (int *piSeed, int cSeed)
double DProbNormal (double x)
double FRanNormalPolar (void)
double DRanNormalPolar (void)
double FRanQuanNormal (void)
double DRanQuanNormal (void)

Detailed Description

========================================================================== This code is Copyright (C) 2005, Jurgen A. Doornik. Permission to use this code for non-commercial purposes is hereby given, provided proper reference is made to: Doornik, J.A. (2005), "An Improved Ziggurat Method to Generate Normal Random Samples", mimeo, Nuffield College, University of Oxford, and www.doornik.com/research. or the published version when available. This reference is still required when using modified versions of the code. This notice should be maintained in modified versions of the code. No warranty is given regarding the correctness of this code. ==========================================================================

Author:
Jurgen A. Doornik (Creator)

Definition in file zigrandom.h.


Define Documentation

#define LIT_INT64 (  )     (c##ll)

Definition at line 39 of file zigrandom.h.

#define LIT_UINT64 (  )     (c##ull)

Definition at line 38 of file zigrandom.h.

#define M_RAN_INVM30   9.31322574615478515625e-010

Definition at line 42 of file zigrandom.h.

#define M_RAN_INVM32   2.32830643653869628906e-010

Definition at line 43 of file zigrandom.h.

#define M_RAN_INVM48   3.55271367880050092936e-015

Definition at line 44 of file zigrandom.h.

#define M_RAN_INVM52   2.22044604925031308085e-016

Definition at line 45 of file zigrandom.h.

#define M_RAN_INVM64   5.42101086242752217004e-020

Definition at line 46 of file zigrandom.h.

#define RANDBL_32new ( iRan1   )     ((int)(iRan1) * M_RAN_INVM32 + (0.5 + M_RAN_INVM32 / 2))

Definition at line 57 of file zigrandom.h.

Referenced by DRan_MWC8222(), DRanUfromIRanU(), and VecDRan_MWC8222().

#define RANDBL_32old ( iRan1   )     ((unsigned int)(iRan1) * M_RAN_INVM32)

Definition at line 48 of file zigrandom.h.

#define RANDBL_48new ( iRan1,
iRan2   ) 
Value:
((int)(iRan1) * M_RAN_INVM32 + (0.5 + M_RAN_INVM48 / 2) + \
        (int)((iRan2) & 0x0000FFFF) * M_RAN_INVM48)

Definition at line 59 of file zigrandom.h.

#define RANDBL_48old ( iRan1,
iRan2   ) 
Value:
((unsigned int)(iRan1) + (unsigned int)((iRan2) << 16) \
    * M_RAN_INVM32) * M_RAN_INVM32

Definition at line 50 of file zigrandom.h.

#define RANDBL_52new ( iRan1,
iRan2   ) 
Value:
((int)(iRan1) * M_RAN_INVM32 + (0.5 + M_RAN_INVM52 / 2) + \
        (int)((iRan2) & 0x000FFFFF) * M_RAN_INVM52)

Definition at line 62 of file zigrandom.h.

#define RANDBL_52old ( iRan1,
iRan2   ) 
Value:
((unsigned int)(iRan1) + (unsigned int)((iRan2) << 12) \
    * M_RAN_INVM32) * M_RAN_INVM32

Definition at line 53 of file zigrandom.h.


Typedef Documentation

typedef double( * DRANFUN)(void)

Definition at line 77 of file zigrandom.h.

typedef void( * DVECRANFUN)(double *, int)

Definition at line 80 of file zigrandom.h.

typedef long long INT64

Definition at line 37 of file zigrandom.h.

typedef unsigned int( * IRANFUN)(void)

Definition at line 78 of file zigrandom.h.

typedef void( * IVECRANFUN)(unsigned int *, int)

Definition at line 79 of file zigrandom.h.

typedef void( * RANSETSEEDFUN)(int *, int)

Definition at line 81 of file zigrandom.h.

typedef unsigned long long UINT64

Definition at line 36 of file zigrandom.h.


Function Documentation

double DProbNormal ( double  x  ) 
double DRan_MWC8222 ( void   ) 

Definition at line 85 of file zigrandom.cc.

Referenced by RanSetRan().

double DRanNormalPolar ( void   ) 

Definition at line 221 of file zigrandom.cc.

Referenced by DRanQuanNormal().

double DRanQuanNormal ( void   ) 

Definition at line 300 of file zigrandom.cc.

double DRanU ( void   ) 

Definition at line 138 of file zigrandom.cc.

Referenced by DRanNormalTail(), DRanNormalZig(), and DRanNormalZigVec().

double FRanNormalPolar ( void   ) 

Definition at line 246 of file zigrandom.cc.

Referenced by FRanQuanNormal().

double FRanQuanNormal ( void   ) 

Definition at line 304 of file zigrandom.cc.

void GetInitialSeeds ( unsigned int  auiSeed[],
int  cSeed,
unsigned int  uiSeed,
unsigned int  uiMin 
)

Definition at line 30 of file zigrandom.cc.

Referenced by RanSetSeed_MWC8222().

unsigned int IRan_MWC8222 ( void   ) 

Definition at line 75 of file zigrandom.cc.

Referenced by RanSetRan().

unsigned int IRanU ( void   ) 

Definition at line 142 of file zigrandom.cc.

Referenced by DRanNormalZig(), DRanNormalZig32(), and DRanNormalZig32Vec().

void RanSetRan ( const char *  sRan  ) 

Definition at line 171 of file zigrandom.cc.

void RanSetRanExt ( DRANFUN  DRanFun,
IRANFUN  IRanFun,
IVECRANFUN  IVecRanFun,
DVECRANFUN  DVecRanFun,
RANSETSEEDFUN  RanSetSeedFun 
)

Definition at line 197 of file zigrandom.cc.

void RanSetSeed ( int *  piSeed,
int  cSeed 
)

Definition at line 166 of file zigrandom.cc.

Referenced by RanNormalSetSeedZig(), and RanNormalSetSeedZig32().

void RanSetSeed_MWC8222 ( int *  piSeed,
int  cSeed 
)

Definition at line 57 of file zigrandom.cc.

Referenced by RanSetRan().

void RanVecIntU ( unsigned int *  auiRan,
int  cRan 
)

Definition at line 146 of file zigrandom.cc.

Referenced by DRanNormalZig32Vec(), and DRanNormalZigVec().

void RanVecU ( double *  adRan,
int  cRan 
)

Definition at line 150 of file zigrandom.cc.

Referenced by DRanNormalZigVec().

void VecDRan_MWC8222 ( double *  adRan,
int  cRan 
)

Definition at line 110 of file zigrandom.cc.

void VecIRan_MWC8222 ( unsigned int *  auiRan,
int  cRan 
)

Definition at line 95 of file zigrandom.cc.

Referenced by RanSetRan().


Tekkotsu v5.1CVS
Generated Mon May 9 04:59:04 2016 by Doxygen 1.6.3