Package jsl.utilities.random.rvariable
Class AbstractMVRVariable
- java.lang.Object
-
- jsl.utilities.random.rvariable.AbstractMVRVariable
-
- All Implemented Interfaces:
GetNameIfc,IdentityIfc,GetRandomNumberStreamIfc,RNStreamControlIfc,SetRandomNumberStreamIfc,MVRVariableIfc,MVSampleIfc
- Direct Known Subclasses:
BivariateLogNormalRV,BivariateNormalRV
public abstract class AbstractMVRVariable extends java.lang.Object implements MVRVariableIfc, IdentityIfc
-
-
Field Summary
Fields Modifier and Type Field Description protected RNStreamIfcmyRNGmyRNStream provides a reference to the underlying stream of random numbers
-
Constructor Summary
Constructors Constructor Description AbstractMVRVariable(RNStreamIfc rng)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadvanceToNextSubstream()Positions the RNG at the beginning of its next substreambooleangetAntitheticOption()intgetId()java.lang.StringgetName()RNStreamIfcgetRandomNumberStream()voidresetStartStream()The resetStartStream method will position the RNG at the beginning of its stream.voidresetStartSubstream()Resets the position of the RNG at the start of the current substreamvoidsetAntitheticOption(boolean flag)Tells the stream to start producing antithetic variatesvoidsetName(java.lang.String str)Sets the namevoidsetRandomNumberStream(RNStreamIfc stream)Sets the underlying random number source-
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.MVRVariableIfc
newInstance, newInstance
-
Methods inherited from interface jsl.utilities.random.rvariable.MVSampleIfc
sample, sample, sample
-
Methods inherited from interface jsl.utilities.random.rng.SetRandomNumberStreamIfc
setRandomNumberStream
-
-
-
-
Field Detail
-
myRNG
protected RNStreamIfc myRNG
myRNStream provides a reference to the underlying stream of random numbers
-
-
Constructor Detail
-
AbstractMVRVariable
public AbstractMVRVariable(RNStreamIfc rng)
-
-
Method Detail
-
getName
public final java.lang.String getName()
- Specified by:
getNamein interfaceGetNameIfc- Returns:
- a string representing the name of the object
-
getId
public final int getId()
- Specified by:
getIdin interfaceIdentityIfc- Returns:
- an int representing the id of the object
-
setName
public final void setName(java.lang.String str)
Sets the name- Parameters:
str- The name as a string.
-
getRandomNumberStream
public final RNStreamIfc getRandomNumberStream()
- Specified by:
getRandomNumberStreamin interfaceGetRandomNumberStreamIfc- Returns:
- the underlying random number source
-
setRandomNumberStream
public final void setRandomNumberStream(RNStreamIfc stream)
Sets the underlying random number source- Specified by:
setRandomNumberStreamin interfaceSetRandomNumberStreamIfc- Parameters:
stream- the reference to the random number generator, must not be null
-
resetStartStream
public final void resetStartStream()
Description copied from interface:RNStreamControlIfcThe resetStartStream method will position the RNG at the beginning of its stream. This is the same location in the stream as assigned when the RNG was created and initialized.- Specified by:
resetStartStreamin interfaceRNStreamControlIfc
-
resetStartSubstream
public final void resetStartSubstream()
Description copied from interface:RNStreamControlIfcResets the position of the RNG at the start of the current substream- Specified by:
resetStartSubstreamin interfaceRNStreamControlIfc
-
advanceToNextSubstream
public final void advanceToNextSubstream()
Description copied from interface:RNStreamControlIfcPositions the RNG at the beginning of its next substream- Specified by:
advanceToNextSubstreamin interfaceRNStreamControlIfc
-
setAntitheticOption
public final void setAntitheticOption(boolean flag)
Description copied from interface:RNStreamControlIfcTells the stream to start producing antithetic variates- Specified by:
setAntitheticOptionin interfaceRNStreamControlIfc- Parameters:
flag- true means that it produces antithetic variates.
-
getAntitheticOption
public final boolean getAntitheticOption()
- Specified by:
getAntitheticOptionin interfaceRNStreamControlIfc- Returns:
- true means on
-
-