Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
048b75bd
Commit
048b75bd
authored
Apr 21, 1999
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make references to whrandom hyperlinks.
parent
ec6baaf6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
Doc/lib/librandom.tex
Doc/lib/librandom.tex
+10
-10
No files found.
Doc/lib/librandom.tex
View file @
048b75bd
\section
{
\module
{
random
}
---
\section
{
\module
{
random
}
---
Generate pseudo-random numbers with various distributions.
}
Generate pseudo-random numbers
}
\declaremodule
{
standard
}{
random
}
\declaremodule
{
standard
}{
random
}
\modulesynopsis
{
Generate pseudo-random numbers with various common
\modulesynopsis
{
Generate pseudo-random numbers with various common
distributions.
}
distributions.
}
This module implements pseudo-random number generators for various
This module implements pseudo-random number generators for various
...
@@ -13,10 +13,10 @@ distributions. For generating distribution of angles, the circular
...
@@ -13,10 +13,10 @@ distributions. For generating distribution of angles, the circular
uniform and von Mises distributions are available.
uniform and von Mises distributions are available.
The module exports the following functions, which are exactly
The module exports the following functions, which are exactly
equivalent to those in the
\module
{
whrandom
}
module:
equivalent to those in the
\
ref
module
{
whrandom
}
module:
\function
{
choice()
}
,
\function
{
randint()
}
,
\function
{
random()
}
and
\function
{
choice()
}
,
\function
{
randint()
}
,
\function
{
random()
}
and
\function
{
uniform()
}
. See the documentation for the
\module
{
whrandom
}
\function
{
uniform()
}
. See the documentation for the
module for these functions.
\refmodule
{
whrandom
}
module for these functions.
The following functions specific to the
\module
{
random
}
module are also
The following functions specific to the
\module
{
random
}
module are also
defined, and all return real values. Function parameters are named
defined, and all return real values. Function parameters are named
...
@@ -34,7 +34,7 @@ Returned values will range between 0 and 1.
...
@@ -34,7 +34,7 @@ Returned values will range between 0 and 1.
Circular uniform distribution.
\var
{
mean
}
is the mean angle, and
Circular uniform distribution.
\var
{
mean
}
is the mean angle, and
\var
{
arc
}
is the range of the distribution, centered around the mean
\var
{
arc
}
is the range of the distribution, centered around the mean
angle. Both values must be expressed in radians, and can range
angle. Both values must be expressed in radians, and can range
between 0 and
pi
. Returned values will range between
between 0 and
\emph
{
pi
}
. Returned values will range between
\code
{
\var
{
mean
}
-
\var
{
arc
}
/2
}
and
\code
{
\var
{
mean
}
+
\var
{
arc
}
/2
}
.
\code
{
\var
{
mean
}
-
\var
{
arc
}
/2
}
and
\code
{
\var
{
mean
}
+
\var
{
arc
}
/2
}
.
\end{funcdesc}
\end{funcdesc}
...
@@ -69,11 +69,11 @@ standard deviation.
...
@@ -69,11 +69,11 @@ standard deviation.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
vonmisesvariate
}{
mu, kappa
}
\begin{funcdesc}
{
vonmisesvariate
}{
mu, kappa
}
\var
{
mu
}
is the mean angle, expressed in radians between 0 and 2*
pi
,
\var
{
mu
}
is the mean angle, expressed in radians between 0 and 2*
\emph
{
pi
}
,
and
\var
{
kappa
}
is the concentration parameter, which must be greater
and
\var
{
kappa
}
is the concentration parameter, which must be greater
than or equal to zero. If
\var
{
kappa
}
is equal to zero, this
than or equal to zero. If
\var
{
kappa
}
is equal to zero, this
distribution reduces to a uniform random angle over the range 0 to
distribution reduces to a uniform random angle over the range 0 to
2*
pi
.
2*
\emph
{
pi
}
.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
paretovariate
}{
alpha
}
\begin{funcdesc}
{
paretovariate
}{
alpha
}
...
@@ -86,5 +86,5 @@ Weibull distribution. \var{alpha} is the scale parameter and
...
@@ -86,5 +86,5 @@ Weibull distribution. \var{alpha} is the scale parameter and
\end{funcdesc}
\end{funcdesc}
\begin{seealso}
\begin{seealso}
\seemodule
{
whrandom
}{
the standard Python random number generator
}
\seemodule
{
whrandom
}{
the standard Python random number generator
}
\end{seealso}
\end{seealso}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment