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 RNStreamIfc
myRNG
myRNStream 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 void
advanceToNextSubstream()
Positions the RNG at the beginning of its next substreamboolean
getAntitheticOption()
int
getId()
java.lang.String
getName()
RNStreamIfc
getRandomNumberStream()
void
resetStartStream()
The resetStartStream method will position the RNG at the beginning of its stream.void
resetStartSubstream()
Resets the position of the RNG at the start of the current substreamvoid
setAntitheticOption(boolean flag)
Tells the stream to start producing antithetic variatesvoid
setName(java.lang.String str)
Sets the namevoid
setRandomNumberStream(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:
getName
in interfaceGetNameIfc
- Returns:
- a string representing the name of the object
-
getId
public final int getId()
- Specified by:
getId
in 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:
getRandomNumberStream
in interfaceGetRandomNumberStreamIfc
- Returns:
- the underlying random number source
-
setRandomNumberStream
public final void setRandomNumberStream(RNStreamIfc stream)
Sets the underlying random number source- Specified by:
setRandomNumberStream
in interfaceSetRandomNumberStreamIfc
- Parameters:
stream
- the reference to the random number generator, must not be null
-
resetStartStream
public final void resetStartStream()
Description copied from interface:RNStreamControlIfc
The 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:
resetStartStream
in interfaceRNStreamControlIfc
-
resetStartSubstream
public final void resetStartSubstream()
Description copied from interface:RNStreamControlIfc
Resets the position of the RNG at the start of the current substream- Specified by:
resetStartSubstream
in interfaceRNStreamControlIfc
-
advanceToNextSubstream
public final void advanceToNextSubstream()
Description copied from interface:RNStreamControlIfc
Positions the RNG at the beginning of its next substream- Specified by:
advanceToNextSubstream
in interfaceRNStreamControlIfc
-
setAntitheticOption
public final void setAntitheticOption(boolean flag)
Description copied from interface:RNStreamControlIfc
Tells the stream to start producing antithetic variates- Specified by:
setAntitheticOption
in interfaceRNStreamControlIfc
- Parameters:
flag
- true means that it produces antithetic variates.
-
getAntitheticOption
public final boolean getAntitheticOption()
- Specified by:
getAntitheticOption
in interfaceRNStreamControlIfc
- Returns:
- true means on
-
-