SSJ
V. labo.

umontreal.iro.lecuyer.discrepancy
Class DiscL2Unanchored

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

public class DiscL2Unanchored
extends Discrepancy

DiscL2Unanchored

A discrepancy is said to be reflection-invariant if it has the same value when the points are reflected through any plane xj = 1/2, passing through the center of the unit hypercube, i.e. when any one of the coordinates, say zj, is replaced by 1 - zj for all the points. The star discrepancy is not reflection-invariant because it is anchored at the origin, but the unanchored discrepancy is. This discrepancy counts the points in all boxes [x, y)∈[0, 1)s.

This class computes the L2-unanchored discrepancy for a set of points P[#!vMOR94a!#,#!tHIC99a!#], given by

[D(P)]2 = ($\displaystyle {\frac{1}{{12}}}$)s - $\displaystyle {\frac{2}{n}}$$\displaystyle \htsum_{{i=1}}^{n}$$\displaystyle \htprod_{{k=1}}^{s}$[$\displaystyle {\frac{{z_{ik}(1 - z_{ik})}}{2}}$] + $\displaystyle {\frac{{1}}{{n^2}}}$[tex2html_wrap_indisplay223]$\displaystyle \htsum_{{j=1}}^{n}$[tex2html_wrap_indisplay225][$\displaystyle \htmin$(zik, zjk) - zikzjk],

where n is the number of points of P, s is the dimension, and zik is the k-th coordinate of point i.

In one dimension, formula is equivalent to

[D(P)]2 = [tex2html_wrap_indisplay234] - $\displaystyle {\frac{1}{n}}$[tex2html_wrap_indisplay236]zi(1-zi) + [tex2html_wrap_indisplay237][tex2html_wrap_indisplay238][tex2html_wrap_indisplay239]([tex2html_wrap_indisplay240](zi, zj) - zizj),

where zi is the point i.


Constructor Summary
DiscL2Unanchored()
          .
DiscL2Unanchored(double[][] points, int n, int s)
          .
DiscL2Unanchored(int n, int s)
          .
DiscL2Unanchored(PointSet set)
          .
 
Method Summary
 double compute(double[][] points, int n, int s)
          .
 double compute(double[][] points, int n, int s, double[] gamma)
          Computes the discrepancy of the first n points of points in dimension s with weights gamma.
 double compute(double[] T, int n)
          .
 
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

DiscL2Unanchored

public DiscL2Unanchored(double[][] points,
                        int n,
                        int s)
. \begin{tabb}Constructor with the $n$\ points \texttt{points[i]}
 in $s$\ dimensio...
 ...is the $j$-th coordinate of point $i$.
 Both $i$\ and $j$\ start at 0.
 \end{tabb}


DiscL2Unanchored

public DiscL2Unanchored(int n,
                        int s)
. \begin{tabb}Constructor with $n$\ points in dimension $s$. The $n$
 points will be chosen later.
 \end{tabb}


DiscL2Unanchored

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


DiscL2Unanchored

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

Method Detail

compute

public double compute(double[][] points,
                      int n,
                      int s,
                      double[] gamma)
Description copied from class: Discrepancy
Computes the discrepancy of the first n points of points in dimension s with weights gamma.

Overrides:
compute in class Discrepancy

compute

public double compute(double[][] points,
                      int n,
                      int s)
. \begin{tabb}Computes the ${L}_2$-\textbf{unanchored discrepancy} for the set of $n$\ $s$-dimensional points \texttt{points}.
 \end{tabb}

Specified by:
compute in class Discrepancy

compute

public double compute(double[] T,
                      int n)
. \begin{tabb}Computes the ${L}_2$-\textbf{unanchored discrepancy}
 for the 1-dimensional set of $n$\ points $T$, using formula.
 \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.