SSJ  3.3.1
Stochastic Simulation in Java
Public Member Functions | List of all members
DiscShift2Lattice Class Reference

This class computes the same discrepancy for randomly shifted points of a set \(\mathcal{L}\) as given in eq. More...

Inheritance diagram for DiscShift2Lattice:
[legend]
Collaboration diagram for DiscShift2Lattice:
[legend]

Public Member Functions

 DiscShift2Lattice (double[][] points, int n, int s)
 Constructor with the \(n\) points points[i] in dimension \(s\) with all weights \(\gamma_r =1\). More...
 
 DiscShift2Lattice (double[][] points, int n, int s, double[] gamma)
 Constructor with the \(n\) points points[i] in dimension \(s\) with the weights \(\gamma_r = \) gamma[r-1], \(r = 1, …, s\). More...
 
 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)\). More...
 
 DiscShift2Lattice (Rank1Lattice set)
 Constructor with the lattice set. More...
 
 DiscShift2Lattice ()
 Empty constructor. More...
 
double compute (double[][] points, int n, int s)
 Computes the discrepancy ( shift2lat ) for the first \(n\) \(s\)-dimensional points of lattice points. More...
 
double compute (double[][] points, int n, int s, double[] gamma)
 Computes the discrepancy ( shift2lat ) in dimension \(s\) with \(\gamma_r = \) gamma[r-1].
 
double compute (double[] T, int n)
 Computes the discrepancy ( shift2dim1lat ) with weight \(\gamma=1\) for the 1-dimensional lattice of \(n\) points \(T\).
 
double compute (double[] T, int n, double gamma)
 Computes the discrepancy ( shift2dim1lat ) with weight \(\gamma=\) gamma for the 1-dimensional lattice of \(n\) points \(T\).
 
- Public Member Functions inherited from DiscShift2
 DiscShift2 (double[][] points, int n, int s)
 Constructor with the \(n\) points \(P_i = \) points[i] in dimension \(s\), with all weights \(\gamma_j =1\). More...
 
 DiscShift2 (double[][] points, int n, int s, double[] gamma)
 Constructor with the \(n\) points \(P_i = \) points[i] in dimension \(s\), with the weights \(\gamma_j = \) gamma[j-1], \(j = 1, …, s\). More...
 
 DiscShift2 (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)\). More...
 
 DiscShift2 (PointSet set)
 Constructor with the point set set. More...
 
 DiscShift2 ()
 Empty constructor. More...
 
double compute (double[][] points, int n, int s)
 Computes the discrepancy ( shift2 ) for the first \(n\) points of set points in dimension \(s\). More...
 
double compute (double[][] points, int n, int s, double[] gamma)
 Computes the discrepancy ( shift2 ) for the first \(n\) points of set points in dimension \(s\) and with weight \(\gamma_r = \) gamma[r-1].
 
double compute (double[] T, int n)
 Computes the discrepancy ( shift2dim1 ) 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 ( shift2dim1 ) for the first \(n\) points of \(T\) in 1 dimension, with weight \(\gamma=\) gamma.
 
- Public Member Functions inherited from Discrepancy
 Discrepancy (double[][] points, int n, int s)
 Constructor with the \(n\) points points[i] in \(s\) dimensions. More...
 
 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)\). More...
 
 Discrepancy (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)\). More...
 
 Discrepancy (PointSet set)
 Constructor with the point set set. More...
 
 Discrepancy ()
 Empty constructor. More...
 
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, int n, int s, double[] gamma)
 Computes the discrepancy of the first n points of points in dimension s with weights gamma.
 
abstract double compute (double[][] points, int n, int s)
 Computes the discrepancy of the first n points of points in dimension s with weights \(=1\).
 
double compute (double[][] points)
 Computes the discrepancy of all the points of points in maximum dimension. More...
 
double compute (double[] T, int n)
 Computes the discrepancy of the first n points of T in 1 dimension. More...
 
double compute (double[] T)
 Computes the discrepancy of all the points of T in 1 dimension. More...
 
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. More...
 
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\). More...
 
void setPoints (double[][] points)
 Sets the points to points. More...
 
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 Discrepancy
static double [][] toArray (PointSet set)
 Returns all the \(n\) points ( \(s\)-dimensional) of umontreal.ssj.hups.PointSet set as an array points[ \(n\)][ \(s\)].
 
static DoubleArrayList sort (double[] T, int n)
 Sorts the first \(n\) points of \(T\). More...
 
- Protected Member Functions inherited from Discrepancy
void appendGamma (StringBuffer sb, double[] gamma, int s)
 
- Static Protected Member Functions inherited from DiscShift2
static double [] setC (double gam)
 
static void setC (double[] C1, double[] C2, double[] gam, int s)
 
- Static Protected Member Functions inherited from Discrepancy
static void setONES (int s)
 
- Protected Attributes inherited from Discrepancy
double [] gamma
 
double [][] Points
 
int dim
 
int numPoints
 
- Static Protected Attributes inherited from Discrepancy
static double [] ONES = { 1 }
 
- Static Package Attributes inherited from Discrepancy
static final double UNSIX = 1.0/6.0
 
static final double QUARAN = 1.0/42.0
 
static final double UNTRENTE = 1.0 / 30.0
 
static final double DTIERS = 2.0 / 3.0
 
static final double STIERS = 7.0 / 3.0
 
static final double QTIERS = 14.0 / 3.0
 

Detailed Description

This class computes the same discrepancy for randomly shifted points of a set \(\mathcal{L}\) as given in eq.

( shift2 ) for class DiscShift2, but for the special case when the points are the nodes of an integration lattice [84]  (eq. 16). It is given by

\[ [\mathcal{D}(\mathcal{L})]^2 = -1 + \frac{1}{n} \sum_{i=1}^n \prod_{r=1}^s \left[1 + \frac{\gamma_r^2}{2} B_2(x_{ir}) - \frac{\gamma_r^4}{12}B_4(x_{ir}) \right], \tag{shift2lat} \]

For a 1-dimensional lattice, the discrepancy becomes

\[ [\mathcal{D}(\mathcal{L})]^2 = \frac{1}{n} \sum_{i=1}^n \left[\frac{\gamma^2}{2} B_2(x_i) - \frac{\gamma^4}{12}B_4(x_i)\right]. \tag{shift2dim1lat} \]

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

Constructor & Destructor Documentation

◆ DiscShift2Lattice() [1/5]

DiscShift2Lattice ( double  points[][],
int  n,
int  s 
)

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

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

◆ DiscShift2Lattice() [2/5]

DiscShift2Lattice ( double  points[][],
int  n,
int  s,
double []  gamma 
)

Constructor with the \(n\) points points[i] in dimension \(s\) with the weights \(\gamma_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() [3/5]

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() [4/5]

Constructor with the lattice set.

All the points are copied in an internal array.

◆ DiscShift2Lattice() [5/5]

Empty constructor.

The points and parameters must be defined before calling methods of this class.

Member Function Documentation

◆ compute()

double compute ( double  points[][],
int  n,
int  s 
)

Computes the discrepancy ( shift2lat ) for the first \(n\) \(s\)-dimensional points of lattice points.

All weights \(\gamma_r = 1\).


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