Class Solver_ssj.ShiftedGeometricGen

java.lang.Object
umontreal.ssj.randvar.RandomVariateGen
jline.solvers.ldes.handlers.Solver_ssj.ShiftedGeometricGen
Enclosing class:
Solver_ssj

public static class Solver_ssj.ShiftedGeometricGen extends umontreal.ssj.randvar.RandomVariateGen
Random variate generator for a geometric distribution supported on {1,2,...}, i.e. the trial index of the first success.

SSJ's GeometricGen counts failures and is therefore supported on {0,1,...}, which is one slot short of Geometric and admits zero-length intervals. Shifting by one restores both the support and the moments: mean 1/p and SCV 1-p.

  • Field Summary

    Fields inherited from class umontreal.ssj.randvar.RandomVariateGen

    dist, stream
  • Constructor Summary

    Constructors
    Constructor
    Description
    ShiftedGeometricGen(umontreal.ssj.rng.RandomStream stream, double p)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
     

    Methods inherited from class umontreal.ssj.randvar.RandomVariateGen

    getDistribution, getStream, nextArrayOfDouble, nextArrayOfDouble, setStream, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ShiftedGeometricGen

      public ShiftedGeometricGen(umontreal.ssj.rng.RandomStream stream, double p)
  • Method Details

    • nextDouble

      public double nextDouble()
      Overrides:
      nextDouble in class umontreal.ssj.randvar.RandomVariateGen