Class ShiftedRV

    • Constructor Detail

      • ShiftedRV

        public ShiftedRV​(double shift,
                         RVariableIfc rv)
        Uses a stream from the default stream factory
        Parameters:
        shift - a non-negative value
        rv - the random variable to shift
      • ShiftedRV

        public ShiftedRV​(double shift,
                         RVariableIfc rv,
                         int streamNum)
        Parameters:
        shift - a non-negative value
        rv - the random variable to shift
        streamNum - the stream number
      • ShiftedRV

        public ShiftedRV​(double shift,
                         RVariableIfc rv,
                         RNStreamIfc rng)
        Parameters:
        shift - a non-negative value
        rv - the random variable to shift
        rng - the generator to use
    • Method Detail

      • generate

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

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