SSJ
V. labo.

umontreal.iro.lecuyer.discrepancy
Class DiscShiftBaker1

java.lang.Object
  extended by umontreal.iro.lecuyer.discrepancy.Discrepancy
      extended by umontreal.iro.lecuyer.discrepancy.DiscShiftBaker1
Direct Known Subclasses:
DiscShiftBaker1Lattice

public class DiscShiftBaker1
extends Discrepancy

This class computes the discrepancy for randomly shifted, then baker folded points of a set P. It is given by

[D(P)]2 = -1 + $\displaystyle {\frac{{1}}{{n^2}}}$i=1nj=1nr=1s(1 - $\displaystyle {\frac{{4\gamma_r^2}}{{3}}}$[B4({xir - xjr}) - B4({{xir - xjr} -1/2})]  
                     - $\displaystyle {\frac{{\gamma_r^4}}{{9}}}$[7B4({xir - xjr}) - 2B4({{xir - xjr} -1/2})]  
                     - $\displaystyle {\frac{{16\gamma_r^4}}{{45}}}$[B6({xir - xjr}) - B6({{xir - xjr} -1/2})]),  

where n is the number of points of P, s is the dimension of the points, xir is the r-th coordinate of point i, and the γr are arbitrary positive weights. The Bα(x) are the Bernoulli polynomials of degree α (see bernoulliPoly in class util/Num), and the notation {x} means the fractional part of x, defined here as {x} = x mod 1. In one dimension, the formula simplifies to
[D(P)]2 = [tex2html_wrap_indisplay349]∑i=1nj=1n[- $\displaystyle {\frac{{4\gamma^2}}{{3}}}$[B4({xi - xj}) - B4({{xi - xj} -1/2})]  
                     - $\displaystyle {\frac{{\gamma^4}}{{9}}}$[7B4({xi - xj}) - 2B4({{xi - xj} -1/2})]  
                     - $\displaystyle {\frac{{16\gamma^4}}{{45}}}$[B6({xi - xj}) - B6({{xi - xj} -1/2})]].  

The discrepancy represents a worst-case error criterion for the approximation of integrals, when the integrands have a certain degree of smoothness and lie in a Hilbert space H with a reproducing kernel K given by

K(x,y) = ∏r=1s[- $\displaystyle {\frac{{\gamma_r^4}}{{4!}}}$B4({xr - yr}) + ∑α=02$\displaystyle {\frac{{\gamma_r^{2\alpha}}}{{(\alpha!)^2}}}$Bα(xr)Bα(yr)],

The norm of the vectors in H is defined by

| f|2 = ∑u⊆Sv⊆uγu-2γv-2[0, 1]vdxv[∫[0, 1]S-v$\displaystyle {\frac{{\partial^{\vert u\vert + \vert v\vert}f}}{{\partial\mathbf{x}_u\partial\mathbf{x}_v}}}$dxS-v]2,

where S = {1,…, s} is a set of coordinate indices, uS, and γu = ∏r∈uγr.


Constructor Summary
DiscShiftBaker1()
          Empty constructor.
DiscShiftBaker1(double[][] points, int n, int s)
          Constructor with the n points points[i] in s dimensions, with all the weights γr = 1.
DiscShiftBaker1(double[][] points, int n, int s, double[] gamma)
          Constructor with the n points points[i] in s dimensions, with weights γr = gamma[r-1].
DiscShiftBaker1(int n, int s, double[] gamma)
          The number of points is n, the dimension s, and the s weight factors are gamma[r], r = 0, 1,…,(s - 1).
DiscShiftBaker1(PointSet set)
          Constructor with the point set set.
 
Method Summary
 double compute(double[][] points, int n, int s)
          Computes the discrepancy for the s-dimensional points of set points, containing n points.
 double compute(double[][] points, int n, int s, double[] gamma)
          Computes the discrepancy for the first n points of points in dimension s and with weight γr = gamma[r-1].
 double compute(double[] T, int n)
          Computes the discrepancy for the first n points of T in 1 dimension, with weight γ = 1.
 double compute(double[] T, int n, double gamma)
          Computes the discrepancy for the first n points of T in 1 dimension, with weight γ = gamma.
 
Methods inherited from class umontreal.iro.lecuyer.discrepancy.Discrepancy
compute, compute, compute, compute, compute, compute, formatPoints, getDimension, getGamma, getName, getNumPoints, setGamma, setPoints, setPoints, sort, toArray, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DiscShiftBaker1

public DiscShiftBaker1(double[][] points,
                       int n,
                       int s)
Constructor with the n points points[i] in s dimensions, with all the weights γr = 1. points[i][r] is the r-th coordinate of point i. Indices i and r start at 0.


DiscShiftBaker1

public DiscShiftBaker1(double[][] points,
                       int n,
                       int s,
                       double[] gamma)
Constructor with the n points points[i] in s dimensions, with weights γr = gamma[r-1]. points[i][r] is the r-th coordinate of point i. Indices i and r start at 0.


DiscShiftBaker1

public DiscShiftBaker1(int n,
                       int s,
                       double[] gamma)
The number of points is n, the dimension s, and the s weight factors are gamma[r], r = 0, 1,…,(s - 1). The n points will be chosen later.


DiscShiftBaker1

public DiscShiftBaker1(PointSet set)
Constructor with the point set set. All the points are copied in an internal array.


DiscShiftBaker1

public DiscShiftBaker1()
Empty constructor. One must set the points, the dimension, and the weight factors before calling any method.

Method Detail

compute

public double compute(double[][] points,
                      int n,
                      int s)
Computes the discrepancy for the s-dimensional points of set points, containing n points. All weights γr = 1.

Specified by:
compute in class Discrepancy

compute

public double compute(double[][] points,
                      int n,
                      int s,
                      double[] gamma)
Computes the discrepancy for the first n points of points in dimension s and with weight γr = gamma[r-1].

Overrides:
compute in class Discrepancy

compute

public double compute(double[] T,
                      int n)
Computes the discrepancy for the first n points of T in 1 dimension, with weight γ = 1.

Overrides:
compute in class Discrepancy

compute

public double compute(double[] T,
                      int n,
                      double gamma)
Computes the discrepancy for the first n points of T in 1 dimension, with weight γ = gamma.

Overrides:
compute in class Discrepancy

SSJ
V. labo.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.