SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.discrepancy.DiscL2Hickernell Class Reference

This class computes the Hickernell \(\mathcal{L}_2\)-star discrepancy in [78]  (eq. More...

Inheritance diagram for umontreal.ssj.discrepancy.DiscL2Hickernell:
umontreal.ssj.discrepancy.Discrepancy

Public Member Functions

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.
 DiscL2Hickernell (double[][] points, int n, int s)
 Constructor with the \(n\) points points[i] in dimension.
 DiscL2Hickernell (int n, int s)
 Constructor with \(n\) points in dimension \(s\).
 DiscL2Hickernell (PointSet set)
 Constructor with the point set set.
 DiscL2Hickernell ()
 Empty constructor.
double compute (double[][] points, int n, int s)
 Computes the Hickernell.
double compute (double[] T, int n)
 Computes the Hickernell.
Public Member Functions inherited from umontreal.ssj.discrepancy.Discrepancy
 Discrepancy (double[][] points, int n, int s)
 Constructor with the \(n\) points points[i] in \(s\) dimensions.
 Discrepancy (double[][] points, int n, int s, double[] gamma)
 Constructor with the \(n\) points points[i] in \(s\) dimensions and the \(s\) weight factors gamma[ \(j\)], \(j = 0, 1, …, (s-1)\).
 Discrepancy (int n, int s, double[] gamma)
 The number of points is \(n\), the dimension \(s\), and the.
 Discrepancy (PointSet set)
 Constructor with the point set set.
 Discrepancy ()
 Empty constructor.
double compute ()
 Computes the discrepancy of all the points in maximal dimension (dimension of the points).
double compute (int s)
 Computes the discrepancy of all the points in dimension \(s\).
double compute (double[][] points)
 Computes the discrepancy of all the points of points in maximum dimension.
double compute (double[] T)
 Computes the discrepancy of all the points of T in 1 dimension.
double compute (double[] T, int n, double gamma)
 Computes the discrepancy of the first n points of T in 1 dimension with weight gamma.
double compute (PointSet set, double[] gamma)
 Computes the discrepancy of all the points in set in the same dimension as the point set and with weights gamma.
double compute (PointSet set)
 Computes the discrepancy of all the points in set in the same dimension as the point set.
int getNumPoints ()
 Returns the number of points \(n\).
int getDimension ()
 Returns the dimension of the points \(s\).
void setPoints (double[][] points, int n, int s)
 Sets the points to points and the dimension to \(s\).
void setPoints (double[][] points)
 Sets the points to points.
void setGamma (double[] gam, int s)
 Sets the weight factors to gam for each dimension up to \(s\).
double[] getGamma ()
 Returns the weight factors gamma for each dimension up to \(s\).
String toString ()
 Returns the parameters of this class.
String formatPoints ()
 Returns all the points of this class.
String getName ()
 Returns the name of the Discrepancy.

Additional Inherited Members

Static Public Member Functions inherited from umontreal.ssj.discrepancy.Discrepancy
static double[][] toArray (PointSet set)
 Returns all the \(n\) points ( \(s\)-dimensional) of.
static DoubleArrayList sort (double[] T, int n)
 Sorts the first \(n\) points of \(T\).

Detailed Description

This class computes the Hickernell \(\mathcal{L}_2\)-star discrepancy in [78]  (eq.

5.1c) for a point set. It is based on the reproducing kernel Hilbert space which consists of functions with square-integrable first-order derivatives, and whose reproducing kernel is given by

\[ K(\mathbf{x},\mathbf{y}) = \prod_{j=1}^s \eta_j(x_j,y_j), \]

where

\[ \eta_j(x,y) = 1 + \frac{|x-a_j| + |y - a_j| - |x-y|}{2}. \]

The inner product is given by

\[ \langle f, g \rangle= \sum_{\mathfrak u\subseteq S} \int_{[0, 1)^{|\mathfrak u|}} \frac{\partial^{|\mathfrak u|}f(\mathbf{x}_{\mathfrak u}, \boldsymbol a)}{\partial\mathbf{x_{\mathfrak u}}} \frac{\partial^{|\mathfrak u|}g(\mathbf{x}_{\mathfrak u}, \boldsymbol a)}{\partial\mathbf{x_{\mathfrak u}}} d\mathbf{x_{\mathfrak u}}, \]

where \(S\) is the set of coordinates indices \(\{1, 2, ..., s\}\), \(|\mathfrak u|\) denotes the cardinality of \(\mathfrak u\), \(\mathbf{x_{\mathfrak u}}\) denotes the vector made of the components of \( \mathbf{x} \) whose indices are in \(\mathfrak u\), and \(\boldsymbol a \in[0, 1]^s\) is called the anchor.

The worst-case error for this function space is the \(\mathcal{L}_2\) version of the star discrepancy \(\mathcal{D}_2^*\). Choosing \(\boldsymbol a =\mathbf{1}\), Hickernell obtained the formula

\[[\mathcal{D}_2^*(\mathcal{P})]^2 = \left(\frac{4}{3}\right)^s - \frac{2}{n} \sum_{i=1}^n \prod_{k=1}^s \left(\frac{3 - z_{ik}^2}{2}\right) + \frac{1}{n^2} \sum_{i=1}^n\sum_{j=1}^n \prod_{k=1}^s \Bigl(2 - \max(z_{ik}, z_{jk})\Bigr), \tag{disc.hicks} \]

where \(n\) is the number of points of set \(\mathcal{P}\), \(s\) is the dimension of the points, and \(z_{ik}\) is the \(k\)-th coordinate of point \(i\).

In 1 dimension, the formula is equivalent to

\[[\mathcal{D}_2^*(\mathcal{P})]^2 = \frac{1}{3} + \frac{1}{n} \sum_{i=1}^n {z_i^2} - \frac{1}{n^2} \sum_{i=1}^n\sum_{j=1}^n \max(z_i, z_j), \tag{hickD1} \]

where \(z_i\) is the coordinate of point \(i\).

Definition at line 65 of file DiscL2Hickernell.java.

Constructor & Destructor Documentation

◆ DiscL2Hickernell() [1/4]

umontreal.ssj.discrepancy.DiscL2Hickernell.DiscL2Hickernell ( double points[][],
int n,
int s )

Constructor with the \(n\) points points[i] in dimension.

\(s\). points[i][j] is the \(j\)-th coordinate of point \(i\). Both \(i\) and \(j\) start at 0.

Definition at line 77 of file DiscL2Hickernell.java.

◆ DiscL2Hickernell() [2/4]

umontreal.ssj.discrepancy.DiscL2Hickernell.DiscL2Hickernell ( int n,
int s )

Constructor with \(n\) points in dimension \(s\).

The \(n\) points will be chosen later.

Definition at line 85 of file DiscL2Hickernell.java.

◆ DiscL2Hickernell() [3/4]

umontreal.ssj.discrepancy.DiscL2Hickernell.DiscL2Hickernell ( PointSet set)

Constructor with the point set set.

All the points are copied in an internal array.

Definition at line 93 of file DiscL2Hickernell.java.

◆ DiscL2Hickernell() [4/4]

umontreal.ssj.discrepancy.DiscL2Hickernell.DiscL2Hickernell ( )

Empty constructor.

One must set the points and the dimension before calling any method.

Definition at line 101 of file DiscL2Hickernell.java.

Member Function Documentation

◆ compute() [1/3]

double umontreal.ssj.discrepancy.DiscL2Hickernell.compute ( double[] T,
int n )

Computes the Hickernell.

\(\mathcal{L}_2\)-discrepancy ( hickD1 ) for the set of \(n\) 1-dimensional points T.

Reimplemented from umontreal.ssj.discrepancy.Discrepancy.

Definition at line 162 of file DiscL2Hickernell.java.

◆ compute() [2/3]

double umontreal.ssj.discrepancy.DiscL2Hickernell.compute ( double points[][],
int n,
int s )

Computes the Hickernell.

\(\mathcal{L}_2\)-discrepancy ( disc.hicks ) for the set of \(n\) \(s\)-dimensional points points.

Reimplemented from umontreal.ssj.discrepancy.Discrepancy.

Definition at line 114 of file DiscL2Hickernell.java.

◆ compute() [3/3]

double umontreal.ssj.discrepancy.DiscL2Hickernell.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.

Reimplemented from umontreal.ssj.discrepancy.Discrepancy.

Definition at line 67 of file DiscL2Hickernell.java.


The documentation for this class was generated from the following file: