SSJ
V. labo.

umontreal.iro.lecuyer.discrepancy
Class Palpha

java.lang.Object
  extended by umontreal.iro.lecuyer.discrepancy.Discrepancy
      extended by umontreal.iro.lecuyer.discrepancy.Palpha

public class Palpha
extends Discrepancy

Extends the class Discrepancy and implements the methods required to compute the Pα figure of merit for a lattice point set Ψs which is the intersection of a lattice L and the unit hypercube [0, 1)s in s dimensions. Ψs contains n points. For an arbitrary integer α > 1, it is defined as

Pα(s) = ∑0≠h∈Ls*|h|-α,

where Ls* is the lattice dual to Ls, and the norm is defined as |h| = ∏sj=1max{1,| hj|}. When α is even, Pα can be evaluated explicitly as

        Pα(s) = - 1  +  $\displaystyle {\frac{1}{n}}$i=1nj=1s[1 - $\displaystyle {\frac{{(-1)^{\alpha/2}(2\pi)^\alpha}}{{\alpha!}}}$Bα(uij)],

where uij is the j-th coordinate of point i, and Bα(x) is the Bernoulli polynomial of degree α (see bernoulliPoly in class util/Num).

One may generalize the Pα by introducing a weight for each dimension to give the weighted Pα defined by

Pα(s) = ∑0≠h∈Ls*βI2|h|-α,

where the weights are such that βI = β0j=1sβjα, and for even α

        Pα(s) = β0{ -1  +  [tex2html_wrap_indisplay412]∑i=1nj=1s[1 - $\displaystyle {\frac{{(-1)^{\alpha/2}(2\pi\beta_{j})^\alpha}}{{\alpha!}}}$Bα(uij)]}.

One recovers the original criterion for Pα by choosing all βj = 1.


Constructor Summary
Palpha(double[][] points, int n, int s, double[] beta, int alpha)
          Constructor with n points in s dimensions and with alpha = α.
Palpha(double[][] points, int n, int s, int alpha)
          Constructor with all βj = 1 (see eq.).
Palpha(int alpha)
          Constructor with parameter alpha = α.
Palpha(int n, int s, double[] beta, int alpha)
          Constructor with n points in s dimensions and with alpha = α.
Palpha(Rank1Lattice set, double[] beta, int alpha)
          Constructor with the lattice set with weights beta[j]= βj and parameter alpha = α.
 
Method Summary
 double compute(double[][] points, int n, int s)
          Computes the discrepancy for the s-dimensional points of lattice points, containing n points.
 double compute(double[][] points, int n, int s, double[] beta)
          Computes the discrepancy for the s-dimensional points of lattice points, containing n points, with weights βj = beta[j].
 double compute(double[][] points, int n, int s, double[] beta, int alpha)
          Computes the discrepancy for the s-dimensional points of lattice points, containing n points, with weights βj = beta[j] and with α = alpha.
 double compute(double[][] points, int n, int s, int alpha)
          Computes the discrepancy for the s-dimensional points of lattice points, containing n points, with all weights βj = 1 and α = alpha.
 void setBeta(double[] beta)
          Sets the values of βj = beta[j], j = 0,…, s, where s is the dimension of the points.
 String toString()
          Returns the parameters of this class.
 
Methods inherited from class umontreal.iro.lecuyer.discrepancy.Discrepancy
compute, compute, compute, compute, compute, compute, compute, compute, formatPoints, getDimension, getGamma, getName, getNumPoints, setGamma, setPoints, setPoints, sort, toArray
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Palpha

public Palpha(double[][] points,
              int n,
              int s,
              double[] beta,
              int alpha)
Constructor with n points in s dimensions and with alpha = α. points[i][j] is the j-th coordinate of point i. Both i and j start at 0. The weights beta[j], j = 0, 1,…, s are as in eq.. The points and dimensions in are uij = points[i-1][j-1], but βj = beta[j]. Restriction: alpha ∈{2, 4, 6, 8}.


Palpha

public Palpha(double[][] points,
              int n,
              int s,
              int alpha)
Constructor with all βj = 1 (see eq.).


Palpha

public Palpha(int n,
              int s,
              double[] beta,
              int alpha)
Constructor with n points in s dimensions and with alpha = α. The n points will be chosen later. The weights beta[j], j = 0, 1,…, s are as in eq., with βj = beta[j]. Restriction: alpha ∈{2, 4, 6, 8}.


Palpha

public Palpha(int alpha)
Constructor with parameter alpha = α. The points and parameters must be defined before calling methods of this class. Restriction: alpha ∈{2, 4, 6, 8}.


Palpha

public Palpha(Rank1Lattice set,
              double[] beta,
              int alpha)
Constructor with the lattice set with weights beta[j]= βj and parameter alpha = α. All the points are copied in an internal array. Restriction: alpha ∈{2, 4, 6, 8}.

Method Detail

compute

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

Specified by:
compute in class Discrepancy

compute

public double compute(double[][] points,
                      int n,
                      int s,
                      double[] beta)
Computes the discrepancy for the s-dimensional points of lattice points, containing n points, with weights βj = beta[j].

Overrides:
compute in class Discrepancy

compute

public double compute(double[][] points,
                      int n,
                      int s,
                      int alpha)
Computes the discrepancy for the s-dimensional points of lattice points, containing n points, with all weights βj = 1 and α = alpha. Restriction: alpha ∈{2, 4, 6, 8}.


compute

public double compute(double[][] points,
                      int n,
                      int s,
                      double[] beta,
                      int alpha)
Computes the discrepancy for the s-dimensional points of lattice points, containing n points, with weights βj = beta[j] and with α = alpha. Restriction: alpha ∈{2, 4, 6, 8}.


toString

public String toString()
Description copied from class: Discrepancy
Returns the parameters of this class.

Overrides:
toString in class Discrepancy

setBeta

public void setBeta(double[] beta)
Sets the values of βj = beta[j], j = 0,…, s, where s is the dimension of the points.


SSJ
V. labo.

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