Class DistDiscreteConstant

    • Constructor Detail

      • DistDiscreteConstant

        public DistDiscreteConstant​(StreamInterface stream,
                                    long constant)
        creates a new discrete constant distribution.
        Parameters:
        stream - StreamInterface; the random number stream
        constant - long; the value for this distribution
    • 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.
      • getConstant

        public long getConstant()
        Return the constant.
        Returns:
        double; the constant