<?xml version="1.0" encoding="UTF-8"?>

<!--
 *
 * This help file was generated from distfun_streaminit.sci using help_from_sci().
 *
 -->

<refentry version="5.0-subset Scilab" xml:id="distfun_streaminit" xml:lang="en"
          xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg"
          xmlns:ns3="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:scilab="http://www.scilab.org"
          xmlns:db="http://docbook.org/ns/docbook">

  <refnamediv>
    <refname>distfun_streaminit</refname>
    <refpurpose>Initializes the current substream</refpurpose>
  </refnamediv>


<refsynopsisdiv>
   <title>Calling Sequence</title>
   <synopsis>
   distfun_streaminit ( I )
   
   </synopsis>
</refsynopsisdiv>

<refsection>
   <title>Parameters</title>
   <variablelist>
   <varlistentry><term>I:</term>
      <listitem><para> 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.</para></listitem></varlistentry>
   </variablelist>
</refsection>

<refsection>
   <title>Description</title>
   <para>
This function let us move forward or backward within the stream g.
   </para>
   <para>
<itemizedlist>
<listitem>
<para>
distfun_streaminit(-1) :
</para>
<para>
sets the state of the current stream to its initial seed,
i.e. reset it to the start of the substream.
</para>
</listitem>
<listitem>
<para>
distfun_streaminit(0) :
</para>
<para>
sets the state of the current stream
to its previous seed, i.e. set it to the beginning of the current substream.
</para>
</listitem>
<listitem>
<para>
distfun_streaminit(1) :
</para>
<para>
sets the state of the current stream to the beginning
of the next substream and resets the current substream parameters.
</para>
</listitem>
</itemizedlist>
   </para>
   <para>
</para>
</refsection>

<refsection>
   <title>Examples</title>
   <programlisting role="example"><![CDATA[
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" );

   ]]></programlisting>
</refsection>

<refsection>
   <title>Authors</title>
   <simplelist type="vert">
   <member>Copyright (C) 2012 - Michael Baudin</member>
   <member>Copyright (C) Bruno Pincon</member>
   </simplelist>
</refsection>
</refentry>
