umontreal.iro.lecuyer.hups
Class HammersleyPointSet
- java.lang.Object
-
- umontreal.iro.lecuyer.hups.PointSet
-
- umontreal.iro.lecuyer.hups.HammersleyPointSet
-
public class HammersleyPointSet extends PointSet
This class implements Hammersley point sets, which are defined as follows. Let 2 = b1 < b2 < ... denote the sequence of all prime numbers by increasing order. The Hammersley point set with n points in s dimensions contains the pointsui = (i/n, ψb1(i), ψb2(i),..., ψbs-1(i)),for i = 0,..., n - 1, where ψb is the radical inverse function in base b, defined inRadicalInverse. This class is not a subclass ofDigitalNet, because the basis is not the same for all coordinates. We do obtain a net in a generalized sense if n = b1k1 = b2k2 = ... = bs-1ks-1 for some integers k1,..., ks-1.The points of a Hammersley point set can be ``scrambled'' by applying a permutation to the digits of i before computing each coordinate. If
i = a0 + a1bj + ... + akj-1bjkj-1,and πj is a permutation of the digits {0,..., bj -1}, thenψbj(i) = ∑r=0kj-1arbj-r-1is replaced byui, j = ∑r=0kj-1πj[ar]bj-r-1.The permutations πj can be deterministic or random. One (deterministic) possibility implemented here is to use the Faure permutation of {0,..., bj} for πj, for each coordinate j > 0.
-
-
Constructor Summary
Constructors Constructor and Description HammersleyPointSet(int n, int dim)Constructs a new Hammersley point set with n points in dim dimensions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddFaurePermutations()Permutes the digits using Faure permutations for all coordinates.voidErasePermutations()Erases the Faure permutations: from now on, the digits will not be Faure permuted.doublegetCoordinate(int i, int j)Returns ui, j, the coordinate j of the point i.-
Methods inherited from class umontreal.iro.lecuyer.hups.PointSet
addRandomShift, addRandomShift, addRandomShift, addRandomShift, clearRandomShift, formatPoints, formatPoints, formatPoints, formatPoints, formatPointsBase, formatPointsBase, formatPointsBase, formatPointsBase, formatPointsNumbered, formatPointsNumbered, getDimension, getNumPoints, getStream, iterator, randomize, randomize, randomize, randomize, randomize, setStream, toString, unrandomize
-
-
-
-
Constructor Detail
-
HammersleyPointSet
public HammersleyPointSet(int n, int dim)Constructs a new Hammersley point set with n points in dim dimensions.- Parameters:
n- number of pointsdim- dimension of the point set
-
-
Method Detail
-
addFaurePermutations
public void addFaurePermutations()
Permutes the digits using Faure permutations for all coordinates. After the method is called, the coordinates ui, j are generated viaui, j = ∑r=0k-1πj[ar]bj-r-1,for j = 1,..., s - 1 and ui, 0 = i/n, 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.
-
getCoordinate
public double getCoordinate(int i, int j)Description copied from class:PointSetReturns ui, j, the coordinate j of the point i.- Specified by:
getCoordinatein classPointSet- Parameters:
i- index of the point to look forj- index of the coordinate to look for- Returns:
- the value of ui, j
-
-
DMelt 3.0 © DataMelt by jWork.ORG