SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
BigDiscShiftBaker1.java
1/*
2 * Class: BigDiscShiftBaker1
3 * Description: computes a discrepancy for a randomly shifted, then baker
4 folded point set using multi-precision real numbers
5 * Environment: Java
6 * Software: SSJ
7 * Copyright (C) 2001 Pierre L'Ecuyer and Universite de Montreal
8 * Organization: DIRO, Universite de Montreal
9 * @author Richard Simard
10 * @since January 2009
11
12 * SSJ is free software: you can redistribute it and/or modify it under
13 * the terms of the GNU General Public License (GPL) as published by the
14 * Free Software Foundation, either version 3 of the License, or
15 * any later version.
16
17 * SSJ is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21
22 * A copy of the GNU General Public License is available at
23 <a href="http://www.gnu.org/licenses">GPL licence site</a>.
24 */
25package umontreal.ssj.discrepancy;
26
27import umontreal.ssj.hups.PointSet;
28import umontreal.ssj.util.Num;
29import java.math.*;
30
43public class BigDiscShiftBaker1 extends BigDiscrepancy {
44 static final BigDecimal BIG4s3 = new BigDecimal("1.3333333333333333333333333333333333"); // 4/3
45 static final BigDecimal BIG1s9 = new BigDecimal("0.1111111111111111111111111111111111"); // 1/9
46 static final BigDecimal BIG16s45 = new BigDecimal("0.35555555555555555555555555555555556"); // 16/45
47
48 protected void setCBig(double[] gam, int s) {
49 for (int i = 0; i < s; i++) {
50 BigDecimal v = new BigDecimal(gam[i]);
51 v = v.pow(2); // v = gam[i]*gam[i]
52 C1Big[i] = v.multiply(BIG4s3); // C1[i] = v * 4 / 3
53 v = v.pow(2); // v = v*v
54 C2Big[i] = v.multiply(BIG1s9); // C2[i] = v / 9.0;
55 C3Big[i] = v.multiply(BIG16s45); // C3[i] = v * 16.0 / 45.0;
56 }
57 }
58
64 public BigDiscShiftBaker1(double[][] points, int n, int s) {
65 super(points, n, s);
66 }
67
73 public BigDiscShiftBaker1(double[][] points, int n, int s, double[] gamma) {
74 super(points, n, s, gamma);
75 }
76
82 public BigDiscShiftBaker1(int n, int s, double[] gamma) {
83 super(n, s, gamma);
84 }
85
91 super(set);
92 }
93
99 }
100
104 public double compute(double[][] points, int n, int s) {
105 setONES(s);
106 return compute(points, n, s, ONES);
107 }
108
112 public double compute(double[][] points, int n, int s, double[] gamma) {
113 throw new UnsupportedOperationException("method NOT IMPLEMENTED");
114 }
115
116}
double compute(double[][] points, int n, int s)
NOT IMPLEMENTED.
double compute(double[][] points, int n, int s, double[] gamma)
NOT IMPLEMENTED.
BigDiscShiftBaker1(PointSet set)
Constructor with the point set set.
BigDiscShiftBaker1(double[][] points, int n, int s)
Constructor with the points points[i] in dimensions, with all the weights .
BigDiscShiftBaker1(double[][] points, int n, int s, double[] gamma)
Constructor with the points points[i] in dimensions, with weights gamma[r-1].
BigDiscShiftBaker1(int n, int s, double[] gamma)
Constructor for a lattice of points in dimensions, with weights gamma[r-1], .
BigDiscrepancy(double[][] points, int n, int s)
Constructor with the points points[i] in dimensions.
double compute()
Computes the discrepancy of all the points in maximal dimension (dimension of the points).
This abstract class represents a general point set.
Definition PointSet.java:99