Class BivariateLogNormalRV

    • Constructor Detail

      • BivariateLogNormalRV

        public BivariateLogNormalRV()
        Constructs a standard bi-variate lognormal with no correlation
      • BivariateLogNormalRV

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

        public BivariateLogNormalRV​(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
      • BivariateLogNormalRV

        public BivariateLogNormalRV​(double m1,
                                    double v1,
                                    double m2,
                                    double v2,
                                    double r,
                                    int streamNum)
        Constructs a bi-variate lognormal with the provided parameters
        Parameters:
        m1 - mean of first coordinate
        v1 - variance of first coordinate
        m2 - mean of 2nd coordinate
        v2 - variance of 2nd coordinate
        r - correlation between X1 and X2
        streamNum - the stream number
      • BivariateLogNormalRV

        public BivariateLogNormalRV​(double m1,
                                    double v1,
                                    double m2,
                                    double v2,
                                    double r,
                                    RNStreamIfc rng)
        Constructs a bi-variate lognormal with the provided parameters
        Parameters:
        m1 - mean of first coordinate
        v1 - variance of first coordinate
        m2 - mean of 2nd coordinate
        v2 - variance of 2nd coordinate
        r - correlation between X1 and X2
        rng - the RNStreamIfc to use
    • Method Detail

      • getMean1

        public final double getMean1()
        Gets the first mean
        Returns:
        Gets 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 double[] sample()
        Returns:
        generates an array of random values
      • toString

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

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