| 
 | SSJ V. 2.6.2. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectumontreal.iro.lecuyer.hups.PointSet
umontreal.iro.lecuyer.hups.DigitalNet
umontreal.iro.lecuyer.hups.DigitalNetBase2
public class DigitalNetBase2
A special case of DigitalNet for the base b = 2.
 The implementation exploit the binary nature of
 computers and is much more efficient than for the general case.
 Binary expansions are easy to obtain because the computer already
 uses them internally.
 The generator matrices 
 Cj are stored in a large array of size sk.
 The c-th column of 
 Cj, for 
 c = 0,..., k - 1,
 is stored at position jk + c of that array, as a 32-bit integer.
 For all derived classes, the above 32-bit integer must be of the form
         
 [00 ... C0C1 ... Cr-1].
 The value of k cannot exceed 31 (32 is not allowed because Java does
 not have 32-bit unsigned integers). The value of w is always 31.
 
 
 The random digital shift in base 2 corresponds to a random XOR.
 It can be applied via the method addRandomShift.
| Constructor Summary | |
|---|---|
| DigitalNetBase2() | |
| Method Summary | |
|---|---|
|  void | addRandomShift(int d1,
               int d2,
               RandomStream stream)Adds a random digital shift to all the points of the point set, using stream stream to generate the random numbers. | 
|  void | addRandomShift(RandomStream stream)Same as addRandomShift(0, dim, stream),
   where dim is the dimension of the digital net. | 
|  void | clearRandomShift()Erases the current random shift, if any. | 
|  double | getCoordinate(int i,
              int j)Returns ui, j, the coordinate j of the point i. | 
|  double | getCoordinateNoGray(int i,
                    int j)Returns ui, j, the coordinate j of point i, the points being enumerated in the standard order (no Gray code). | 
|  void | iBinomialMatrixScramble(RandomStream stream)Applies the i-binomial matrix scramble proposed by Tezuka . | 
|  void | iBinomialMatrixScrambleFaurePermut(RandomStream stream,
                                   int sb)Similar to iBinomialMatrixScrambleexcept that the diagonal
    elements of each matrix 
 Mj are chosen as inleftMatrixScrambleFaurePermut. | 
|  void | iBinomialMatrixScrambleFaurePermutAll(RandomStream stream,
                                      int sb)Similar to iBinomialMatrixScrambleFaurePermutexcept that the
    elements under the diagonal are also
    chosen from the same restricted set as the diagonal elements. | 
|  void | iBinomialMatrixScrambleFaurePermutDiag(RandomStream stream,
                                       int sb)Similar to iBinomialMatrixScrambleFaurePermutexcept that all the
    off-diagonal elements are 0. | 
|  PointSetIterator | iterator()Constructs and returns a point set iterator. | 
|  PointSetIterator | iteratorNoGray()This iterator does not use the Gray code. | 
|  void | leftMatrixScramble(RandomStream stream)Applies a linear scramble by multiplying each Cj on the left by a w×w nonsingular lower-triangular matrix Mj, as suggested by Matoušek and implemented by Hong and Hickernell. | 
|  void | leftMatrixScrambleDiag(RandomStream stream)Similar to leftMatrixScrambleexcept that all the
    off-diagonal elements of the 
 Mj are 0. | 
|  void | leftMatrixScrambleFaurePermut(RandomStream stream,
                              int sb)Similar to leftMatrixScrambleexcept that the diagonal elements
    of each matrix 
 Mj are chosen from a restricted set of the best
    integers as calculated by Faure. | 
|  void | leftMatrixScrambleFaurePermutAll(RandomStream stream,
                                 int sb)Similar to leftMatrixScrambleFaurePermutexcept that the
    elements under the diagonal are also
    chosen from the same restricted set as the diagonal elements. | 
|  void | leftMatrixScrambleFaurePermutDiag(RandomStream stream,
                                  int sb)Similar to leftMatrixScrambleFaurePermutexcept that all
    off-diagonal elements are 0. | 
|  void | printGeneratorMatrices(int s)Prints the generator matrices as bit matrices in standard form for dimensions 1 to s. | 
|  void | printGeneratorMatricesTrans(int s)Prints the generator matrices transposed in the form of integers for dimensions 1 to s. | 
|  void | rightMatrixScramble(RandomStream stream)Applies a linear scramble by multiplying each Cj on the right by a single k×k nonsingular upper-triangular matrix M, as suggested by Faure and Tezuka. | 
|  void | stripedMatrixScramble(RandomStream stream)Applies the striped matrix scramble proposed by Owen. | 
|  void | stripedMatrixScrambleFaurePermutAll(RandomStream stream,
                                    int sb)Similar to stripedMatrixScrambleexcept that the
    elements on and under the diagonal of each matrix 
 Mj are
    chosen as inleftMatrixScrambleFaurePermut. | 
|  String | toString()Formats a string that contains information about the point set. | 
| Methods inherited from class umontreal.iro.lecuyer.hups.DigitalNet | 
|---|
| eraseOriginalGeneratorMatrices, resetGeneratorMatrices, unrandomize | 
| Methods inherited from class umontreal.iro.lecuyer.hups.PointSet | 
|---|
| addRandomShift, addRandomShift, formatPoints, formatPoints, formatPoints, formatPoints, formatPointsBase, formatPointsBase, formatPointsBase, formatPointsBase, formatPointsNumbered, formatPointsNumbered, getDimension, getNumPoints, getStream, randomize, randomize, randomize, randomize, randomize, setStream | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public DigitalNetBase2()
| Method Detail | 
|---|
public void printGeneratorMatrices(int s)
printGeneratorMatrices in class DigitalNetpublic void printGeneratorMatricesTrans(int s)
public double getCoordinate(int i,
                            int j)
