|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.hups.PointSet umontreal.iro.lecuyer.hups.Rank1Lattice
public class Rank1Lattice
This class implements point sets specified by integration lattices of rank 1. They are defined as follows. One selects an arbitrary positive integer n and a s-dimensional integer vector (a0,..., as-1). [Usually, a0 = 1 and 0 <= aj < n for each j; when the aj are outside the interval [0, n), then we replace aj by ( aj mod n) in all calculations.] The points are defined by
Constructor Summary | |
---|---|
Rank1Lattice(int n,
int[] a,
int s)
Instantiates a Rank1Lattice with n points and lattice
vector a of dimension s. |
Method Summary | |
---|---|
void |
addRandomShift(int d1,
int d2,
RandomStream stream)
Adds a random shift to all the points of the point set, using stream stream to generate the random numbers. |
void |
clearRandomShift()
Clears the random shift. |
int[] |
getAs()
Returns the generator aj of the lattice. |
double |
getCoordinate(int i,
int j)
Returns ui, j, the coordinate j of the point i. |
PointSetIterator |
iterator()
Constructs and returns a point set iterator. |
void |
setNumPoints(int n)
Resets the number of points of the lattice to n. |
String |
toString()
Formats a string that contains information about the point set. |
Methods inherited from class umontreal.iro.lecuyer.hups.PointSet |
---|
addRandomShift, addRandomShift, addRandomShift, formatPoints, formatPoints, formatPoints, formatPoints, formatPointsBase, formatPointsBase, formatPointsBase, formatPointsBase, formatPointsNumbered, formatPointsNumbered, getDimension, getNumPoints, getStream, randomize, randomize, randomize, randomize, randomize, setStream, unrandomize |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Rank1Lattice(int n, int[] a, int s)
Rank1Lattice
with n points and lattice
vector a of dimension s.
n
- there are n pointsa
- the lattice vectors
- dimension of the lattice vector aMethod Detail |
---|
public void setNumPoints(int n)
public int[] getAs()
public void addRandomShift(int d1, int d2, RandomStream stream)
addRandomShift
in class PointSet
d1
- lower dimension of shiftd2
- upper dimension of shift is d2 - 1stream
- random number stream used to generate uniformspublic void clearRandomShift()
clearRandomShift
in class PointSet
public String toString()
PointSet
toString
in class PointSet
public double getCoordinate(int i, int j)
PointSet
getCoordinate
in class PointSet
i
- index of the point to look forj
- index of the coordinate to look for
public PointSetIterator iterator()
PointSet
getCoordinate
(i,j) to iterate over the
points and coordinates, but subclasses can reimplement it
for better efficiency.
iterator
in class PointSet
|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |