Package jsl.utilities.random.rvariable
Class BivariateLogNormalRV
- java.lang.Object
-
- jsl.utilities.random.rvariable.AbstractMVRVariable
-
- jsl.utilities.random.rvariable.BivariateLogNormalRV
-
- All Implemented Interfaces:
GetNameIfc,IdentityIfc,GetRandomNumberStreamIfc,RNStreamControlIfc,SetRandomNumberStreamIfc,MVRVariableIfc,MVSampleIfc
public class BivariateLogNormalRV extends AbstractMVRVariable
Allows for the generation of bi-variate lognormal random variables
-
-
Field Summary
-
Fields inherited from class jsl.utilities.random.rvariable.AbstractMVRVariable
myRNG
-
-
Constructor Summary
Constructors Constructor Description BivariateLogNormalRV()Constructs a standard bi-variate lognormal with no correlationBivariateLogNormalRV(double mean1, double var1, double mean2, double var2, double rho)BivariateLogNormalRV(double m1, double v1, double m2, double v2, double r, int streamNum)Constructs a bi-variate lognormal with the provided parametersBivariateLogNormalRV(double m1, double v1, double m2, double v2, double r, RNStreamIfc rng)Constructs a bi-variate lognormal with the provided parametersBivariateLogNormalRV(RNStreamIfc rng)Constructs a standard bi-variate log normal with no correlation
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetCorrelation()Gets the correlationdoublegetMean1()Gets the first meandoublegetMean2()Gets the second meandoublegetVariance1()Gets the first variancedoublegetVariance2()Gets the 2nd varianceMVRVariableIfcnewInstance(RNStreamIfc rng)double[]sample()java.lang.StringtoString()-
Methods inherited from class jsl.utilities.random.rvariable.AbstractMVRVariable
advanceToNextSubstream, getAntitheticOption, getId, getName, getRandomNumberStream, resetStartStream, resetStartSubstream, setAntitheticOption, setName, setRandomNumberStream
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jsl.utilities.random.rng.GetRandomNumberStreamIfc
getStreamNumber
-
Methods inherited from interface jsl.utilities.random.rvariable.MVRVariableIfc
newInstance
-
Methods inherited from interface jsl.utilities.random.rvariable.MVSampleIfc
sample, sample
-
Methods inherited from interface jsl.utilities.random.rng.SetRandomNumberStreamIfc
setRandomNumberStream
-
-
-
-
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 coordinatevar1- variance of first coordinatemean2- mean of 2nd coordinatevar2- variance of 2nd coordinaterho- 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 coordinatev1- variance of first coordinatem2- mean of 2nd coordinatev2- variance of 2nd coordinater- correlation between X1 and X2streamNum- 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 coordinatev1- variance of first coordinatem2- mean of 2nd coordinatev2- variance of 2nd coordinater- correlation between X1 and X2rng- 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:
toStringin classjava.lang.Object
-
newInstance
public MVRVariableIfc newInstance(RNStreamIfc rng)
- Parameters:
rng- the RngIfc to use- Returns:
- a new instance with same parameter value
-
-