RanTable Class Reference

Collaboration diagram for RanTable:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RanTable (int doubleTableSize, int intTableSize, int aveInt, long index)
void setSeed (long seed)
double nextDouble ()
int nextInteger ()

Detailed Description

For very high dimensional functions (eg 5M evaluations of a 1000 dimension function), re-seeding random generators, generating the random numbers and mapping them into the right range on the fly is too slow, even for RanQD1.

This companion class pre-generates the random numbers needed by FractalFunction1D (in turn called by FastFractal) and stores them in lookup tables. Changing the index simply becomes resetting the array index.

This results in a small loss of statistical diversity for a considerable gain in speed, even for quite large tables (eg 16K) since it is only done once for any given function.

The user does not need to access this class directly, all values are set by its owner, such as FractalFunction1D.

Author:
ahref="http://www.csse.uwa.edu.au/~cara/">CaraMacNish</a>,UniversityofWesternAustralia@version1.0RC1,7thNov2007<br>Forthelatestversionandadditionalinformationseethe@link<ahref="http://www.cs.bham.ac.uk/research/projects/ecb/">BirminghamRepository</a>

Definition at line 30 of file RanTable.java.


Constructor & Destructor Documentation

RanTable::RanTable ( int  doubleTableSize,
int  intTableSize,
int  aveInt,
long  index 
) [inline]

Create the tables and populate with appropriate random values.

Parameters:
doubleTableSize size of the table for double values
intTableSize size of the table for int values
aveInt average int value, this will be set from the density
index the index or seed for the tables

Definition at line 47 of file RanTable.java.

Here is the call graph for this function:


Member Function Documentation

double RanTable::nextDouble (  )  [inline]

Get the next double.

Definition at line 72 of file RanTable.java.

int RanTable::nextInteger (  )  [inline]

Get the next int

Definition at line 80 of file RanTable.java.

void RanTable::setSeed ( long  seed  )  [inline]

Reset the seed.

Definition at line 64 of file RanTable.java.


The documentation for this class was generated from the following file:

Generated on Sun May 9 12:26:14 2010 for Realea by  doxygen 1.6.1