Class TruncatedRV

    • Field Detail

      • myLowerLimit

        protected final double myLowerLimit
      • myUpperLimit

        protected final double myUpperLimit
      • myCDFLL

        protected final double myCDFLL
      • myCDFUL

        protected final double myCDFUL
      • myFofLL

        protected final double myFofLL
      • myFofUL

        protected final double myFofUL
      • myDeltaFUFL

        protected final double myDeltaFUFL
    • Constructor Detail

      • TruncatedRV

        public TruncatedRV​(DistributionIfc distribution,
                           double cdfLL,
                           double cdfUL,
                           double truncLL,
                           double truncUL)
        Constructs a truncated random variable based on the provided distribution
        Parameters:
        distribution - the distribution to truncate, must not be null
        cdfLL - The lower limit of the range of support of the distribution
        cdfUL - The upper limit of the range of support of the distribution
        truncLL - The truncated lower limit (if moved in from cdfLL), must be >= cdfLL
        truncUL - The truncated upper limit (if moved in from cdfUL), must be <= cdfUL
      • TruncatedRV

        public TruncatedRV​(DistributionIfc distribution,
                           double cdfLL,
                           double cdfUL,
                           double truncLL,
                           double truncUL,
                           int streamNum)
        Constructs a truncated random variable based on the provided distribution
        Parameters:
        distribution - the distribution to truncate, must not be null
        cdfLL - The lower limit of the range of support of the distribution
        cdfUL - The upper limit of the range of support of the distribution
        truncLL - The truncated lower limit (if moved in from cdfLL), must be >= cdfLL
        truncUL - The truncated upper limit (if moved in from cdfUL), must be <= cdfUL
        streamNum - A positive integer to identify the stream
      • TruncatedRV

        public TruncatedRV​(DistributionIfc distribution,
                           double cdfLL,
                           double cdfUL,
                           double truncLL,
                           double truncUL,
                           RNStreamIfc rng)
        Constructs a truncated random variable based on the provided distribution
        Parameters:
        distribution - the distribution to truncate, must not be null
        cdfLL - The lower limit of the range of support of the distribution
        cdfUL - The upper limit of the range of support of the distribution
        truncLL - The truncated lower limit (if moved in from cdfLL), must be >= cdfLL
        truncUL - The truncated upper limit (if moved in from cdfUL), must be <= cdfUL
    • Method Detail

      • getCDFLowerLimit

        public final double getCDFLowerLimit()
        The CDF's original lower limit
        Returns:
        CDF's original lower limit
      • getCDFUpperLimit

        public final double getCDFUpperLimit()
        The CDF's original upper limit
        Returns:
        CDF's original upper limit
      • getTruncatedLowerLimit

        public final double getTruncatedLowerLimit()
        The lower limit for the truncated distribution
        Returns:
        lower limit for the truncated distribution
      • getTruncatedUpperLimit

        public final double getTruncatedUpperLimit()
        The upper limit for the trunctated distribution
        Returns:
        upper limit for the trunctated distribution
      • 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