Package org.sunflow.math
Class QMC
java.lang.Object
org.sunflow.math.QMC
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic final int
fibonacci
(int k) static final double
fibonacciLattice
(int k, int i, int d) static final int
getFibonacciRank
(int n) static final double
halton
(int d, int i) static final double
korobovLattice
(int m, int i, int d) static final double
mod1
(double x) Compute mod(x,1), assuming that x is positive or 0.static final double
reducedCPRotation
(int k, int d, double x0, double x1) static double
riLP
(int i, int r) static double
riS
(int i, int r) static double
riVDC
(int bits, int r) static final int
sigma
(int i, int order) Compute sigma function used to seed QMC sequence trees.
-
Field Details
-
MAX_SIGMA_ORDER
public static final int MAX_SIGMA_ORDER- See Also:
-
-
Method Details
-
riVDC
public static double riVDC(int bits, int r) -
riS
public static double riS(int i, int r) -
riLP
public static double riLP(int i, int r) -
halton
public static final double halton(int d, int i) -
mod1
public static final double mod1(double x) Compute mod(x,1), assuming that x is positive or 0.- Parameters:
x
- any number >= 0- Returns:
- mod(x,1)
-
sigma
public static final int sigma(int i, int order) Compute sigma function used to seed QMC sequence trees. The sigma table is exactly 2^order elements long, and therefore i should be in the: [0, 2^order) interval. This function is equal to 2^order*halton(0,i)- Parameters:
i
- indexorder
-- Returns:
- sigma function
-
getFibonacciRank
public static final int getFibonacciRank(int n) -
fibonacci
public static final int fibonacci(int k) -
fibonacciLattice
public static final double fibonacciLattice(int k, int i, int d) -
reducedCPRotation
public static final double reducedCPRotation(int k, int d, double x0, double x1) -
korobovLattice
public static final double korobovLattice(int m, int i, int d)
-