25package umontreal.ssj.discrepancy;
27import umontreal.ssj.hups.Rank1Lattice;
67 super(points, n, s, gamma);
100 public double compute(
double[][] points,
int n,
int s) {
102 return compute(points, n, s, ONES);
109 public double compute(
double[][] points,
int n,
int s,
double[] gamma) {
110 double[] C1 =
new double[s];
111 double[] C2 =
new double[s];
112 setC(C1, C2, gamma, s);
115 for (
int i = 0; i < n; ++i) {
117 for (
int r = 0; r < s; ++r) {
118 double u = points[i][r];
119 double pol1 = u * (u - 1.0) + UNSIX;
120 double pol2 = ((u - 2.0) * u + 1.0) * u * u - UNTRENTE;
121 prod *= 1.0 + C1[r] * pol1 - C2[r] * pol2;
125 double disc = sum / n - 1.0;
128 return Math.sqrt(disc);
147 public double compute(
double[] T,
int n,
double gamma) {
148 double[] C = setC(gamma);
155 for (
int i = 0; i < n; ++i) {
157 pol1 = u * (u - 1.0) + UNSIX;
158 pol2 = ((u - 2.0) * u + 1.0) * u * u - UNTRENTE;
159 sum += C1 * pol1 - C2 * pol2;
161 double disc = sum / n;
164 return Math.sqrt(disc);
double compute(double[][] points, int n, int s, double[] gamma)
Computes the discrepancy ( shift2lat ) in dimension with gamma[r-1].
double compute(double[][] points, int n, int s)
Computes the discrepancy ( shift2lat ) for the first -dimensional points of lattice points.
double compute(double[] T, int n, double gamma)
Computes the discrepancy ( shift2dim1lat ) with weight gamma for the 1-dimensional lattice of point...
DiscShift2Lattice()
Empty constructor.
DiscShift2Lattice(Rank1Lattice set)
Constructor with the lattice set.
DiscShift2Lattice(int n, int s, double[] gamma)
The number of points is , the dimension , and the.
DiscShift2Lattice(double[][] points, int n, int s, double[] gamma)
Constructor with the points points[i] in dimension with the weights gamma[r-1],...
DiscShift2Lattice(double[][] points, int n, int s)
Constructor with the points points[i] in dimension with all weights .
double compute(double[] T, int n)
Computes the discrepancy ( shift2dim1lat ) with weight for the 1-dimensional lattice of points .
DiscShift2(double[][] points, int n, int s)
Constructor with the points points[i] in dimension , with all weights .
double compute()
Computes the discrepancy of all the points in maximal dimension (dimension of the points).
This class implements point sets specified by integration lattices of rank 1.