\HeaderA{igraph.sample}{Sampling a random integer sequence}{igraph.sample}
\keyword{datagen}{igraph.sample}
\begin{Description}\relax
This function provides a very efficient way to pull an
integer random sample sequence from an integer interval.
\end{Description}
\begin{Usage}
\begin{verbatim}
igraph.sample(low, high, length)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{low}] The lower limit of the interval (inclusive).
\item[\code{high}] The higher limit of the interval (inclusive).
\item[\code{length}] The length of the sample.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The algorithm runs in \code{O(length)} expected time, even if
\code{high-low} is big. It is much faster (but of course less general)
than the builtin \code{sample} function of R.
\end{Details}
\begin{Value}
An increasing numeric vector containing integers, the sample.
\end{Value}
\begin{Author}\relax
Gabor Csardi \email{csardi@rmki.kfki.hu}
\end{Author}
\begin{References}\relax
Jeffrey Scott Vitter: An Efficient Algorithm for Sequential
Random Sampling, \emph{ACM Transactions on Mathematical Software}, 13/1,
58--67.
\end{References}
\begin{Examples}
\begin{ExampleCode}
rs <- igraph.sample(1, 100000000, 10)
rs
\end{ExampleCode}
\end{Examples}

