25package umontreal.ssj.hups;
27import umontreal.ssj.util.PrintfFormat;
50 private void initN(
int n,
int t) {
51 int a = (genA % n) + (genA < 0 ? n : 0);
53 long[] B =
new long[
dim];
56 for (j = 0; j < t; j++)
58 v[0] = B[0] * normFactor;
59 for (j = 1; j <
dim; j++) {
60 B[j] = (a * B[j - 1]) % n;
61 v[j] = normFactor * B[j];
88 throw new IllegalArgumentException(
"KorobovLattice: must have t >= 0");
115 sb.append(super.toString());
116 return sb.toString();
KorobovLattice(int n, int a, int s)
Instantiates a Korobov lattice point set with modulus and multiplier in dimension .
String toString()
Formats a string that contains information about the point set.
KorobovLattice(int n, int a, int s, int t)
Instantiates a shifted Korobov lattice point set with modulus.
int getA()
Returns the multiplier of the lattice.
void setNumPoints(int n)
Resets the number of points of the lattice to .
int dim
Dimension of the points.
Rank1Lattice(int n, int[] a, int s)
Instantiates a Rank1Lattice with points and lattice vector of dimension .