Class MixtureRV

    • Constructor Detail

      • MixtureRV

        public MixtureRV​(java.util.List<RVariableIfc> list,
                         double[] cdf)
        Parameters:
        list - a list holding the random variables to select from
        cdf - the cumulative probability associated with each element of the list
      • MixtureRV

        public MixtureRV​(java.util.List<RVariableIfc> list,
                         double[] cdf,
                         int streamNum)
        Parameters:
        list - a list holding the random variables to select from
        cdf - the cumulative probability associated with each element of the list
        streamNum - the stream number
      • MixtureRV

        public MixtureRV​(java.util.List<RVariableIfc> list,
                         double[] cdf,
                         RNStreamIfc stream)
        Parameters:
        list - a list holding the random variables to select from
        cdf - the cumulative probability associated with each element of the list
        stream - the source of the randomness
        Throws:
        java.lang.NullPointerException - if stream is null
    • Method Detail

      • generate

        protected double generate()
        Specified by:
        generate in class AbstractRVariable
        Returns:
        the randomly generated variate
      • newInstance

        public MixtureRV newInstance​(RNStreamIfc rng)
        Parameters:
        rng - the RNStreamIfc to use
        Returns:
        a new instance with same parameter values