|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.randvarmulti.RandomMultivariateGen
public abstract class RandomMultivariateGen
This class is the multivariate counterpart of
RandomVariateGen
.
It is the base class for general random variate generators over
the d-dimensional real space Rd.
It specifies the signature of the nextPoint
method, which is
normally called to generate a random vector from a given distribution.
Contrary to univariate distributions and generators, here the inversion method
is not well defined, so we cannot construct a multivariate generator simply
by passing a multivariate distribution and a stream; we must specify a
generating method as well. For this reason, this class is abstract.
Generators can be constructed only by invoking the constructor of a subclass.
This is an important difference with
RandomVariateGen
.
Constructor Summary | |
---|---|
RandomMultivariateGen()
|
Method Summary | |
---|---|
int |
getDimension()
Returns the dimension of this multivariate generator (the dimension of the random points). |
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 the stream contained in this object. |
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()
Method 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.
The array argument v[][d] must have d elements reserved
for each generated point before calling this method.
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 RandomStream getStream()
RandomStream
used by this object.
public void setStream(RandomStream stream)
RandomStream
used by this object to stream.
|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |