<< distfun_streamget Random Number Generator distfun_streamset >>

distfun >> distfun > Random Number Generator > distfun_streaminit

distfun_streaminit

Initializes the current substream

Calling Sequence

distfun_streaminit ( I )

Parameters

I:

a 1-by-1 matrix of doubles, integer value, the type of action on the current stream. Available values are I=-1,0 or 1.

Description

This function let us move forward or backward within the stream g.

Examples

distfun_genset ( "clcg4" );
distfun_streamset ( 0 ) // this is the default
// Set the virt. gen. g=0 to the begining of the stream
distfun_streaminit(-1)
// Go on to the next subtream ...
distfun_streaminit(1)
// ... go on to the next subtream ...
distfun_streaminit(1)
// Return to the default generator
distfun_genset ( "mt" );

// Example with moves forward and backward in the stream
distfun_genset ( "clcg4" );
distfun_streamset ( 0 ) // this is the default
// Set the virt. gen. g=0 to the begining of the stream
distfun_streaminit(-1)
// Go on to the next subtream ...
distfun_streaminit(1)
// ... go back to the previous subtream ...
distfun_streaminit(0)
// Return to the default generator
distfun_genset ( "mt" );

Authors


Report an issue
<< distfun_streamget Random Number Generator distfun_streamset >>