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

This class computes the discrepancy for randomly shifted, then baker folded points of a set \(\mathcal{P}\). More...

Inheritance diagram for umontreal.ssj.discrepancy.DiscShiftBaker1:
umontreal.ssj.discrepancy.Discrepancy umontreal.ssj.discrepancy.DiscShiftBaker1Lattice

Public Member Functions

 DiscShiftBaker1 (double[][] points, int n, int s)
 Constructor with the \(n\) points points[i] in \(s\) dimensions, with all the weights \(\gamma_r = 1\).
 DiscShiftBaker1 (double[][] points, int n, int s, double[] gamma)
 Constructor with the \(n\) points points[i] in \(s\) dimensions, with weights \(\gamma_r = \) gamma[r-1].
 DiscShiftBaker1 (int n, int s, double[] gamma)
 The number of points is \(n\), the dimension \(s\), and the.
 DiscShiftBaker1 (PointSet set)
 Constructor with the point set set.
 DiscShiftBaker1 ()
 Empty constructor.
double compute (double[][] points, int n, int s)
 Computes the discrepancy ( baker1 ) for the \(s\)-dimensional points of set points, containing.
double compute (double[][] points, int n, int s, double[] gamma)
 Computes the discrepancy ( baker1 ) for the first \(n\) points of points in dimension \(s\) and with weight \(\gamma_r = \) gamma[r-1].
double compute (double[] T, int n)
 Computes the discrepancy ( baker1dim1 ) for the first \(n\) points of \(T\) in 1 dimension, with weight \(\gamma= 1\).
