SSJ
V. labo.

umontreal.iro.lecuyer.discrepancy
Class DiscShift2Lattice

java.lang.Object
  extended by umontreal.iro.lecuyer.discrepancy.Discrepancy
      extended by umontreal.iro.lecuyer.discrepancy.DiscShift2
          extended by umontreal.iro.lecuyer.discrepancy.DiscShift2Lattice

public class DiscShift2Lattice
extends DiscShift2

This class computes the same discrepancy for randomly shifted points of a set L as given in eq. for class DiscShift2, but for the special case when the points are the nodes of an integration lattice. It is given by

[D(L)]2 = - 1 + $\displaystyle {\frac{{1}}{{n}}}$i=1nr=1s[1 + $\displaystyle {\frac{{\gamma_r^2}}{{2}}}$B2(xir) - $\displaystyle {\frac{{\gamma_r^4}}{{12}}}$B4(xir)],

For a 1-dimensional lattice, the discrepancy becomes

[D(L)]2 = [tex2html_wrap_indisplay221]∑i=1n[$\displaystyle {\frac{{\gamma^2}}{{2}}}$B2(xi) - $\displaystyle {\frac{{\gamma^4}}{{12}}}$B4(xi)].

Computing the discrepancy for a lattice is much faster than for a general point set.


Constructor Summary
DiscShift2Lattice()
          Empty constructor.
DiscShift2Lattice(double[][] points, int n, int s)
          Constructor with the n points points[i] in dimension s with all weights γr = 1.
DiscShift2Lattice(double[][] points, int n, int s, double[] gamma)
          Constructor with the n points points[i] in dimension s with the weights γr = gamma[r-1], r = 1,…, s.
DiscShift2Lattice(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).
DiscShift2Lattice(Rank1Lattice set)
          Constructor with the lattice set.
 
Method Summary
 double compute(double[][] points, int n, int s)
          Computes the discrepancy for the first n s-dimensional points of lattice points.
 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 with weight γ = 1 for the 1-dimensional lattice of n points T.
 double compute(double[] T, int n, double gamma)
          Computes the discrepancy with weight γ = gamma for the 1-dimensional lattice of n points T.
 
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

DiscShift2Lattice

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


DiscShift2Lattice

public DiscShift2Lattice(double[][] points,
                         int n,
                         int s,
                         double[] gamma)
Constructor with the n points points[i] in dimension s 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.


DiscShift2Lattice

public DiscShift2Lattice(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.


DiscShift2Lattice

public DiscShift2Lattice(Rank1Lattice set)
Constructor with the lattice set. All the points are copied in an internal array.


DiscShift2Lattice

public DiscShift2Lattice()
Empty constructor. The points and parameters must be defined before calling methods of this class.

Method Detail

compute

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

Overrides:
compute in class DiscShift2

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 DiscShift2

compute

public double compute(double[] T,
                      int n)
Computes the discrepancy with weight γ = 1 for the 1-dimensional lattice of n points T.

Overrides:
compute in class DiscShift2

compute

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

Overrides:
compute in class DiscShift2

SSJ
V. labo.

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