Package jsl.utilities.random.rvariable
Class Hyper2ExponentialRV
- java.lang.Object
-
- jsl.utilities.random.rvariable.AbstractRVariable
-
- jsl.utilities.random.rvariable.Hyper2ExponentialRV
-
- All Implemented Interfaces:
java.util.function.DoubleSupplier
,GetNameIfc
,GetValueIfc
,IdentityIfc
,PreviousValueIfc
,RandomIfc
,GetRandomNumberStreamIfc
,RNStreamControlIfc
,SetRandomNumberStreamIfc
,NewAntitheticInstanceIfc
,RVariableIfc
,SampleIfc
public class Hyper2ExponentialRV extends AbstractRVariable
Two exponential random variables mixed to get a hyper-exponential. For higher order hyper-exponential use MixtureRV. The mixing probability is the probability of getting the first exponential distribution with mean1
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jsl.utilities.random.rvariable.RVariableIfc
RVariableIfc.RVType
-
-
Field Summary
-
Fields inherited from class jsl.utilities.random.rvariable.AbstractRVariable
myRNStream
-
-
Constructor Summary
Constructors Constructor Description Hyper2ExponentialRV(double mixingProb, double mean1, double mean2)
Hyper2ExponentialRV(double mixingProb, double mean1, double mean2, int streamNum)
Hyper2ExponentialRV(double mixingProb, double mean1, double mean2, RNStreamIfc stream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected double
generate()
double
getMean1()
double
getMean2()
double
getMixingProb()
Gets the mixing probabilityHyper2ExponentialRV
newInstance(RNStreamIfc stream)
-
Methods inherited from class jsl.utilities.random.rvariable.AbstractRVariable
advanceToNextSubstream, getAntitheticOption, getId, getName, getPreviousValue, getRandomNumberStream, getValue, newAntitheticInstance, newInstance, resetStartStream, resetStartSubstream, sample, setAntitheticOption, setName, setPreviousValue, setRandomNumberStream
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jsl.utilities.random.rng.GetRandomNumberStreamIfc
getStreamNumber
-
Methods inherited from interface jsl.utilities.random.rvariable.RVariableIfc
asDoubleStream, getAsDouble, getSumOfValues, newInstance
-
Methods inherited from interface jsl.utilities.random.rng.SetRandomNumberStreamIfc
setRandomNumberStream
-
-
-
-
Constructor Detail
-
Hyper2ExponentialRV
public Hyper2ExponentialRV(double mixingProb, double mean1, double mean2)
-
Hyper2ExponentialRV
public Hyper2ExponentialRV(double mixingProb, double mean1, double mean2, int streamNum)
-
Hyper2ExponentialRV
public Hyper2ExponentialRV(double mixingProb, double mean1, double mean2, RNStreamIfc stream)
-
-
Method Detail
-
generate
protected double generate()
- Specified by:
generate
in classAbstractRVariable
- Returns:
- the randomly generated variate
-
getMixingProb
public final double getMixingProb()
Gets the mixing probability- Returns:
- The mixing probability
-
getMean1
public final double getMean1()
- Returns:
- the mean1 value
-
getMean2
public final double getMean2()
- Returns:
- the mean1 value
-
newInstance
public final Hyper2ExponentialRV newInstance(RNStreamIfc stream)
- Parameters:
stream
- the RNStreamIfc to use- Returns:
- a new instance with same parameter value
-
-