Class PoissonGenerator

Object
org.apache.spark.mllib.random.PoissonGenerator
All Implemented Interfaces:
Serializable, RandomDataGenerator<Object>, Pseudorandom, scala.Serializable

public class PoissonGenerator extends Object implements RandomDataGenerator<Object>
Generates i.i.d. samples from the Poisson distribution with the given mean.

param: mean mean for the Poisson distribution.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    PoissonGenerator(double mean)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a copy of the RandomDataGenerator with a new instance of the rng object used in the class when applicable for non-locking concurrent usage.
    double
     
    double
    Returns an i.i.d. sample as a generic type from an underlying distribution.
    void
    setSeed(long seed)
    Set random seed.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PoissonGenerator

      public PoissonGenerator(double mean)
  • Method Details

    • copy

      public PoissonGenerator copy()
      Description copied from interface: RandomDataGenerator
      Returns a copy of the RandomDataGenerator with a new instance of the rng object used in the class when applicable for non-locking concurrent usage.
      Specified by:
      copy in interface RandomDataGenerator<Object>
      Returns:
      (undocumented)
    • mean

      public double mean()
    • nextValue

      public double nextValue()
      Description copied from interface: RandomDataGenerator
      Returns an i.i.d. sample as a generic type from an underlying distribution.
      Specified by:
      nextValue in interface RandomDataGenerator<Object>
      Returns:
      (undocumented)
    • setSeed

      public void setSeed(long seed)
      Description copied from interface: Pseudorandom
      Set random seed.
      Specified by:
      setSeed in interface Pseudorandom