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

## umontreal.iro.lecuyer.randvar
Class RandomVariateGenWithShift

    java.lang.Object
      umontreal.iro.lecuyer.randvar.RandomVariateGen
          umontreal.iro.lecuyer.randvar.RandomVariateGenWithShift

    public class RandomVariateGenWithShift

extends RandomVariateGen

Random variate generator applying a shift to the generated values. This generator uses another random variate generator to generate variates. For each variate v, the `nextDouble()` method of this generator returns v - , where ∈ is a constant, user-defined shift.

Field Summary

Fields inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGen
`dist, stream`

Constructor Summary
`RandomVariateGenWithShift(RandomVariateGen gen, double shift)` Constructs a new random variate generator with underlying generator `gen`, and shift `shift`.

Method Summary
`Distribution` | `getDistribution()`
`RandomVariateGen` | `getRandomVariateGenerator()` Returns the random variate generator being used by this object.
`double` | `getShift()` Returns the current value of the shift .
`RandomStream` | `getStream()`
`double` | `nextDouble()`
`void` | `setShift(double shift)` Sets the current value of the shift to `shift`.
`void` | `setStream(RandomStream stream)`

Methods inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGen
`nextArrayOfDouble, toString`

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

Constructor Detail

### RandomVariateGenWithShift

    public RandomVariateGenWithShift(RandomVariateGen gen,
                                     double shift)

  Constructs a new random variate generator with underlying generator `gen`, and shift `shift`.

  Parameters:
    `gen` - the generator being used.
    `shift` - the shift .

Method Detail

### getShift

    public double getShift()

  Returns the current value of the shift .

  Returns:
    the current value of the shift.

### setShift

    public void setShift(double shift)

  Sets the current value of the shift to `shift`.

  Parameters:
    `shift` - the new value of the shift.

### getRandomVariateGenerator

    public RandomVariateGen getRandomVariateGenerator()

  Returns the random variate generator being used by this object.

  Returns:
    the associated random variate generator.

### getDistribution

    public Distribution getDistribution()

  Overrides:
    `getDistribution` in class `RandomVariateGen`

### getStream

    public RandomStream getStream()

  Overrides:
    `getStream` in class `RandomVariateGen`

### nextDouble

    public double nextDouble()

  Overrides:
    `nextDouble` in class `RandomVariateGen`

### setStream

    public void setStream(RandomStream stream)

  Overrides:
    `setStream` in class `RandomVariateGen`

Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
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 Richard Simard.