A discrepancy is said to be reflection-invariant if it has the same value when the points are reflected through any plane \(x_j= 1/2\), passing through the center of the unit hypercube, i.e. More...
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. | |
| DiscL2Unanchored (double[][] points, int n, int s) | |
| Constructor with the \(n\) points points[i] in \(s\) dimensions. | |
| DiscL2Unanchored (int n, int s) | |
| Constructor with \(n\) points in dimension \(s\). | |
| DiscL2Unanchored (PointSet set) | |
| Constructor with the point set set. | |
| DiscL2Unanchored () | |
| Empty constructor. | |
| double | compute (double[][] points, int n, int s) |
Computes the \(\mathcal{L}_2\)-unanchored discrepancy ( disc.unan ) for the set of \(n\) \(s\)-dimensional points points. | |
| double | compute (double[] T, int n) |
| Computes the \(\mathcal{L}_2\)-unanchored discrepancy for the 1-dimensional set of \(n\) points. | |
| 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\). | |
A discrepancy is said to be reflection-invariant if it has the same value when the points are reflected through any plane \(x_j= 1/2\), passing through the center of the unit hypercube, i.e.
when any one of the coordinates, say \(z_j\), is replaced by \(1 - z_j\) 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) \in[0,1)^s\).
This class computes the \(\mathcal{L}_2\)-unanchored discrepancy for a set of points \(\mathcal{P}\) [177],
[80] , given by
\[ [\mathcal{D}(\mathcal{P})]^2 = \left(\frac{1}{12}\right)^s - \frac{2}{n} \sum_{i=1}^n \prod_{k=1}^s \left[\frac{z_{ik}(1 - z_{ik})}{2}\right] + \frac{1}{n^2} \sum_{i=1}^n\sum_{j=1}^n \prod_{k=1}^s \left[\min(z_{ik}, z_{jk}) - z_{ik} z_{jk}\right], \tag{disc.unan} \]
where \(n\) is the number of points of \(\mathcal{P}\), \(s\) is the dimension, and \(z_{ik}\) is the \(k\)-th coordinate of point \(i\).
In one dimension, formula ( disc.unan ) is equivalent to
\[ [\mathcal{D}(\mathcal{P})]^2 = \frac{1}{12} - \frac{1}{n} \sum_{i=1}^n {z_i(1 - z_i)} + \frac{1}{n^2} \sum_{i=1}^n\sum_{j=1}^n (\min(z_i, z_j) - z_i z_j), \tag{unanD1} \]
where \(z_i\) is the point \(i\).
Definition at line 61 of file DiscL2Unanchored.java.
| umontreal.ssj.discrepancy.DiscL2Unanchored.DiscL2Unanchored | ( | double | points[][], |
| int | n, | ||
| int | s ) |
Constructor with the \(n\) points points[i] in \(s\) dimensions.
points[i][j] is the \(j\)-th coordinate of point
\(i\). Both \(i\) and \(j\) start at 0.
Definition at line 73 of file DiscL2Unanchored.java.
| umontreal.ssj.discrepancy.DiscL2Unanchored.DiscL2Unanchored | ( | int | n, |
| int | s ) |
Constructor with \(n\) points in dimension \(s\).
The \(n\) points will be chosen later.
Definition at line 81 of file DiscL2Unanchored.java.
| umontreal.ssj.discrepancy.DiscL2Unanchored.DiscL2Unanchored | ( | PointSet | set | ) |
Constructor with the point set set.
All the points are copied in an internal array.
Definition at line 89 of file DiscL2Unanchored.java.
| umontreal.ssj.discrepancy.DiscL2Unanchored.DiscL2Unanchored | ( | ) |
Empty constructor.
One must set the points and the dimension before calling any method.
Definition at line 97 of file DiscL2Unanchored.java.
| double umontreal.ssj.discrepancy.DiscL2Unanchored.compute | ( | double[] | T, |
| int | n ) |
Computes the \(\mathcal{L}_2\)-unanchored discrepancy for the 1-dimensional set of \(n\) points.
\(T\), using formula ( unanD1 ).
Reimplemented from umontreal.ssj.discrepancy.Discrepancy.
Definition at line 140 of file DiscL2Unanchored.java.
| double umontreal.ssj.discrepancy.DiscL2Unanchored.compute | ( | double | points[][], |
| int | n, | ||
| int | s ) |
Computes the \(\mathcal{L}_2\)-unanchored discrepancy ( disc.unan ) for the set of \(n\) \(s\)-dimensional points points.
Reimplemented from umontreal.ssj.discrepancy.Discrepancy.
Definition at line 106 of file DiscL2Unanchored.java.
| double umontreal.ssj.discrepancy.DiscL2Unanchored.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 63 of file DiscL2Unanchored.java.