|
SSJ V. 1.2.5. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.randvarmulti.RandomMultiVariateGen
public abstract class RandomMultiVariateGen
This is the base class for all random variate generators over
Rd, the d-dimensional space over the reals.
It specifies the signature of the nextPoint
method, which is
normally called to generate a real-valued random vector following
a given distribution. A random multi-variate generator object can be created
simply by invoking the constructors of this class with some previously created
RandomVariateGen
or
RandomStream
objects.
The multi-dimensional generator normally uses one or more one-dimensional
generators or a primitive stream to generate the components of the points one
at a time.
Constructor Summary | |
---|---|
RandomMultiVariateGen(RandomStream s)
Creates a new multi-variate random generator using stream s. |
|
RandomMultiVariateGen(RandomVariateGen gen1)
Creates a new multi-variate random generator using the one-dimensional generator gen1. |
Method Summary | |
---|---|
int |
getDimension()
Returns the dimension of this multi-variate generator (the dimension of the random points). |
RandomVariateGen |
getGen1()
Returns the one-dimensional RandomVariateGen used by this object. |
RandomStream |
getStream()
Returns the RandomStream used by this object. |
void |
nextArrayOfPoints(double[][] v,
int start,
int n)
Generates n random points. |
abstract void |
nextPoint(double[] p)
Generates a random point p using the one-dimensional generator or the stream contained in this object. |
void |
setGen1(RandomVariateGen gen1)
Sets the RandomVariateGen used by this object to gen1. |
void |
setStream(RandomStream stream)
Sets the RandomStream used by this object to stream. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RandomMultiVariateGen(RandomVariateGen gen1)
gen1
- one-dimensional generator usedpublic RandomMultiVariateGen(RandomStream s)
s
- random stream used to generate uniformsMethod Detail |
---|
public abstract void nextPoint(double[] p)
public void nextArrayOfPoints(double[][] v, int start, int n)
nextPoint
n
times, but one can override it in subclasses for better efficiency.
v
- array in which the variates will be storedstart
- starting index, in v, of the new variatesn
- number of variates to generatepublic int getDimension()
public RandomVariateGen getGen1()
RandomVariateGen
used by this object.
public void setGen1(RandomVariateGen gen1)
RandomVariateGen
used by this object to gen1.
public RandomStream getStream()
RandomStream
used by this object.
public void setStream(RandomStream stream)
RandomStream
used by this object to stream.
|
SSJ V. 1.2.5. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |