Overview | Package | Class | Tree | Deprecated | Index | Help
| SSJ V. 2.1.1.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## umontreal.iro.lecuyer.hups
Class CachedPointSet

    java.lang.Object
      umontreal.iro.lecuyer.hups.PointSet
          umontreal.iro.lecuyer.hups.CachedPointSet

    public class CachedPointSet

extends PointSet

This container class caches a point set by precomputing and storing its points locally in an array. This can be used to speed up computations when using a small low-dimensional point set more than once.

Constructor Summary
`CachedPointSet(PointSet P)` Creates a new `PointSet` object that contains an array storing the points of `P`.
`CachedPointSet(PointSet P, int n, int dim)` Creates a new `PointSet` object that contains an array storing the first `dim` coordinates of the first `n` points of `P`.

Method Summary
`double` | `getCoordinate(int i, int j)` Returns ui, j, the coordinate j of the point i.
`void` | `randomize(PointSetRandomization rand)` Randomizes the underlying point set using `rand` and recaches the points.
`String` | `toString()` Formats a string that contains the information about the point set.

Methods inherited from class umontreal.iro.lecuyer.hups.PointSet
`addRandomShift, addRandomShift, addRandomShift, addRandomShift, clearRandomShift, formatPoints, formatPoints, getDimension, getNumPoints, getStream, iterator, randomize, randomize, randomize, randomize, setStream, unrandomize`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### CachedPointSet

    public CachedPointSet(PointSet P,
                          int n,
                          int dim)

  Creates a new `PointSet` object that contains an array storing the first `dim` coordinates of the first `n` points of `P`. The original point set `P` itself is not modified.

  Parameters:
    `P` - point set to be cached
    `n` - number of points
    `dim` - number of dimensions of the points

### CachedPointSet

    public CachedPointSet(PointSet P)

  Creates a new `PointSet` object that contains an array storing the points of `P`. The number of points and their dimension are the same as in the original point set. Both must be finite.

  Parameters:
    `P` - point set to be cached

Method Detail

### randomize

    public void randomize(PointSetRandomization rand)

  Randomizes the underlying point set using `rand` and recaches the points.

  Overrides:
    `randomize` in class `PointSet`
  Parameters:
    `rand` - `PointSetRandomization` to use

### toString

    public String toString()

  Description copied from class: `PointSet`
  Formats a string that contains the information about the point set.

  Overrides:
    `toString` in class `PointSet`
  Returns:
    string representation of the point set information

### getCoordinate

    public double getCoordinate(int i,
                                int j)

  Description copied from class: `PointSet`
  Returns ui, j, the coordinate j of the point i.

  Specified by:
    `getCoordinate` in class `PointSet`
  Parameters:
    `i` - index of the point to look for
    `j` - index of the coordinate to look for
  Returns:
    the value of ui, j

Overview | Package | Class | Tree | Deprecated | Index | Help
| SSJ V. 2.1.1.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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