24package umontreal.ssj.hups;
26import umontreal.ssj.rng.RandomStream;
27import umontreal.ssj.util.PrintfFormat;
30import umontreal.ssj.util.multidimsort.MultiDimSort;
71 protected int[] index;
73 protected int numSortCoord;
94 numSortCoord = sort.dimension();
112 x[i][numSortCoord] = i;
116 index[(
int) x[i][numSortCoord]] = i;
159 P.addRandomShift(d1 + numSortCoord, d2 + numSortCoord, stream);
182 sb.append(P.toString());
184 return sb.toString();
This class implements a default point set iterator.
int curPointIndex
Index of the current point.
int curCoordIndex
Index of the current coordinate.
void outOfBounds()
Error message for index out of bounds.
This abstract class represents a general point set.
int numPoints
Number of points.
int getNumPoints()
Returns the number of points.
int getDimension()
Returns the dimension (number of available coordinates) of the points.
int dim
Dimension of the points.
void fillCacheByIndex(int fromDim, int dim)
Called by the constructors and also by \texttt{randomize}.
int[] makeIndex()
Sorts the cached points in x[][] according to the first cached coordinates (the dimension of the sort...
String toString()
Formats a string that contains the information about this point set.
SortedAndCutPointSet(PointSet p, MultiDimSort sort)
Takes the first dim coordinates of the first n points of p and creates a SortedAndCutPointSet from th...
PointSetIterator iterator()
Constructs and returns a point set iterator which gets the values directly from the array.
MultiDimSort getSort()
Returns the sort used.
void randomize(PointSetRandomization rand)
Randomizes the contained point (all coordinates) set using rand.
void addRandomShift(int d1, int d2, RandomStream stream)
Add the shift to the contained point set.
int getDimension()
Returns the number of coordinates of each point, which is the dimension of the original point set min...
This is the interface for iterators that permit one to go through the points of a PointSet and the su...
int nextPoint(double[] p, int fromDim, int d)
Returns in p the next d coordinates of the current point, starting at coordinate fromDim (i....
This interface is for a randomization that can be used to randomize a umontreal.ssj....
This interface defines the basic structures to handle multiple streams of uniform (pseudo)random numb...
This interface is meant to be implemented by certain multivariate sorting algorithms that sort object...