Class NX

  extended byQuasiRandom.LowDiscrepancySequence
      extended byQuasiRandom.NX

public class NX
extends LowDiscrepancySequence

Niederreiter-Xing low discrepancy sequence with basis b=2 in dimension at most 20. Uses the Gray code counter and bitwise operations for very fast point generation.

Use N=2^n-1, n=1,2,... points for QMC integration. At N=2^n-1 the Gray code counter G(k) is in sync with the integer sequence k=1,2,... again, that is { G(1),...,G(N) }={ 1,...,N }.

Contains the generator matrices for dimensions j=4...20 in the array gMC decoded from the row encoded form of the download and reencoded column by column for use with the Gray code counter method in the NX point generation.

The columns of the binary matrices are encoded as a decimal integers with the bits in each column forming the digits of the encoding modulo two. The significance of the bits increases bottom up (the top bit is the most significant). This ordering of the bits is necessary for the fast point generation with the Gray code counter.

Field Summary
static int[][][] gMC
          gMR.................generator matrix rows.
Constructor Summary
NX(int dim)
          NX low discrepancy sequence in dimension dim.
Method Summary
 java.lang.String getName()
          Name of sequence.
static void main(java.lang.String[] args)
          TEST PROGRAM
 double[] nextPoint()
          The next nx point in the unit cube [0,1]^dim.
 void restart()
          THE NX POINTS
Methods inherited from class QuasiRandom.LowDiscrepancySequence
L2_discrepancy, L2_discrepancy, nextPoint, nextQuasiNormalVector, projectionPlot
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final int[][][] gMC
gMR.................generator matrix rows. gMR[j][k] is the kth row of the generator matrix C(j) encoded as a decimal integer n by viewing the the sequence of zeros and ones in the row r_k=row_k(C(j)) as the digits of n in base 2 with the most significant digit being the first component of the row vector r_k. This is the download from the NX sequences site.

Constructor Detail


public NX(int dim)

NX low discrepancy sequence in dimension dim.

dim - dimension of the sequence.
Method Detail


public java.lang.String getName()
Description copied from class: LowDiscrepancySequence
Name of sequence.

Specified by:
getName in class LowDiscrepancySequence


public void restart()

restart in class LowDiscrepancySequence


public double[] nextPoint()
The next nx point in the unit cube [0,1]^dim.

Specified by:
nextPoint in class LowDiscrepancySequence


public static void main(java.lang.String[] args)