Overview | Package | Class | Tree | Deprecated | Index | Help
| SSJ V. 2.1.1.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## umontreal.iro.lecuyer.hups
Class HaltonSequence

    java.lang.Object
      umontreal.iro.lecuyer.hups.PointSet
          umontreal.iro.lecuyer.hups.HaltonSequence

    public class HaltonSequence

extends PointSet

This class implements the sequence of Halton, which is essentially a modification of Hammersley nets for producing an infinite sequence of points having low discrepancy. The ith point in s dimensions is

i = (ψb1(i), ψb2(i),..., ψbs(i)),

for i = 0, 1, 2,..., where ψb is the radical inverse function in base b, defined in class `RadicalInverse`, and where 2 = b1 < ... < bs are the s smallest prime numbers in increasing order.

A fast method is implemented to generate randomized Halton sequences, starting from an arbitrary points x0.

The points can be ``scrambled'' by applying a permutation to the digits of i before computing each coordinate, in the same way as for the class `HammersleyPointSet`, for all coordinates j >= 0.

Constructor Summary
`HaltonSequence(int dim)` Constructs a new Halton sequence in `dim` dimensions.

Method Summary
`void` | `addFaurePermutations()` Permutes the digits using Faure permutations for all coordinates.
`void` | `ErasePermutations()` Erases the Faure permutations: from now on, the digits will not be Faure permuted.
`double` | `getCoordinate(int i, int j)` Returns ui, j, the coordinate j of the point i.
`int` | `getNumPoints()` Returns the number of points.
`void` | `init(double[] x0)` Initializes the Halton sequence starting at point `x0`.

Methods inherited from class umontreal.iro.lecuyer.hups.PointSet
`addRandomShift, addRandomShift, addRandomShift, addRandomShift, clearRandomShift, formatPoints, formatPoints, getDimension, getStream, iterator, randomize, randomize, randomize, randomize, randomize, setStream, toString, unrandomize`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### HaltonSequence

    public HaltonSequence(int dim)

  Constructs a new Halton sequence in `dim` dimensions.

  Parameters:
    `dim` - dimension

Method Detail

### init

    public void init(double[] x0)

  Initializes the Halton sequence starting at point `x0`. The dimension of `x0` must be at least as large as the dimension of this object.

  Parameters:
    `x0` - starting point of the Halton sequence

### addFaurePermutations

    public void addFaurePermutations()

  Permutes the digits using Faure permutations for all coordinates. After the method is called, the coordinates ui, j are generated via

  ui, j = ∑r=0k-1πj[ar]bj-r-1,

  for j = 0,..., s - 1, where πj is the Faure permutation of {0,..., bj -1}.

### ErasePermutations

    public void ErasePermutations()

  Erases the Faure permutations: from now on, the digits will not be Faure permuted.

### getNumPoints

    public int getNumPoints()

  Description copied from class: `PointSet`
  Returns the number of points. If this number is actually infinite, `Integer.MAX_VALUE` is returned.

  Overrides:
    `getNumPoints` in class `PointSet`
  Returns:
    the number of points in the point set or `Integer.MAX_VALUE` if the point set has an infinity of points.

### getCoordinate

    public double getCoordinate(int i,
                                int j)

  Description copied from class: `PointSet`
  Returns ui, j, the coordinate j of the point i.

  Specified by:
    `getCoordinate` in class `PointSet`
  Parameters:
    `i` - index of the point to look for
    `j` - index of the coordinate to look for
  Returns:
    the value of ui, j

Overview | Package | Class | Tree | Deprecated | Index | Help
| SSJ V. 2.1.1.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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