File: quicksort3.Rd

package info (click to toggle)
r-cran-bit 4.6.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,000 kB
  • sloc: ansic: 5,145; sh: 13; makefile: 6
file content (27 lines) | stat: -rw-r--r-- 747 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bitsort.R
\name{quicksort3}
\alias{quicksort3}
\title{Low-level sorting: threeway quicksort}
\usage{
quicksort3(x, na.last = NA)
}
\arguments{
\item{x}{an integer vector}

\item{na.last}{\code{NA} removes NAs, \code{FALSE} puts NAs at the beginning,
\code{TRUE} puts NAs at the end}
}
\value{
a sorted vector
}
\description{
In one pass over the vector \code{NA}s are handled according to parameter
\code{na.last} by \code{\link[=range_sortna]{range_sortna()}}, then, if the vector is unsorted,
threeway quicksort is invoked.
}
\examples{
countsort(c(2L, 0L, 1L, NA, 2L))
countsort(c(2L, 0L, 1L, NA, 2L), na.last=TRUE)
countsort(c(2L, 0L, 1L, NA, 2L), na.last=FALSE)
}