~ubuntu-branches/ubuntu/trusty/gsl-ref-html/trusty

« back to all changes in this revision

Viewing changes to Copying-random-number-generator-state.html

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2006-04-12 19:46:32 UTC
  • mfrom: (1.3.1 upstream) (3.1.1 dapper)
  • Revision ID: james.westby@ubuntu.com-20060412194632-c9lodpl075pv9si3
Tags: 1.8-1
* New upstream release 1.8
* As with previous releases, the sources were obtained from the FSF web 
  pages by means of a wget call (c.f. the debian/rules target 'upstream')

* debian/control: Standards-Version increased to 3.6.2
* debian/copyright: Updated FSF address
* debian/rules: Set DH_COMPAT=4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html lang="en">
 
2
<head>
 
3
<title>Copying random number generator state - GNU Scientific Library -- Reference Manual</title>
 
4
<meta http-equiv="Content-Type" content="text/html">
 
5
<meta name="description" content="GNU Scientific Library -- Reference Manual">
 
6
<meta name="generator" content="makeinfo 4.8">
 
7
<link title="Top" rel="start" href="index.html#Top">
 
8
<link rel="up" href="Random-Number-Generation.html#Random-Number-Generation" title="Random Number Generation">
 
9
<link rel="prev" href="Random-number-environment-variables.html#Random-number-environment-variables" title="Random number environment variables">
 
10
<link rel="next" href="Reading-and-writing-random-number-generator-state.html#Reading-and-writing-random-number-generator-state" title="Reading and writing random number generator state">
 
11
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
 
12
<!--
 
13
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 The GSL Team.
 
14
 
 
15
Permission is granted to copy, distribute and/or modify this document
 
16
under the terms of the GNU Free Documentation License, Version 1.2 or
 
17
any later version published by the Free Software Foundation; with the
 
18
Invariant Sections being ``GNU General Public License'' and ``Free Software
 
19
Needs Free Documentation'', the Front-Cover text being ``A GNU Manual'',
 
20
and with the Back-Cover Text being (a) (see below).  A copy of the
 
21
license is included in the section entitled ``GNU Free Documentation
 
22
License''.
 
23
 
 
24
(a) The Back-Cover Text is: ``You have freedom to copy and modify this
 
25
GNU Manual, like GNU software.''-->
 
26
<meta http-equiv="Content-Style-Type" content="text/css">
 
27
<style type="text/css"><!--
 
28
  pre.display { font-family:inherit }
 
29
  pre.format  { font-family:inherit }
 
30
  pre.smalldisplay { font-family:inherit; font-size:smaller }
 
31
  pre.smallformat  { font-family:inherit; font-size:smaller }
 
32
  pre.smallexample { font-size:smaller }
 
33
  pre.smalllisp    { font-size:smaller }
 
34
  span.sc    { font-variant:small-caps }
 
35
  span.roman { font-family:serif; font-weight:normal; } 
 
36
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
 
37
--></style>
 
38
</head>
 
39
<body>
 
40
<div class="node">
 
41
<p>
 
42
<a name="Copying-random-number-generator-state"></a>
 
43
Next:&nbsp;<a rel="next" accesskey="n" href="Reading-and-writing-random-number-generator-state.html#Reading-and-writing-random-number-generator-state">Reading and writing random number generator state</a>,
 
44
Previous:&nbsp;<a rel="previous" accesskey="p" href="Random-number-environment-variables.html#Random-number-environment-variables">Random number environment variables</a>,
 
45
Up:&nbsp;<a rel="up" accesskey="u" href="Random-Number-Generation.html#Random-Number-Generation">Random Number Generation</a>
 
46
<hr>
 
47
</div>
 
48
 
 
49
<h3 class="section">17.7 Copying random number generator state</h3>
 
50
 
 
51
<p>The above methods do not expose the random number `state' which changes
 
52
from call to call.  It is often useful to be able to save and restore
 
53
the state.  To permit these practices, a few somewhat more advanced
 
54
functions are supplied.  These include:
 
55
 
 
56
<div class="defun">
 
57
&mdash; Function: int <b>gsl_rng_memcpy</b> (<var>gsl_rng * dest, const gsl_rng * src</var>)<var><a name="index-gsl_005frng_005fmemcpy-1387"></a></var><br>
 
58
<blockquote><p>This function copies the random number generator <var>src</var> into the
 
59
pre-existing generator <var>dest</var>, making <var>dest</var> into an exact copy
 
60
of <var>src</var>.  The two generators must be of the same type. 
 
61
</p></blockquote></div>
 
62
 
 
63
<div class="defun">
 
64
&mdash; Function: gsl_rng * <b>gsl_rng_clone</b> (<var>const gsl_rng * r</var>)<var><a name="index-gsl_005frng_005fclone-1388"></a></var><br>
 
65
<blockquote><p>This function returns a pointer to a newly created generator which is an
 
66
exact copy of the generator <var>r</var>. 
 
67
</p></blockquote></div>
 
68
 
 
69
   </body></html>
 
70