Examples.QuasiMonteCarlo
Class QmcIntegration

java.lang.Object
  extended byExamples.QuasiMonteCarlo.QmcIntegration

public class QmcIntegration
extends java.lang.Object

Tests the efficiency of the low discrepancy sequnces by computing the QMC integral of various Intgrnds over the unit cube Q=(0,1)^dim. The relative error is reported as a signed prcentage of the analytic value of the integral. The analytic integral must be nonzero.

The QMC integrals are evaluated for N=2^n-1 low discrepancy points. At these values of N the Gray code counter "is in sync" with the ordinary sequence 1,2,3,...,N again:
{1,2,...,N}={Gray(1),Gray(2),...,Gray(N)}.

The results are written to a file "QmcIntDim_dim" in the current directory.


Constructor Summary
QmcIntegration()
           
 
Method Summary
static void computeIntegrals(CubeFunction F, FixedFieldWidthFileWriter fout)
           
static void main(java.lang.String[] args)
           
static void write(java.lang.String str, int fieldwidth)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QmcIntegration

public QmcIntegration()
Method Detail

main

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

computeIntegrals

public static void computeIntegrals(CubeFunction F,
                                    FixedFieldWidthFileWriter fout)
                             throws java.io.IOException
Throws:
java.io.IOException

write

public static void write(java.lang.String str,
                         int fieldwidth)