|
SSJ V. labo. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.hups.RadicalInverse
public class RadicalInverse
RadicalInverse
This class implements basic methods for working with radical inverses of integers in an arbitrary basis b. These methods are used in classes that implement point sets and sequences based on the van der Corput sequence (the Hammersley nets and the Halton sequence, for example).
We recall that for a k-digit integer i whose digital b-ary expansion is
Note that ψb(i) cannot always be represented exactly as a floating-point number on the computer (e.g., if b is not a power of two). For an exact representation, one can use the integer
It is common practice to permute locally the values of the van der Corput sequence. One way of doing this is to apply a permutation to the digits of i before computing ψb(i). That is, for a permutation π of the digits {0,..., b - 1},
The permutation π can be deterministic or random. One (deterministic)
possibility implemented here is the Faure permutation σb of
{0,..., b - 1} defined as follows[#!rFAU92a!#].
For b = 2, take
σ = I, the identical permutation. For even
b = 2c > 2, take
σ[i] | = | 2τ[i] i = 0, 1,…, c - 1 | |
σ[i + c] | = | 2τ[i] + 1 i = 0, 1,…, c - 1 |
σ[c] | = | c | |
σ[i] | = | τ[i], if 0≤τ[i] < c | |
σ[i] | = | τ[i] + 1, if c≤τ[i] < 2c |
σ[i] | = | τ[i - 1], if 0≤τ[i - 1] < c | |
σ[i] | = | τ[i - 1] + 1, if c≤τ[i - 1] < 2c |
Constructor Summary | |
---|---|
RadicalInverse(int b,
double x0)
. |
Method Summary | |
---|---|
static void |
getFaureLemieuxPermutation(int coordinate,
int[] pi)
. |
static void |
getFaurePermutation(int b,
int[] pi)
. |
static int[] |
getPrimes(int n)
. |
static int |
integerRadicalInverse(int b,
int i)
. |
double |
nextRadicalInverse()
. |
static double |
nextRadicalInverse(double invb,
double x)
. |
static int |
nextRadicalInverseDigits(int b,
int k,
int[] idigits)
. |
static double |
permutedRadicalInverse(int b,
int[] pi,
long i)
. |
static double |
radicalInverse(int b,
long i)
. |
static int |
radicalInverseInteger(int b,
double x)
. |
static long |
radicalInverseLong(int b,
double x)
[tabb86] bbase used for the operation xthe value for which the radical inverse will be computed the radical inverse of x in base b |
static void |
reverseDigits(int k,
int[] bdigits,
int[] idigits)
. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RadicalInverse(int b, double x0)
Method Detail |
---|
public static int[] getPrimes(int n)
public static double radicalInverse(int b, long i)
public static int radicalInverseInteger(int b, double x)
public static long radicalInverseLong(int b, double x)
public static double nextRadicalInverse(double invb, double x)
public double nextRadicalInverse()
public static void reverseDigits(int k, int[] bdigits, int[] idigits)
public static int integerRadicalInverse(int b, int i)
public static int nextRadicalInverseDigits(int b, int k, int[] idigits)
public static void getFaureLemieuxPermutation(int coordinate, int[] pi)
public static void getFaurePermutation(int b, int[] pi)
public static double permutedRadicalInverse(int b, int[] pi, long i)
|
SSJ V. labo. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |