Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

zignor.cc File Reference

#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "zigrandom.h"
Include dependency graph for zignor.cc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define ZIGNOR_C   128
#define ZIGNOR_R   3.442619855899
#define ZIGNOR_V   9.91256303526217e-3
#define ZIGNOR_STORE   64 * 4
#define ZIGNOR_INVM   M_RAN_INVM32
#define ZIGNOR32_STORE   64 * 4

Functions

static double DRanNormalTail (double dMin, int iNegative)
static void zigNorInit (int iC, double dR, double dV)
double DRanNormalZig (void)
double DRanNormalZigVec (void)
void RanNormalSetSeedZig (int *piSeed, int cSeed)
void RanNormalSetSeedZigVec (int *piSeed, int cSeed)
static void zig32NorInit (int iC, double dR, double dV)
double DRanNormalZig32 (void)
double DRanNormalZig32Vec (void)
void RanNormalSetSeedZig32 (int *piSeed, int cSeed)
void RanNormalSetSeedZig32Vec (int *piSeed, int cSeed)
double DRanQuanNormalZig (void)
double DRanQuanNormalZigVec (void)
double DRanQuanNormalZig32 (void)
double DRanQuanNormalZig32Vec (void)

Variables

static double s_adZigX [ZIGNOR_C+1]
static double s_adZigR [ZIGNOR_C]
static unsigned int s_auiZigTmp [ZIGNOR_STORE/4]
static unsigned int s_auiZigBox [ZIGNOR_STORE]
static double s_adZigRan [ZIGNOR_STORE+ZIGNOR_STORE/4]
static int s_cZigStored = 0
static unsigned int s_aiZigRm [ZIGNOR_C]
static double s_adZigXm [ZIGNOR_C+1]
static unsigned int s_auiZig32Ran [ZIGNOR32_STORE]
static unsigned int s_auiZig32Box [ZIGNOR32_STORE]
static int s_cZig32Stored = 0

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 zignor.cc.


Define Documentation

#define ZIGNOR32_STORE   64 * 4

Definition at line 203 of file zignor.cc.

Referenced by DRanNormalZig32Vec().

#define ZIGNOR_C   128

Definition at line 42 of file zignor.cc.

Referenced by RanNormalSetSeedZig(), and RanNormalSetSeedZig32().

#define ZIGNOR_INVM   M_RAN_INVM32

Definition at line 154 of file zignor.cc.

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

#define ZIGNOR_R   3.442619855899
#define ZIGNOR_STORE   64 * 4

Definition at line 92 of file zignor.cc.

Referenced by DRanNormalZigVec().

#define ZIGNOR_V   9.91256303526217e-3

Definition at line 45 of file zignor.cc.

Referenced by RanNormalSetSeedZig(), and RanNormalSetSeedZig32().


Function Documentation

static double DRanNormalTail ( double  dMin,
int  iNegative 
) [static]

Definition at line 32 of file zignor.cc.

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

double DRanNormalZig ( void   ) 

Definition at line 68 of file zignor.cc.

Referenced by DRanQuanNormalZig().

double DRanNormalZig32Vec ( void   ) 

Definition at line 208 of file zignor.cc.

Referenced by DRanQuanNormalZig32Vec().

double DRanNormalZigVec ( void   ) 

Definition at line 98 of file zignor.cc.

Referenced by DRanQuanNormalZigVec().

double DRanQuanNormalZig ( void   ) 

Definition at line 262 of file zignor.cc.

double DRanQuanNormalZig32 ( void   ) 

Definition at line 270 of file zignor.cc.

double DRanQuanNormalZig32Vec ( void   ) 

Definition at line 274 of file zignor.cc.

double DRanQuanNormalZigVec ( void   ) 

Definition at line 266 of file zignor.cc.

void RanNormalSetSeedZig ( int *  piSeed,
int  cSeed 
)

Definition at line 141 of file zignor.cc.

Referenced by RanNormalSetSeedZigVec().

void RanNormalSetSeedZig32 ( int *  piSeed,
int  cSeed 
)

Definition at line 249 of file zignor.cc.

Referenced by RanNormalSetSeedZig32Vec().

void RanNormalSetSeedZig32Vec ( int *  piSeed,
int  cSeed 
)

Definition at line 254 of file zignor.cc.

void RanNormalSetSeedZigVec ( int *  piSeed,
int  cSeed 
)

Definition at line 146 of file zignor.cc.

static void zig32NorInit ( int  iC,
double  dR,
double  dV 
) [static]

Definition at line 159 of file zignor.cc.

Referenced by RanNormalSetSeedZig32().

static void zigNorInit ( int  iC,
double  dR,
double  dV 
) [static]

Definition at line 51 of file zignor.cc.

Referenced by RanNormalSetSeedZig().


Variable Documentation

double s_adZigR[ZIGNOR_C] [static]

Definition at line 49 of file zignor.cc.

double s_adZigRan[ZIGNOR_STORE+ZIGNOR_STORE/4] [static]

Definition at line 95 of file zignor.cc.

double s_adZigX[ZIGNOR_C+1] [static]

Definition at line 49 of file zignor.cc.

double s_adZigXm[ZIGNOR_C+1] [static]

Definition at line 157 of file zignor.cc.

unsigned int s_aiZigRm[ZIGNOR_C] [static]

Definition at line 156 of file zignor.cc.

unsigned int s_auiZig32Box[ZIGNOR32_STORE] [static]

Definition at line 205 of file zignor.cc.

unsigned int s_auiZig32Ran[ZIGNOR32_STORE] [static]

Definition at line 204 of file zignor.cc.

unsigned int s_auiZigBox[ZIGNOR_STORE] [static]

Definition at line 94 of file zignor.cc.

unsigned int s_auiZigTmp[ZIGNOR_STORE/4] [static]

Definition at line 93 of file zignor.cc.

int s_cZig32Stored = 0 [static]

Definition at line 206 of file zignor.cc.

int s_cZigStored = 0 [static]

Definition at line 96 of file zignor.cc.


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