Class BivariateNormalRV

    • Constructor Detail

      • BivariateNormalRV

        public BivariateNormalRV()
        Constructs a standard bi-variate normal with no correlation
      • BivariateNormalRV

        public BivariateNormalRV​(RNStreamIfc rng)
        Constructs a standard bi-variate normal with no correlation
      • BivariateNormalRV

        public BivariateNormalRV​(double mean1,
                                 double var1,
                                 double mean2,
                                 double var2,
                                 double rho)
        Parameters:
        mean1 - mean of first coordinate
        var1 - variance of first coordinate
        mean2 - mean of 2nd coordinate
        var2 - variance of 2nd coordinate
        rho - correlation between X1 and X2
      • BivariateNormalRV

        public BivariateNormalRV​(double mean1,
                                 double var1,
                                 double mean2,
                                 double var2,
                                 double rho,
                                 int streamNum)
        Constructs a bi-variate normal with the provided parameters
        Parameters:
        mean1 - mean of first coordinate
        var1 - variance of first coordinate
        mean2 - mean of 2nd coordinate
        var2 - variance of 2nd coordinate
        rho - correlation between X1 and X2
        streamNum - the stream number
      • BivariateNormalRV

        public BivariateNormalRV​(double mean1,
                                 double var1,
                                 double mean2,
                                 double var2,
                                 double rho,
                                 RNStreamIfc rng)
        Constructs a bi-variate normal with the provided parameters
        Parameters:
        mean1 - mean of first coordinate
        var1 - variance of first coordinate
        mean2 - mean of 2nd coordinate
        var2 - variance of 2nd coordinate
        rho - correlation between X1 and X2
        rng - the RNStreamIfc
    • Method Detail

      • getMean1

        public final double getMean1()
        Gets the first mean
        Returns:
        the first mean
      • getVariance1

        public final double getVariance1()
        Gets the first variance
        Returns:
        the first variance
      • getMean2

        public final double getMean2()
        Gets the second mean
        Returns:
        the second mean
      • getVariance2

        public final double getVariance2()
        Gets the 2nd variance
        Returns:
        the 2nd variance
      • getCorrelation

        public final double getCorrelation()
        Gets the correlation
        Returns:
        the correlation
      • sample

        public final double[] sample()
        Returns:
        generates an array of random values
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • newInstance

        public final MVRVariableIfc newInstance​(RNStreamIfc rng)
        Parameters:
        rng - the RngIfc to use
        Returns:
        a new instance with same parameter value