SSJ  3.3.1
Stochastic Simulation in Java
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BigDiscrepancy Class Referenceabstract

This abstract class is the base class of all discrepancy classes programmed with floating-point numbers with multi-precision. More...

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

Public Member Functions

 BigDiscrepancy (double[][] points, int n, int s)
 Constructor with the \(n\) points points[i] in \(s\) dimensions. More...
 
 BigDiscrepancy (double[][] points, int n, int s, double[] gamma)
 Constructor with the \(n\) points points[i] in \(s\) dimensions with weight factors gamma. More...
 
 BigDiscrepancy (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...
 
 BigDiscrepancy (PointSet set)
 Constructor with the point set set. More...
 
 BigDiscrepancy ()
 Empty constructor. More...
 
- 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.
 

Protected Member Functions

void reserveCBig (int s)
 
void reserveFactorBig (int n, int s)
 
void setUBig (int n)
 
- Protected Member Functions inherited from Discrepancy
void appendGamma (StringBuffer sb, double[] gamma, int s)
 

Protected Attributes

BigDecimal [] C1Big
 
BigDecimal [] C2Big
 
BigDecimal [] C3Big
 
BigDecimal [] UBig
 
BigDecimal [][] FactorBig
 
- Protected Attributes inherited from Discrepancy
double [] gamma
 
double [][] Points
 
int dim
 
int numPoints
 

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...
 
- Static Protected Member Functions inherited from Discrepancy
static void setONES (int s)
 
- 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 abstract class is the base class of all discrepancy classes programmed with floating-point numbers with multi-precision.

For \(n\) large, computing the discrepancy suffers from subtractive cancellation and loses all precision if one uses double numbers. Using multi-precision numbers allow us to compute the discrepancy for larger \(n\), but the computation is very slow.

Constructor & Destructor Documentation

◆ BigDiscrepancy() [1/5]

BigDiscrepancy ( 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.

◆ BigDiscrepancy() [2/5]

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

Constructor with the \(n\) points points[i] in \(s\) dimensions with weight factors gamma.

points[i][j] is the \(j\)-th coordinate of point \(i\). Both \(i\) and \(j\) start at 0.

◆ BigDiscrepancy() [3/5]

BigDiscrepancy ( 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.

◆ BigDiscrepancy() [4/5]

Constructor with the point set set.

All the points are copied in an internal array.

◆ BigDiscrepancy() [5/5]

Empty constructor.

The points and parameters must be defined before calling methods of this or derived classes.


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