|
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.PointSet
umontreal.iro.lecuyer.hups.CachedPointSet
umontreal.iro.lecuyer.hups.SortedPointSet
public class SortedPointSet
SortedPointSet
Cette classe est trop particulière au problème d'Adam pour être incluse dans le HUPS public. Ne pas la recopier pour distribution hors du labo. We can eliminate this class, indeed, because it is much too specific. The CachedPointSet class now offers methods for multi-dimensional sort and for skipping coordinates.
This container class builds a sorted point set based on some given original point set. Both point sets may have the same number of points, but the dimension of the sorted point set is smaller than the dimension of the original point set. Some of the coordinates of the original point set are used for sorting the points according to a umontreal.iro.lecuyer.utilMultiDimSort, and the remaining coordinates define the sorted point set, where the points are in the new sorted order.
If the original point set has dimension d0 and the MultiDimSort sorts in ds dimensions, then the sorted point set has dimension (d0 - ds). The MultiDimSort is applied on the first ds coordinates of the original point set and the remaining coordinates belong to the sorted point set.
When a SortedPointSet is randomized, the randomization is applied to the original point set, but the changes over the first ds coordinates are ignored, such that the point ordering between the original point set and the sorted point set is unchanged. The remaining randomized coordinates of the original used become the new values of the SortedPointSet.
All points of a SortedPointSet are held in memory, which could be problematic for a large point set.
Constructor Summary | |
---|---|
SortedPointSet(PointSet P,
int n,
int dim,
MultiDimSort sort)
. |
|
SortedPointSet(PointSet P,
MultiDimSort sort)
. |
Method Summary | |
---|---|
void |
addRandomShift(int d1,
int d2,
RandomStream stream)
. |
int |
getDimension()
. |
MultiDimSort |
getSort()
. |
PointSetIterator |
iterator()
. |
void |
randomize(PointSetRandomization rand)
. |
String |
toString()
. |
Methods inherited from class umontreal.iro.lecuyer.hups.CachedPointSet |
---|
getCoordinate, sortByCoordinate, sortMultidimBatch, sortMultidimBatchSplit, stripCoordinates |
Methods inherited from class umontreal.iro.lecuyer.hups.PointSet |
---|
addRandomShift, addRandomShift, addRandomShift, clearRandomShift, formatPoints, formatPoints, formatPoints, formatPoints, formatPointsBase, formatPointsBase, formatPointsBase, formatPointsBase, formatPointsNumbered, formatPointsNumbered, getNumPoints, getStream, randomize, randomize, randomize, randomize, setStream, unrandomize |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SortedPointSet(PointSet P, int n, int dim, MultiDimSort sort)
public SortedPointSet(PointSet P, MultiDimSort sort)
Method Detail |
---|
public int getDimension()
getDimension
in class PointSet
public MultiDimSort getSort()
public PointSetIterator iterator()
iterator
in class PointSet
public void addRandomShift(int d1, int d2, RandomStream stream)
addRandomShift
in class CachedPointSet
public void randomize(PointSetRandomization rand)
randomize
in class CachedPointSet
public String toString()
toString
in class CachedPointSet
|
SSJ V. labo. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |