Class DistPoisson

    • Constructor Detail

      • DistPoisson

        public DistPoisson​(StreamInterface stream,
                           double lambda)
        constructs a new Poisson distribution.
        Parameters:
        stream - StreamInterface; the random number stream
        lambda - double; the lambda parameter
        Throws:
        IllegalArgumentException - when lambda <= 0
    • Method Detail

      • draw

        public long draw()
        draws the next long from the stream.
        Specified by:
        draw in class DistDiscrete
        Returns:
        long
      • probability

        public double probability​(long observation)
        returns the probability of the observation in this particular distribution.
        Specified by:
        probability in class DistDiscrete
        Parameters:
        observation - long; the discrete observation.
        Returns:
        double the probability.
      • getLambda

        public double getLambda()
        Returns:
        lambda