SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.discrepancy.Discrepancy Class Referenceabstract

This abstract class is the base class of all discrepancy classes. More...

Inheritance diagram for umontreal.ssj.discrepancy.Discrepancy:
umontreal.ssj.discrepancy.BigDiscrepancy umontreal.ssj.discrepancy.DiscL2Hickernell umontreal.ssj.discrepancy.DiscL2Star umontreal.ssj.discrepancy.DiscL2Symmetric umontreal.ssj.discrepancy.DiscL2Unanchored umontreal.ssj.discrepancy.DiscShift1 umontreal.ssj.discrepancy.DiscShift2 umontreal.ssj.discrepancy.DiscShiftBaker1 umontreal.ssj.discrepancy.Palpha

Public Member Functions

 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, 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.
double compute (double[] T, int n)
 Computes the discrepancy of the first n points of T in 1 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.

Static Public Member Functions

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\).

Detailed Description

This abstract class is the base class of all discrepancy classes.

All derived classes must implement the abstract method compute(points, n, s).

Definition at line 36 of file Discrepancy.java.

Constructor & Destructor Documentation

◆ Discrepancy() [1/5]

umontreal.ssj.discrepancy.Discrepancy.Discrepancy ( 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. One may also choose points = null in which case, the points must be set later.

Definition at line 86 of file Discrepancy.java.

◆ Discrepancy() [2/5]

umontreal.ssj.discrepancy.Discrepancy.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)\).

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

\(i\) and \(j\) start at 0. One may also choose points = null in which case, the points must be set later.

Definition at line 99 of file Discrepancy.java.

◆ Discrepancy() [3/5]

umontreal.ssj.discrepancy.Discrepancy.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)\). The \(n\) points will be chosen later.

Definition at line 109 of file Discrepancy.java.

◆ Discrepancy() [4/5]

umontreal.ssj.discrepancy.Discrepancy.Discrepancy ( PointSet set)

Constructor with the point set set.

All the points are copied in an internal array.

Definition at line 117 of file Discrepancy.java.

◆ Discrepancy() [5/5]

umontreal.ssj.discrepancy.Discrepancy.Discrepancy ( )

Empty constructor.

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

Definition at line 128 of file Discrepancy.java.

Member Function Documentation

◆ compute() [1/10]

double umontreal.ssj.discrepancy.Discrepancy.compute ( )

Computes the discrepancy of all the points in maximal dimension (dimension of the points).

Definition at line 135 of file Discrepancy.java.

◆ compute() [2/10]

double umontreal.ssj.discrepancy.Discrepancy.compute ( double[] T)

Computes the discrepancy of all the points of T in 1 dimension.

Calls method compute(T, T.length, gamma[0]).

Definition at line 186 of file Discrepancy.java.

◆ compute() [3/10]

double umontreal.ssj.discrepancy.Discrepancy.compute ( double[] T,
int n )

◆ compute() [4/10]

double umontreal.ssj.discrepancy.Discrepancy.compute ( double[] T,
int n,
double gamma )

Computes the discrepancy of the first n points of T in 1 dimension with weight gamma.

Reimplemented in umontreal.ssj.discrepancy.DiscShift2, umontreal.ssj.discrepancy.DiscShift2Lattice, umontreal.ssj.discrepancy.DiscShiftBaker1, and umontreal.ssj.discrepancy.DiscShiftBaker1Lattice.

Definition at line 194 of file Discrepancy.java.

◆ compute() [5/10]

double umontreal.ssj.discrepancy.Discrepancy.compute ( double points[][])

Computes the discrepancy of all the points of points in maximum dimension.

Calls method compute(points, points.length, points[0].length, gamma).

Definition at line 165 of file Discrepancy.java.

◆ compute() [6/10]

◆ compute() [7/10]

◆ compute() [8/10]

double umontreal.ssj.discrepancy.Discrepancy.compute ( int s)

Computes the discrepancy of all the points in dimension \(s\).

Definition at line 142 of file Discrepancy.java.

◆ compute() [9/10]

double umontreal.ssj.discrepancy.Discrepancy.compute ( PointSet set)

Computes the discrepancy of all the points in set in the same dimension as the point set.

All the weights \(=1\).

Definition at line 227 of file Discrepancy.java.

◆ compute() [10/10]

double umontreal.ssj.discrepancy.Discrepancy.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.

Definition at line 202 of file Discrepancy.java.

◆ formatPoints()

String umontreal.ssj.discrepancy.Discrepancy.formatPoints ( )

Returns all the points of this class.

Definition at line 329 of file Discrepancy.java.

◆ getDimension()

int umontreal.ssj.discrepancy.Discrepancy.getDimension ( )

Returns the dimension of the points \(s\).

Definition at line 243 of file Discrepancy.java.

◆ getGamma()

double[] umontreal.ssj.discrepancy.Discrepancy.getGamma ( )

Returns the weight factors gamma for each dimension up to \(s\).

Definition at line 273 of file Discrepancy.java.

◆ getName()

String umontreal.ssj.discrepancy.Discrepancy.getName ( )

Returns the name of the Discrepancy.

Definition at line 346 of file Discrepancy.java.

◆ getNumPoints()

int umontreal.ssj.discrepancy.Discrepancy.getNumPoints ( )

Returns the number of points \(n\).

Definition at line 236 of file Discrepancy.java.

◆ setGamma()

void umontreal.ssj.discrepancy.Discrepancy.setGamma ( double[] gam,
int s )

Sets the weight factors to gam for each dimension up to \(s\).

Definition at line 266 of file Discrepancy.java.

◆ setPoints() [1/2]

void umontreal.ssj.discrepancy.Discrepancy.setPoints ( double points[][])

Sets the points to points.

The number of points and the dimension are the same as in points.

Definition at line 259 of file Discrepancy.java.

◆ setPoints() [2/2]

void umontreal.ssj.discrepancy.Discrepancy.setPoints ( double points[][],
int n,
int s )

Sets the points to points and the dimension to \(s\).

The number of points is \(n\).

Definition at line 251 of file Discrepancy.java.

◆ sort()

DoubleArrayList umontreal.ssj.discrepancy.Discrepancy.sort ( double[] T,
int n )
static

Sorts the first \(n\) points of \(T\).

Returns the sorted points. Warning: \(T\) is sorted also.

Definition at line 308 of file Discrepancy.java.

◆ toArray()

double[][] umontreal.ssj.discrepancy.Discrepancy.toArray ( PointSet set)
static

Returns all the \(n\) points ( \(s\)-dimensional) of.

umontreal.ssj.hups.PointSet set as an array points[ \(n\)][ \(s\)].

Definition at line 283 of file Discrepancy.java.

◆ toString()

String umontreal.ssj.discrepancy.Discrepancy.toString ( )

Returns the parameters of this class.

Reimplemented in umontreal.ssj.discrepancy.Palpha.

Definition at line 317 of file Discrepancy.java.


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