SSJ
V. labo.

umontreal.iro.lecuyer.discrepancy
Class SearcherCBC

java.lang.Object
  extended by umontreal.iro.lecuyer.discrepancy.Searcher
      extended by umontreal.iro.lecuyer.discrepancy.SearcherCBC

public class SearcherCBC
extends Searcher

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 γj. Then the search program will examine different lattices with n, s and γj fixed in order to find the best amongst those examined.


Constructor Summary
SearcherCBC(Discrepancy disc, boolean primeN)
          The number of points n, the dimension s, and possibly the s weight factors γj must be given in disc.
 
Method Summary
 double exhaust(int s)
          Exhaustive CBC search to find the lattice with the best (the smallest) discrepancy in dimension s.
 double exhaustPrime(int s)
          Similar to exhaust(s), except that only values of aj 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.
 double random(int s, int k)
          Random CBC search to find the lattice with the best (the smallest) discrepancy in dimension s.
 double randomPrime(int s, int k)
          Similar to random(s, k), except that only values of aj relatively prime to n are considered.
 
Methods inherited from class umontreal.iro.lecuyer.discrepancy.Searcher
getBestAs, getBestVal, initGen
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearcherCBC

public SearcherCBC(Discrepancy disc,
                   boolean primeN)
The number of points n, the dimension s, and possibly the s weight factors γ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.

Method Detail

exhaust

public 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 aj = 1, 2,…,(n - 1) for a given dimension j. Once the best lattice has been found in dimension j, that coefficient aj is fixed and the search runs over all values of aj+1 for the next dimension. The first component a0 is always set to 1. The method returns the best value of the discrepancy in dimension s.

Overrides:
exhaust in class Searcher

exhaustPrime

public double exhaustPrime(int s)
Similar to exhaust(s), except that only values of aj relatively prime to n are considered.

Overrides:
exhaustPrime in class Searcher

random

public 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 aj are examined for each dimension j. Each random component aj takes values over the integers 1, 2,…,(n - 1). The first component a0 is always set to 1. The method returns the best value of the discrepancy in dimension s.

Overrides:
random in class Searcher

randomPrime

public double randomPrime(int s,
                          int k)
Similar to random(s, k), except that only values of aj relatively prime to n are considered.

Overrides:
randomPrime in class Searcher

getBestVals

public double[] getBestVals()
Returns the best value of the discrepancy found in the last search, in each dimension up to s. The values returned are Vj, for j = 0, 1,…,(s - 1).


SSJ
V. labo.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.