double compute (double[] T, int n, double gamma)
 Computes the discrepancy ( baker1dim1 ) for the first \(n\) points of \(T\) in 1 dimension, with weight \(\gamma=\) gamma.
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 (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 discrepancy for randomly shifted, then baker folded points of a set \(\mathcal{P}\).

It is given by

[81]  (eq. 15)

\begin{align} [\mathcal{D}(\mathcal{P})]^2 & = -1 + \frac{1}{n^2} \sum_{i=1}^n \sum_{j=1}^n \prod_{r=1}^s \left(1 - \frac{4\gamma_r^2}{3} \left[B_4(\{x_{ir} - x_{jr}\}) - B_4(\{\{x_{ir} - x_{jr}\}-1/2\})\right]\right. \nonumber \\ & \qquad\qquad{} - \frac{\gamma_r^4}{9} \left[7B_4(\{x_{ir} - x_{jr}\}) - 2B_4(\{\{x_{ir} - x_{jr}\}-1/2\})\right] \tag{baker1} \\ & \qquad\qquad{} \left. {} - \frac{16\gamma_r^4}{45} \left[B_6(\{x_{ir} - x_{jr}\}) -B_6(\{\{x_{ir} - x_{jr}\}-1/2\})\right] \right)\nonumber, \end{align}

where \(n\) is the number of points of \(\mathcal{P}\), \(s\) is the dimension of the points, \(x_{ir}\) is the \(r\)-th coordinate of point \(i\), and the \(\gamma_r\) are arbitrary positive weights. The \(B_{\alpha}(x)\) are the Bernoulli polynomials [1]  (chap. 23) of degree \(\alpha\) (see umontreal.ssj.util.Num.bernoulliPoly in class util/Num), and the notation \(\{x\}\) means the fractional part of \(x\), defined here as \(\{x\} = x \bmod1\). In one dimension, the formula simplifies to

\begin{align} [\mathcal{D}(\mathcal{P})]^2 & = \frac{1}{n^2} \sum_{i=1}^n \sum_{j=1}^n \left[ - \frac{4\gamma^2}{3} \left[B_4(\{x_i - x_j\}) - B_4(\{\{x_i - x_j\}-1/2\})\right]\right. \nonumber \\ & \qquad\qquad{} - \frac{\gamma^4}{9} \left[7B_4(\{x_i - x_j\}) - 2B_4(\{\{x_i - x_j\}-1/2\})\right] \tag{baker1dim1} \\ & \qquad\qquad{} \left. {} - \frac{16\gamma^4}{45} \left[B_6(\{x_i - x_j\}) -B_6(\{\{x_i - x_j\}-1/2\})\right] \right]\nonumber. \end{align}

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 \(\mathcal{H}\) with a reproducing kernel \(K\) given by

\[ K(\mathbf{x},\mathbf{y}) = \prod_{r=1}^s \left[ - \frac{\gamma_r^4}{4!} B_4(\{x_r-y_r\}) + \sum_{\alpha=0}^2 \frac{\gamma_r^{2\alpha}}{(\alpha!)^2} B_{\alpha}(x_r)B_{\alpha}(y_r) \right], \]

The norm of the vectors in \(\mathcal{H}\) is defined by

\[ \| f\|^2 = \sum_{u \subseteq S}\sum_{v \subseteq u}\gamma_u^{-2}\gamma_v^{-2} \int_{[0,1]^v}d\mathbf{x}_v\left[\int_{[0,1]^{S-v}} \frac{\partial^{|u| + |v|}f}{\partial\mathbf{x}_u\partial\mathbf{x}_v} d\mathbf{x}_{S-v} \right]^2, \]

where \(S= \{1, …, s\}\) is a set of coordinate indices, \(u \subseteq S\), and \(\gamma_u = \prod_{r\in u} \gamma_r\).

Definition at line 80 of file DiscShiftBaker1.java.

Constructor & Destructor Documentation

◆ DiscShiftBaker1() [1/5]

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

Constructor with the \(n\) points points[i] in \(s\) dimensions, with all the weights \(\gamma_r = 1\).

points[i][r] is the r-th coordinate of point i. Indices i and r start at 0.

Definition at line 107 of file DiscShiftBaker1.java.

◆ DiscShiftBaker1() [2/5]

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

Constructor with the \(n\) points points[i] in \(s\) dimensions, with weights \(\gamma_r = \) gamma[r-1].

points[i][r] is the r-th coordinate of point i. Indices i and r start at 0.

Definition at line 116 of file DiscShiftBaker1.java.

◆ DiscShiftBaker1() [3/5]

umontreal.ssj.discrepancy.DiscShiftBaker1.DiscShiftBaker1 ( int n,
int s,
double[] gamma )

The number of points is \(n\), the dimension \(s\), and the.

\(s\) weight factors are gamma[ \(r\)], \(r = 0, 1, …, (s-1)\). The \(n\) points will be chosen later.

Definition at line 126 of file DiscShiftBaker1.java.

◆ DiscShiftBaker1() [4/5]

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

Constructor with the point set set.

All the points are copied in an internal array.

Definition at line 134 of file DiscShiftBaker1.java.

◆ DiscShiftBaker1() [5/5]

umontreal.ssj.discrepancy.DiscShiftBaker1.DiscShiftBaker1 ( )

Empty constructor.

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

Definition at line 142 of file DiscShiftBaker1.java.

Member Function Documentation

◆ compute() [1/4]

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

Computes the discrepancy ( baker1dim1 ) for the first \(n\) points of \(T\) in 1 dimension, with weight \(\gamma= 1\).

Reimplemented from umontreal.ssj.discrepancy.Discrepancy.

Reimplemented in umontreal.ssj.discrepancy.DiscShiftBaker1Lattice.

Definition at line 216 of file DiscShiftBaker1.java.

◆ compute() [2/4]

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

Computes the discrepancy ( baker1dim1 ) for the first \(n\) points of \(T\) in 1 dimension, with weight \(\gamma=\) gamma.

Reimplemented from umontreal.ssj.discrepancy.Discrepancy.

Reimplemented in umontreal.ssj.discrepancy.DiscShiftBaker1Lattice.

Definition at line 225 of file DiscShiftBaker1.java.

◆ compute() [3/4]

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

Computes the discrepancy ( baker1 ) for the \(s\)-dimensional points of set points, containing.

\(n\) points. All weights \(\gamma_r = 1\).

Reimplemented from umontreal.ssj.discrepancy.Discrepancy.

Reimplemented in umontreal.ssj.discrepancy.DiscShiftBaker1Lattice.

Definition at line 151 of file DiscShiftBaker1.java.

◆ compute() [4/4]

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

Computes the discrepancy ( baker1 ) for the first \(n\) points of points in dimension \(s\) and with weight \(\gamma_r = \) gamma[r-1].

Reimplemented from umontreal.ssj.discrepancy.Discrepancy.

Reimplemented in umontreal.ssj.discrepancy.DiscShiftBaker1Lattice.

Definition at line 161 of file DiscShiftBaker1.java.


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