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

DiscShiftBaker1

This class computes the discrepancy for randomly shifted, then baker folded points of a set P. It is given by[#!vHIC02a!#, eq. 15]

[D(P)]2 = -1 + $\displaystyle {\frac{{1}}{{n^2}}}$$\displaystyle \htsum_{{i=1}}^{n}$$\displaystyle \htsum_{{j=1}}^{n}$$\displaystyle \htprod_{{r=1}}^{s}$(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[#!mABR70a!#, chap. 23] of degree α (see umontreal.iro.lecuyer.utilNumbernoulliPoly 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_indisplay352][tex2html_wrap_indisplay353][tex2html_wrap_indisplay354][- $\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) = [tex2html_wrap_indisplay363][- $\displaystyle {\frac{{\gamma_r^4}}{{4!}}}$B4({xr - yr}) + $\displaystyle \htsum_{{\alpha=0}}^{2}$$\displaystyle {\frac{{\gamma_r^{2\alpha}}}{{(\alpha!)^2}}}$Bα(xr)Bα(yr)],

The norm of the vectors in H is defined by

| f|2 = $\displaystyle \htsum_{{u \subseteq S}}^{}$$\displaystyle \htsum_{{v \subseteq u}}^{}$γu-2γv-2$\displaystyle \htint_{{[0,1]^v}}^{}$dxv[$\displaystyle \htint_{{[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 = $ \htprod_{{r\in u}}^{}$γr.


Constructor Summary
DiscShiftBaker1()
          .
DiscShiftBaker1(double[][] points, int n, int s)
          .
DiscShiftBaker1(double[][] points, int n, int s, double[] gamma)
          .
DiscShiftBaker1(int n, int s, double[] gamma)
          .
DiscShiftBaker1(PointSet set)
          .
 
Method Summary
 double compute(double[][] points, int n, int s)
          .
 double compute(double[][] points, int n, int s, double[] gamma)
          .
 double compute(double[] T, int n)
          .
 double compute(double[] T, int n, double 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)
. \begin{tabb}Constructor with the $n$\ points \texttt{points[i]} in $s$
 dimension...
 ...te of point
 \texttt{i}. Indices \texttt{i} and \texttt{r} start at 0.
 \end{tabb}


DiscShiftBaker1

public DiscShiftBaker1(double[][] points,
                       int n,
                       int s,
                       double[] gamma)
. \begin{tabb}Constructor with the $n$\ points \texttt{points[i]} in $s$
 dimension...
 ...te of point
 \texttt{i}. Indices \texttt{i} and \texttt{r} start at 0.
 \end{tabb}


DiscShiftBaker1

public DiscShiftBaker1(int n,
                       int s,
                       double[] gamma)
. \begin{tabb}The number of points is $n$, the dimension $s$, and the $s$
 weight f...
 ...r$]}, $r = 0, 1, \ldots, (s-1)$. The $n$
 points will be chosen later.
 \end{tabb}


DiscShiftBaker1

public DiscShiftBaker1(PointSet set)
. \begin{tabb}Constructor with the point set \texttt{set}.
 All the points are copied in an internal array.
 \end{tabb}


DiscShiftBaker1

public DiscShiftBaker1()
. \begin{tabb}Empty constructor. One \emph{must} set the points, the dimension,
 and the weight factors before calling any method.
 \end{tabb}

Method Detail

compute

public double compute(double[][] points,
                      int n,
                      int s)
. \begin{tabb}Computes the discrepancy for the
 $s$-dimensional points of set \texttt{points}, containing $n$\ points.
 All weights $\gamma_r = 1$.
 \end{tabb}

Specified by:
compute in class Discrepancy

compute

public double compute(double[][] points,
                      int n,
                      int s,
                      double[] gamma)
. \begin{tabb}Computes the discrepancy for the first $n$\ points
 of \texttt{point...
 ...n dimension $s$\ and with weight
 $\gamma_r = $\ \texttt{gamma[r-1]}.
 \end{tabb}

Overrides:
compute in class Discrepancy

compute

public double compute(double[] T,
                      int n)
. \begin{tabb}Computes the discrepancy for the first $n$\ points
 of $T$\ in 1 dimension, with weight $\gamma = 1$.
 \end{tabb}

Overrides:
compute in class Discrepancy

compute

public double compute(double[] T,
                      int n,
                      double gamma)
. \begin{tabb}Computes the discrepancy for the first $n$\ points
 of $T$\ in 1 dimension, with weight $\gamma =$\ \texttt{gamma}.
 \end{tabb}

Overrides:
compute in class Discrepancy

SSJ
V. labo.

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