Package jsl.utilities.random.rvariable
Class StudentTRV
- java.lang.Object
-
- jsl.utilities.random.rvariable.AbstractRVariable
-
- jsl.utilities.random.rvariable.StudentTRV
-
- All Implemented Interfaces:
java.util.function.DoubleSupplier
,GetNameIfc
,GetValueIfc
,IdentityIfc
,PreviousValueIfc
,RandomIfc
,GetRandomNumberStreamIfc
,RNStreamControlIfc
,SetRandomNumberStreamIfc
,NewAntitheticInstanceIfc
,RVariableIfc
,SampleIfc
public class StudentTRV extends AbstractRVariable
-
-
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 StudentTRV(double dof)
Constructs a StudentT distribution dof degrees of freedomStudentTRV(double dof, int streamNum)
Constructs a StudentT distribution dof degrees of freedomStudentTRV(double dof, RNStreamIfc rng)
Constructs a StudentT distribution dof degrees of freedom
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
baileysAcceptanceRejection()
Directly generate a random variate using Bailey's acceptance-rejection algorithmprotected double
generate()
double
getDegreesOfFreedom()
RVariableIfc
newInstance(RNStreamIfc rng)
-
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
-
StudentTRV
public StudentTRV(double dof)
Constructs a StudentT distribution dof degrees of freedom- Parameters:
dof
- degrees of freedom
-
StudentTRV
public StudentTRV(double dof, int streamNum)
Constructs a StudentT distribution dof degrees of freedom- Parameters:
dof
- degrees of freedomstreamNum
- the stream number
-
StudentTRV
public StudentTRV(double dof, RNStreamIfc rng)
Constructs a StudentT distribution dof degrees of freedom- Parameters:
dof
- degrees of freedomrng
- the random number generator
-
-
Method Detail
-
getDegreesOfFreedom
public final double getDegreesOfFreedom()
- Returns:
- the degrees of freedom
-
generate
protected double generate()
- Specified by:
generate
in classAbstractRVariable
- 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
-
baileysAcceptanceRejection
public final double baileysAcceptanceRejection()
Directly generate a random variate using Bailey's acceptance-rejection algorithm- Returns:
- the generated random variable
-
-