Class "unuran" -- Universal Non-Uniform RANdom variate generators
The class unuran
provides an interface to the UNU.RAN library for universal non-uniform random number generators. It uses the built-in uniform random number generator.
[Advanced] -- UNU.RAN generator object. class
Objects can be created by calls of the form new("unuran", distribution, method)
.
distribution:: A character string that describes the target distribution (see UNU.RAN User Manual) or one of the S4 classes unuran.cont
, unuran.discr
, or unuran.cmv
that holds information about the distribution.
method:: A character string that describes the chosen generation method, see UNU.RAN User Manual. If omitted method "auto"
(automatic) is used.
See unuran.new
for short introduction and examples for this interface.
The class unuran
provides the following methods for handling objects:
signature(object = "unuran")
: Get a random sample from the stream object.signature(object = "unuran")
: Same as ur
.signature(.Object = "unuran")
: Initialize unuran
object. (For Internal usage only).signature(x = "unuran")
: Print info about unuran
object.signature(x = "unuran")
: Same as print
.Josef Leydold and Wolfgang H"ormann unuran@statmath.wu.ac.at .
The interface has been changed compared to the DSC 2003 paper.
unuran
objects cannot be saved and restored in later
sessions, nor is it possible to copy such objects to different nodes in a computer cluster.
However, unuran
objects for some generation methods can be packed , see unuran.packed
. Then these objects can be handled like any other object (and thus saved and restored).
All other objects must be newly created in a new
session! (Using a restored object does not work as the unuran
is then broken.)
J. Leydold and W. H"ormann (2000-2007): UNU.RAN User Manual, see https://statmath.wu.ac.at/unuran/.
W. H"ormann, J. Leydold, and G. Derflinger (2004): Automatic Nonuniform Random Variate Generation. Springer-Verlag, Berlin Heidelberg
G. Tirler and J. Leydold (2003): Automatic Nonuniform Random Variate Generation in . In: K. Hornik and F. Leisch, Proceedings of the 3rd International Workshop on Distributed Statistical Computing (DSC 2003), March 20--22, Vienna, Austria.
unuran.new
and ur
for faster creation and sampling routines, unuran.details
for a more verbose version of show
.
unuran.packed
allows to pack some unuran
objects.
For distribution objects see unuran.cont
, unuran.discr
, and unuran.cmv
.