Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

LDSqHalton Class Reference

This class implements the Halton Sequence in the bases stored in b passed to the constructor. More...

#include <SimSeqs.h>

Inheritance diagram for LDSqHalton:

Inheritance graph
[legend]
Collaboration diagram for LDSqHalton:

Collaboration graph
[legend]
List of all members.

Public Methods

 LDSqHalton (long *b=NULL, long dm=0, long iterations=0, long genau=BGENAU, double genau1=GENAU, char *ex="hal",char *nm="Halton")

Protected Methods

virtual long CalculateNextElement (long nr, double *buffer, long bufflen)
virtual long InitData (long genau, double genau1)
virtual long ExitData ()
virtual long* InitGenericBases (long dm)

Protected Attributes

long prec
double* q
double * p

Detailed Description

This class implements the Halton Sequence in the bases stored in b passed to the constructor.

The VanDerCorput Sequence is just a special case with dim=1.


Constructor & Destructor Documentation

LDSqHalton::LDSqHalton ( long * b = NULL,
long dm = 0,
long iterations = 0,
long genau = BGENAU,
double genau1 = GENAU,
char * ex = "hal",
char * nm = "Halton" )
 


Member Function Documentation

long LDSqHalton::CalculateNextElement ( long nr,
double * buffer,
long bufflen ) [protected, virtual]
 

Calculates the next element from the current element (or if we need a different element it calculates it using the function Phi.

If bufflen>dim=length(bases), the remaining dimensions are filled with pseudo-random numbers.

See also:
Phi()

Reimplemented from LDSqBase.

Reimplemented in LDSqHammersley.

long LDSqHalton::ExitData ( ) [protected, virtual]
 

Do class-specific freeing of memory etc.

Called by the destructor

Reimplemented from LDSqBase.

long LDSqHalton::InitData ( long genau,
double genau1 ) [protected, virtual]
 

Precalculate some values needed to create the numbers much faster (recursively).

Reimplemented from LDSqBase.

long * LDSqHalton::InitGenericBases ( long dm ) [protected, virtual]
 

If no array of bases was given in the constructor, but the sequence needs them, this creates generic bases, e.g.

most of the time these are the dm lowest prime numbers, but you can override this by reimplementing InitGenericBases in your subclass

Reimplemented from LDSqBase.


Member Data Documentation

double * LDSqHalton::p [protected]
 

Stores 1/2^i and 1-1/2^i to speed up the calculation (recursive!!!).

long LDSqHalton::prec [protected]
 

Precision (in powers of 1/2).

We need this many precreated numbers 1/2^i and the other corresponding value 1-1/2^1 in p and q

double * LDSqHalton::q [protected]
 

Stores 1/2^i and 1-1/2^i to speed up the calculation (recursive!!!).


The documentation for this class was generated from the following files:
Generated at Wed Jun 20 19:48:21 2001 for LDSequences by doxygen1.2.7 written by Dimitri van Heesch, © 1997-2001