SSJ
V. labo.

umontreal.iro.lecuyer.hups
Class LatinHypercube

java.lang.Object
  extended by umontreal.iro.lecuyer.hups.PointSet
      extended by umontreal.iro.lecuyer.hups.CachedPointSet
          extended by umontreal.iro.lecuyer.hups.LatinHypercube

public class LatinHypercube
extends CachedPointSet

LatinHypercube

Implements Latin Hypercube Sampling (LHS) with n points in the s-dimensional unit hypercube. Each axis of the hypercube is divided into n intervals of length 1/n. The randomized point set has the property that for each coordinate j, there is exactly one point with coordinate j in each interval on length 1/n.

To generate the points, for each coordinate j we generate a random permutation πj of the n intervals. Then, for point i, we generate coordinate j randomly uniformly in the interval number πj(i). The points are enumerated by order of their first coordinate.


Constructor Summary
LatinHypercube(int n, int dim)
          .
 
Method Summary
 void addRandomShift(int fromDim, int toDim, RandomStream stream)
          .
 void randomize(PointSetRandomization rand)
          .
 void randomize(RandomStream stream)
          .
 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, getDimension, getNumPoints, getStream, iterator, randomize, randomize, randomize, setStream, unrandomize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LatinHypercube

public LatinHypercube(int n,
                      int dim)
. \begin{tabb}
 Constructs the structure for a Latin hypercube with \texttt{n} points in {\tt dim} dimensions.
 \end{tabb}
nnumber of points dimdimension of the points set

Method Detail

randomize

public void randomize(RandomStream stream)
. \begin{tabb}
 This randomization generates a random LHS point set. The points ar...
 ...
 The LHS points are defined only after this method has been called.
 \end{tabb}
streamRandom stream to generate the permutations and the random points in the intervals

Overrides:
randomize in class PointSet

addRandomShift

public void addRandomShift(int fromDim,
                           int toDim,
                           RandomStream stream)
. \begin{tabb}
 Random shifts and partial randomizations are irrelevant here, so t...
 ...e parameters \texttt{fromDim} and \texttt{toDim} are \emph{not used}.
 \end{tabb}

Overrides:
addRandomShift in class CachedPointSet

randomize

public void randomize(PointSetRandomization rand)
. \begin{tabb}
 Randomizes the points using LHS, regardless of what \texttt{rand} is.
 Equivalent to \texttt{randomize (rand.getStream)}.
 \end{tabb}

Overrides:
randomize in class CachedPointSet

toString

public String toString()
Description copied from class: PointSet
. \begin{tabb}
 Formats a string that contains information about the point set.
 \end{tabb}
string representation of the point set information

Overrides:
toString in class CachedPointSet

SSJ
V. labo.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.