PointSet
getCoordinate in class DigitalNeti - index of the point to look forj - index of the coordinate to look for
public double getCoordinateNoGray(int i,
                                  int j)
DigitalNet
getCoordinateNoGray in class DigitalNeti - point indexj - coordinate index
public PointSetIterator iterator()
PointSetgetCoordinate (i,j) to iterate over the
  points and coordinates, but subclasses can reimplement it
  for better efficiency.
iterator in class DigitalNetpublic PointSetIterator iteratorNoGray()
iteratorNoGray in class DigitalNetpublic String toString()
PointSet
toString in class DigitalNetpublic void clearRandomShift()
PointSet
clearRandomShift in class DigitalNetpublic void addRandomShift(RandomStream stream)
DigitalNetaddRandomShift(0, dim, stream),
   where dim is the dimension of the digital net.
addRandomShift in class DigitalNetstream - random number stream used to generate uniforms
public void addRandomShift(int d1,
                           int d2,
                           RandomStream stream)
DigitalNet
addRandomShift in class DigitalNetstream - random number stream used to generate uniformspublic void leftMatrixScramble(RandomStream stream)
DigitalNet
leftMatrixScramble in class DigitalNetstream - random number stream used to generate the randomnesspublic void iBinomialMatrixScramble(RandomStream stream)
DigitalNetleftMatrixScramble, but with the additional constraint that
    all entries on any given diagonal or subdiagonal of 
 Mj are identical.
iBinomialMatrixScramble in class DigitalNetstream - random number stream used as generator of the randomnesspublic void stripedMatrixScramble(RandomStream stream)
DigitalNetleftMatrixScramble, but with the additional constraint that
    in any column, all entries below the diagonal are equal to the
    diagonal entry, which is generated randomly over 
 {1,..., b - 1}.
    Note that for b = 2, the matrices 
 Mj become deterministic, with
    all entries on and below the diagonal equal to 1.
stripedMatrixScramble in class DigitalNetstream - random number stream used as generator of the randomnesspublic void rightMatrixScramble(RandomStream stream)
DigitalNet
rightMatrixScramble in class DigitalNetstream - random number stream used as generator of the randomnesspublic void leftMatrixScrambleDiag(RandomStream stream)
DigitalNetleftMatrixScramble except that all the
    off-diagonal elements of the 
 Mj are 0.
leftMatrixScrambleDiag in class DigitalNetstream - random number stream used to generate the randomness
public void leftMatrixScrambleFaurePermut(RandomStream stream,
                                          int sb)
DigitalNetleftMatrixScramble except that the diagonal elements
    of each matrix 
 Mj are chosen from a restricted set of the best
    integers as calculated by Faure. They are generated
    uniformly over the first sb elements of array F, where F is
    made up of a permutation of the integers 
 [1..(b - 1)]. These integers are
    sorted by increasing  order of the upper bounds of the extreme discrepancy
    for the given integer.
leftMatrixScrambleFaurePermut in class DigitalNetstream - random number stream used to generate the randomnesssb - Only the first sb elements of F are used
public void leftMatrixScrambleFaurePermutDiag(RandomStream stream,
                                              int sb)
DigitalNetleftMatrixScrambleFaurePermut except that all
    off-diagonal elements are 0.
leftMatrixScrambleFaurePermutDiag in class DigitalNetstream - random number stream used to generate the randomnesssb - Only the first sb elements of F are used
public void leftMatrixScrambleFaurePermutAll(RandomStream stream,
                                             int sb)
DigitalNetleftMatrixScrambleFaurePermut except that the
    elements under the diagonal are also
    chosen from the same restricted set as the diagonal elements.
leftMatrixScrambleFaurePermutAll in class DigitalNetstream - random number stream used to generate the randomnesssb - Only the first sb elements of F are used
public void iBinomialMatrixScrambleFaurePermut(RandomStream stream,
                                               int sb)
DigitalNetiBinomialMatrixScramble except that the diagonal
    elements of each matrix 
 Mj are chosen as in
   leftMatrixScrambleFaurePermut.
iBinomialMatrixScrambleFaurePermut in class DigitalNetstream - random number stream used to generate the randomnesssb - Only the first sb elements of F are used
public void iBinomialMatrixScrambleFaurePermutDiag(RandomStream stream,
                                                   int sb)
DigitalNetiBinomialMatrixScrambleFaurePermut except that all the
    off-diagonal elements are 0.
iBinomialMatrixScrambleFaurePermutDiag in class DigitalNetstream - random number stream used to generate the randomnesssb - Only the first sb elements of F are used
public void iBinomialMatrixScrambleFaurePermutAll(RandomStream stream,
                                                  int sb)
DigitalNetiBinomialMatrixScrambleFaurePermut except that the
    elements under the diagonal are also
    chosen from the same restricted set as the diagonal elements.
iBinomialMatrixScrambleFaurePermutAll in class DigitalNetstream - random number stream used to generate the randomnesssb - Only the first sb elements of F are used
public void stripedMatrixScrambleFaurePermutAll(RandomStream stream,
                                                int sb)
DigitalNetstripedMatrixScramble except that the
    elements on and under the diagonal of each matrix 
 Mj are
    chosen as in leftMatrixScrambleFaurePermut.
stripedMatrixScrambleFaurePermutAll in class DigitalNetstream - random number stream used as generator of the randomnesssb - Only the first sb elements of F are used| 
 | SSJ V. 2.6.2. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||