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

This class implements searches to find the best rank-1 lattices with respect to a given discrepancy, using component-by-component (CBC) searches, random or exhaustive for each component. More...

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

Public Member Functions

 SearcherCBC (Discrepancy disc, boolean primeN)
 The number of points \(n\), the dimension \(s\), and possibly the \(s\) weight factors \(\gamma_j\) must be given in disc. More...
 
double exhaust (int s)
 Exhaustive CBC search to find the lattice with the best (the smallest) discrepancy in dimension \(s\). More...
 
double exhaustPrime (int s)
 Similar to exhaust(s), except that only values of \(a_j\) relatively prime to \(n\) are considered.
 
double random (int s, int k)
 Random CBC search to find the lattice with the best (the smallest) discrepancy in dimension \(s\). More...
 
double randomPrime (int s, int k)
 Similar to random(s, k), except that only values of \(a_j\) relatively prime to \(n\) are considered.
 
double [] getBestVals ()
 Returns the best value of the discrepancy found in the last search, in each dimension up to \(s\). More...
 
- Public Member Functions inherited from Searcher
 Searcher (Discrepancy disc, boolean primeN)
 The number of points \(n\), the dimension \(s\), and possibly the \(s\) weight factors \(\gamma_j\) must be given in disc. More...
 
double exhaust (int s)
 Exhaustive search to find the lattice with the best (the smallest) discrepancy in dimension \(s\). More...
 
double exhaustPrime (int s)
 Similar to exhaust(s), except that only values of \(a_j\) relatively prime to \(n\) are considered.
 
double random (int s, int k)
 Random search to find the lattice with the best (the smallest) discrepancy in dimension \(s\). More...
 
double randomPrime (int s, int k)
 Similar to random(s, k), except that only values of \(a_j\) relatively prime to \(n\) are considered.
 
double getBestVal ()
 Returns the best value of the discrepancy found in the last search.
 
int [] getBestAs ()
 Returns the generator of the lattice which gave the best value of the discrepancy in the last search. More...
 
void initGen (int seed)
 Initializes the random number generator used in random searches with the starting seed seed. More...
 

Protected Attributes

double [] bestVals
 
- Protected Attributes inherited from Searcher
Discrepancy disc
 
PointSet lat
 
double [] gamma
 
double bestVal
 
int [] bestAs
 
boolean primeN = false
 
boolean power2F = false
 

Additional Inherited Members

- Protected Member Functions inherited from Searcher
void print (int[] y, int s)
 
- Static Protected Attributes inherited from Searcher
static RandomStream gen = new LFSR113()
 

Detailed Description

This class implements searches to find the best rank-1 lattices with respect to a given discrepancy, using component-by-component (CBC) searches, random or exhaustive for each component.

That is, one searches for the best lattice by varying only one component at a time for each dimension. Once the best component has been found for a given dimension, then this value is fixed and we pass to the search for the next component.

The discrepancy object in the SearcherCBC constructor must fix the number of points \(n\), the maximal dimension \(s\) of the lattice and possibly, the weight factors \(\gamma_j\). Then the search program will examine different lattices with \(n\), \(s\) and \(\gamma_j\) fixed in order to find the best amongst those examined.

Constructor & Destructor Documentation

◆ SearcherCBC()

SearcherCBC ( Discrepancy  disc,
boolean  primeN 
)

The number of points \(n\), the dimension \(s\), and possibly the \(s\) weight factors \(\gamma_j\) must be given in disc.

The \(n\) points of the lattice will be generated in the search. The flag primeN indicates whether \(n\) is a prime number (true) or not (false). This is used in the *Prime methods.

Member Function Documentation

◆ exhaust()

double exhaust ( int  s)

Exhaustive CBC search to find the lattice with the best (the smallest) discrepancy in dimension \(s\).

The search runs over all values \( a_j = 1, 2, …, (n-1)\) for a given dimension \(j\). Once the best lattice has been found in dimension \(j\), that coefficient \(a_j\) is fixed and the search runs over all values of \(a_{j+1}\) for the next dimension. The first component \(a_0\) is always set to 1. The method returns the best value of the discrepancy in dimension \(s\).

◆ getBestVals()

double [] getBestVals ( )

Returns the best value of the discrepancy found in the last search, in each dimension up to \(s\).

The values returned are \(V_j\), for \(j = 0, 1, …, (s-1)\).

◆ random()

double random ( int  s,
int  k 
)

Random CBC search to find the lattice with the best (the smallest) discrepancy in dimension \(s\).

\(k\) random values \(a_j\) are examined for each dimension \(j\). Each random component \(a_j\) takes values over the integers \(1, 2, …, (n-1)\). The first component \(a_0\) is always set to 1. The method returns the best value of the discrepancy in dimension \(s\).


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