rstream.substream-methods: Methods for Function rstream.resetsubstream and...

Description Usage Arguments Methods Author(s) See Also Examples

Description

Some subclasses have implmented the concept of substreams. This is especially usefull if two or more streams should be synchronized.

This interface allows to jump to the beginning of the next substream and to reset the stream object to the beginning of the current substream.

Usage

1
2
3
4
## S4 method for signature 'rstream'
rstream.resetsubstream(stream)
## S4 method for signature 'rstream'
rstream.nextsubstream(stream)

Arguments

stream

an "rstream" object.

Methods

Methods available for the following "rstream" subclasses: rstream.mrg32k3a.

Author(s)

Josef Leydold josef.leydold@wu.ac.at

See Also

rstream.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## create a new rstream object (of subclass rstream.mrg32k3a)
s <- new("rstream.mrg32k3a")

## jump to beginning of next substream
rstream.nextsubstream(s)

## generate a sample
x <- rstream.sample(s,10)

## reset substream
rstream.resetsubstream(s)

## the new sample y is identical to x
y <- rstream.sample(s,10)
if (identical(x,y)) print("x and y are identical samples")


Search within the rstream package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.