SSJ
V. labo.

umontreal.iro.lecuyer.discrepancy
Class DiscShift1

java.lang.Object
  extended by umontreal.iro.lecuyer.discrepancy.Discrepancy
      extended by umontreal.iro.lecuyer.discrepancy.DiscShift1
Direct Known Subclasses:
DiscShift1Lattice

public class DiscShift1
extends Discrepancy

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

[D(P)]2 = - 1 + $\displaystyle {\frac{{1}}{{n^2}}}$i=1nj=1nr=1s[1 + γr2B2({xir - xjr})],

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_indisplay283]∑i=1nj=1nB2({xi - xj}),

where zi is the point i.

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^2}}{{2}}}$B2({xr - yr}) + ∑α=01γr2αBα(xr)Bα(yr)],

The norm of the vectors in H is defined by

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

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


Constructor Summary
DiscShift1()
          Empty constructor.
DiscShift1(double[][] points, int n, int s)
          Constructor with the n points points[i] in s dimensions and with all weights γr = 1.
DiscShift1(double[][] points, int n, int s, double[] gamma)
          Constructor with the n points points[i] in s dimensions, and with the weights γr = gamma[r-1], r = 1,…, s.
DiscShift1(int n, int s, double[] gamma)
          The number of points is n, the dimension s, and the s weight factors are gamma[j], j = 0, 1,…,(s - 1).
DiscShift1(PointSet set)
          Constructor with the point set set.
 
Method Summary
 double compute(double[][] points, int n, int s)
          Computes the discrepancy for the first n points of set points in dimension s.
 double compute(double[][] points, int n, int s, double[] gamma)
          Computes the discrepancy in dimension s with γr = gamma[r-1].
 double compute(double[] T, int n)
          Computes the discrepancy for the 1-dimensional set of n points T.
 
Methods inherited from class umontreal.iro.lecuyer.discrepancy.Discrepancy
compute, 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

DiscShift1

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


DiscShift1

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


DiscShift1

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


DiscShift1

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


DiscShift1

public DiscShift1()
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 first n points of set points in dimension s. 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 in dimension s with γr = gamma[r-1].

Overrides:
compute in class Discrepancy

compute

public double compute(double[] T,
                      int n)
Computes the discrepancy for the 1-dimensional set of n points T.

Overrides:
compute in class Discrepancy

SSJ
V. labo.

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